Closed GarethABerry closed 2 years ago
Hi @GarethABerry thanks for report this, I just updated internal library and seems works could you try using v2.2.0 version https://www.npmjs.com/package/react-native-fast-openpgp/v/2.2.0
I can confirm my ECDH public key and message was successfully encrypted. Thank you so much!
When I use the private key from the example in the source code the encryption works. I am calling
OpenPGP.encrypt(message, publicKey)
and the aforementioned public key is`-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBF0Tpe0BCADm+ja4vMKuodkQEhLm/092M/6gt4TaKwzv8QcA53/FrM3g8wab oksgIN1T+CscKXOY9GeJ530sBZgu9kTsMeQW3Uf76smo2CV1W7kSTMU+XE5ExGET +LhkKeHpXoLfZNegKuzH1Qo7DGDOByVrnijbZIukonGwvC/MTduxb69ub+YRhWJc fCjpMhm4WsC4h0Oz3ir5kx6NsN7XGVT5ghR9OEV6jlFmJ1nYYQxMlBGiATN5f2VR Y/T9QBLOEsLNvK4OqviLVvgPTQZBePoCeL73CxTbqVhcamvFRVicivl8AphDLATn 1HlIjsTtbH5I/STb8UUdL+4ziRzsQukEw++xABEBAAG0WFRlc3QgQ2xpZW50IFBy ZXBhZ28gKExsYXZlIGRlIGNsaWVudGUgdXRpbGl6YWRhIGVuIHRlc3QgYXV0b21h dGl6YWRvcykgPGNsaWVudEB0ZXN0LmNvbT6JAU4EEwEIADgWIQSM7S4gtzn4Xwz9 EH+B0DnjYl2BcAUCXROl7QIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCB 0DnjYl2BcI1HB/94YttYwwEDYeaD51gX9QamH2DsayAqPsKyEHmgsJdJcCK27sPb EjrI3g8sKze2aG6hPgY+FjLp/sCXWayt8N1wN7U7gnFCu2cszykyTKMwTuZs06w5 LEWWWZG3WcbVU4EdNVN0sCYr1OfgQiI9CT7/H5HZM12m5u4Qgw+9CFyMBb9sPjMw KBMHnQLkp/J0Fmiy5KTdZL+o28lfttAOJDg+ZTChs0LWnvZCrLKquIkX7ugI85iZ leehaFWX5Bx9w9D06uERbFlWxlonR94aA9o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YIADgWIQSBLGtZpyp0O5xzwbRy7t7peZ4rYQUCXqGR6QIb IwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRBy7t7peZ4rYYmHAP0QfyLeLa1Q gL+kxbly2WbIs7qNidI/pp0Gh4qnc6dWXgD9Ed7TAqIQz2cFT66kYg0JkAGnXxyS GjwqGxzty0ayHg+4OAReowh3EgorBgEEAZdVAQUBAQdAJvHX60UM7gLnIXIbPb1s HL8ZArhCudR93llcbXZ43AQDAQgHiHgEGBYIACAWIQSBLGtZpyp0O5xzwbRy7t7p eZ4rYQUCXqMIdwIbDAAKCRBy7t7peZ4rYcwkAQDgn+3gZu3PhifiFyTuDj7mlxlH 5+lJO/cpura0wDB0CgEA1CuBq7H3MVI+BuQ+akQebVeosTjJgC7VDFFlVxsaGQY= =3hhY -----END PGP PUBLIC KEY BLOCK-----`
I received this error from
StringResponse.getRootAsStringResponse(result);
[Error: Error: stringResponse: publicKey error: openpgp: unsupported feature: public key type: 22]
Any assistance with this would be greatly appreciated. Thanks in advanced