Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in readPrivateKeys when the input contains both public and private keys #42

Open
tallinn1960 opened this issue Aug 5, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@tallinn1960
Copy link

Is it correct that the current version of openpgp, 3.4.0, does not support DSA/ElGamal keys, but RSA keys only?

As openpgp is crashing within the go code in

  • thread Recommendation: Create SOP implementation #43, name = 'DartWorker', stop reason = EXC_BAD_ACCESS (code=1, address=0xe0)
    frame #0: 0x00000001049e50cc Runnergithub.com/jerson/openpgp-mobile/openpgp.(*FastOpenPGP).readPrivateKeys + 124 Runnergithub.com/jerson/openpgp-mobile/openpgp.(*FastOpenPGP).readPrivateKeys:
    -> 0x1049e50cc <+124>: ldrb w6, [x6, #0xe0]
    0x1049e50d0 <+128>: cbz x6, 0x1049e50b8 ; <+104>
    0x1049e50d4 <+132>: str x3, [sp, #0x60]
    0x1049e50d8 <+136>: str x5, [sp, #0x78]

(this is on iOS)

when asked to decypt a cryptotext with a DSA/Elgamal key.

@jerson
Copy link
Owner

jerson commented Aug 5, 2022

Hi @tallinn1960 yeah you are right currently we only support RSA but Im gonna start doing a research to include more, it May require some extra time but I will notify you when that become implemented

@tallinn1960 tallinn1960 changed the title Crash when attempting to decrypt cryptotext using a DSA/ElGamal key Crash in readPrivateKeys when the input contains both public and private keys Aug 5, 2022
@tallinn1960
Copy link
Author

tallinn1960 commented Aug 5, 2022

Well, it turned out that not the key algorithm was the problem, but the mix of private and public keys in the string I gave to a verify operation. I changed the subject here accordingly.

And now suprisingly the test I wrote using a DSA/ElGamal-Key for decryption worked and produced plaintext. So there is support for those keys. Note that these type of keys is different to ECC keys, although the algorithms share some of the math

@jerson jerson closed this as completed Aug 8, 2022
@jerson jerson reopened this Aug 8, 2022
@jerson jerson added the enhancement New feature or request label Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants