diff --git a/Codec/Encryption/OpenPGP/KeyringParser.hs b/Codec/Encryption/OpenPGP/KeyringParser.hs
--- a/Codec/Encryption/OpenPGP/KeyringParser.hs
+++ b/Codec/Encryption/OpenPGP/KeyringParser.hs
@@ -42,6 +42,7 @@
 import Data.Text (Text)
 
 import Codec.Encryption.OpenPGP.Types
+import Codec.Encryption.OpenPGP.Ontology (isTrustPkt)
 import Data.Conduit.OpenPGP.Keyring.Instances ()
 import Text.ParserCombinators.Incremental.LeftBiasedLocal (concatMany, completeResults, feed, feedEof, inspect, Parser, satisfy)
 
@@ -192,6 +193,4 @@
 parseTKs :: Bool -> [Pkt] -> [TK]
 parseTKs intolerant ps = catMaybes (concatMap fst (completeResults (feedEof (feed (filter notTrustPacket ps) (many (anyTK intolerant))))))
     where
-            notTrustPacket (TrustPkt _) = False
-            notTrustPacket _ = True
-
+        notTrustPacket = not . isTrustPkt
diff --git a/Codec/Encryption/OpenPGP/Ontology.hs b/Codec/Encryption/OpenPGP/Ontology.hs
--- a/Codec/Encryption/OpenPGP/Ontology.hs
+++ b/Codec/Encryption/OpenPGP/Ontology.hs
@@ -11,6 +11,7 @@
  , isSKBindingSig
  , isSubkeyBindingSig
  , isSubkeyRevocation
+ , isTrustPkt
  -- * for signature subpackets
  , isCT
  , isIssuerSSP
@@ -46,6 +47,10 @@
 isSubkeyBindingSig :: SignaturePayload -> Bool
 isSubkeyBindingSig (SigV4 SubkeyBindingSig _ _ _ _ _ _) = True
 isSubkeyBindingSig _ = False
+
+isTrustPkt :: Pkt -> Bool
+isTrustPkt (TrustPkt _) = True
+isTrustPkt _ = False
 
 
 isCT :: SigSubPacket -> Bool
diff --git a/Codec/Encryption/OpenPGP/Serialize.hs b/Codec/Encryption/OpenPGP/Serialize.hs
--- a/Codec/Encryption/OpenPGP/Serialize.hs
+++ b/Codec/Encryption/OpenPGP/Serialize.hs
@@ -786,7 +786,7 @@
 getPubkey _ = UnknownPKey <$> getRemainingLazyByteString
 
 putPubkey :: PKey -> Put
-putPubkey (UnknownPKey bs) = put bs
+putPubkey (UnknownPKey bs) = putLazyByteString bs
 putPubkey p = mapM_ put (pubkeyToMPIs p)
 
 getSecretKey :: PKPayload -> Get SKey
diff --git a/Data/Conduit/OpenPGP/Keyring.hs b/Data/Conduit/OpenPGP/Keyring.hs
--- a/Data/Conduit/OpenPGP/Keyring.hs
+++ b/Data/Conduit/OpenPGP/Keyring.hs
@@ -15,6 +15,7 @@
 
 import Codec.Encryption.OpenPGP.KeyringParser (finalizeParsing, parseAChunk, anyTK)
 import Codec.Encryption.OpenPGP.Types
+import Codec.Encryption.OpenPGP.Ontology (isTrustPkt)
 import Data.Conduit.OpenPGP.Keyring.Instances ()
 
 data Phase = MainKey | Revs | Uids | UAts | Subs | SkippingBroken
@@ -41,8 +42,7 @@
 conduitToTKs' :: Monad m => Bool -> Conduit Pkt m TK
 conduitToTKs' intolerant = CL.filter notTrustPacket =$= CL.map (:[]) =$= fakecmAccum finalizeParsing (parseAChunk (anyTK intolerant)) ([], Just (Nothing, anyTK intolerant)) =$= CL.catMaybes
     where
-        notTrustPacket (TrustPkt _) = False
-        notTrustPacket _ = True
+        notTrustPacket = not . isTrustPkt
 
 sinkKeyringMap :: Monad m => Sink TK m Keyring
 sinkKeyringMap = CL.fold (flip insert) empty
diff --git a/hOpenPGP.cabal b/hOpenPGP.cabal
--- a/hOpenPGP.cabal
+++ b/hOpenPGP.cabal
@@ -1,5 +1,5 @@
 Name:                hOpenPGP
-Version:             2.5
+Version:             2.5.1
 Synopsis:            native Haskell implementation of OpenPGP (RFC4880)
 Description:         native Haskell implementation of OpenPGP (RFC4880), plus Camellia (RFC5581)
 Homepage:            http://floss.scru.org/hOpenPGP/
@@ -146,6 +146,7 @@
   , tests/data/sigs-with-regexes
   , tests/data/gnu-dummy-s2k-101-secret-key.gpg
   , tests/data/debian-keyring.gpg
+  , tests/data/anibal-ed25519.gpg
 
 Cabal-version:       >= 1.10
 
@@ -336,4 +337,4 @@
 source-repository this
   type:     git
   location: git://git.debian.org/users/clint/hOpenPGP.git
-  tag:      v2.5
+  tag:      v2.5.1
diff --git a/tests/data/anibal-ed25519.gpg b/tests/data/anibal-ed25519.gpg
new file mode 100644
Binary files /dev/null and b/tests/data/anibal-ed25519.gpg differ
diff --git a/tests/suite.hs b/tests/suite.hs
--- a/tests/suite.hs
+++ b/tests/suite.hs
@@ -274,6 +274,7 @@
    , testCase "v3-genericcert.sig" (testSerialization "v3-genericcert.sig")
    , testCase "sigs-with-regexes" (testSerialization "sigs-with-regexes")
    , testCase "gnu-dummy-s2k-101-secret-key.gpg" (testSerialization "gnu-dummy-s2k-101-secret-key.gpg")
+   , testCase "anibal-ed25519.gpg" (testSerialization "anibal-ed25519.gpg")
    ],
   testGroup "KeyID/fingerprint group" [
      testCase "v3 key" (testKeyIDandFingerprint "v3.key" "C7261095/CBD9 F412 6807 E405 CC2D  2712 1DF5 E86E")
