jerson / react-native-fast-openpgp

OpenPGP for react native made with golang for fast performance
https://www.npmjs.com/package/react-native-fast-openpgp
MIT License
45 stars 18 forks source link

Error: boolResponse: signature error: openpgp: unsupported feature: unknown critical signature subpacket type 33 #48

Open Czino opened 2 years ago

Czino commented 2 years ago

I encountered an error on iOS (at least 14.5)

I am trying to verify a signature of following message (IBAN is a fake number I got from here )

{"id":"sepa-IE29AIBK93115212345678","type":"sepa","iban":"IE29 AIBK 9311 5212 3456 78","beneficiary":"Czino"}

Signature is the following

-----BEGIN PGP SIGNATURE-----
Version: openpgp-mobile

wsBzBAABCAAnBQJiM0WyCZDC169C4FaYTRahBMJzmMRBrEtlBEgCgMLXr0LgVphN
AAAlzQf+IK9uvxurJIa6ABf4hQn9Li48+TiERsFq60fTJw+f5kopIHGGwAhr4OKb
GoBaCW/9WU1g22GSphysKgEnPgvjsM/8WfkY0ZfE3UrcaSoj3TlwLfrwCNWcFxfb
tNN1J88Q58U9LRksetnjzzzbKy6O/3Cz0BF7MT2f0YKhT8jCXg1e0/ngMqZOJMJc
PN8GYXFW093ijMZt5G5rMSTTl3JMXA9eHFSK7Nl2kmQIp2M1QKL8EOO8OWQfyRVs
jsocjb/ch1E++LEaNaTybXT56aCd/VSFOyjGukJMvO5KEvGFIhwVRtJN0yeQR527
LEop4jqbAPz98qnLwSw7csLKWS84Kw==
=x8ST
-----END PGP SIGNATURE-----

And the corresponding public key

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: openpgp-mobile

xsBNBGIyIM8BCAC/FTDaVmJ1kvkEF7Zv0kbQNgYmNMux0aGQMwA9fOA1Cvp/HPmL
lD3Yuy2FQt3zMPZS5nimCWprs5HeuTONf2BQApFBtXrScwDnWvwAIP6Ldbf6XtH6
Fcxx5z4oROtgyKy11McS6T50UD9Ebp7wh/KR7c3cloxH54ADefYU5McWX0+ppCpy
fZh+VIxvNBGALe1jqmQU/3TyCZKBAJ8Z2TuQqfZ+eMK7GvGJoll0DERfVbvPh4vj
9SJ0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oZXsS1SJejl3pEFB0l4bIRL
cp/Ql17hvtYLjb3qBNURS+Iu2GHsLZHJGpG50VQBk2kiVS0RjN17GiOejTs+Hb+4
LEW3cv+Lk1RHAThlxX3XGQgU6M28ncS8Xs3WrqMk97nNYg8+xDX8YAqUZLa+kkYL
Apar4GBPVjEMVuNjtPfgC9PtIhFhnK3BFX7VZaCs3Q==
=/EpH
-----END PGP PUBLIC KEY BLOCK-----

When verifying the signature in react, following error is thrown:

Error: boolResponse: signature error: openpgp: unsupported feature: unknown critical signature subpacket type 33 To make sure the signature itself is indeed correct, I imported the pubKey to my gpg keychain and verified the signature via gpg --verify which yields a good result

In react, I use the following to sign and verify: const signature = await OpenPGP.sign(message, publicKey, privateKey, '')

and

await OpenPGP.verify(signature, message, publicKey)

$ gpg --verify message.txt.asc 
gpg: assuming signed data in 'message.txt'
gpg: Signature made Thu 17 Mar 15:29:06 2022 CET
gpg:                using RSA key C27398C441AC4B6504480280C2D7AF42E056984D
gpg: Good signature from "" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: C273 98C4 41AC 4B65 0448  0280 C2D7 AF42 E056 984D