-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Converting Ed25519, Ed448 keys fails if encoding has leading 0 #1690
Comments
Some more insights: Key conversion fails, if the encoding ( If I remove the BigIntegers call and instead pass I suppose this method call is there for a reason though? Edit: The bug also happens for Ed25519 btw. |
Hey!
I noticed, that generating Ed448 keys is not totally reliable and fails in 0.5% of the time.
Apparently, in some cases, in this block, the type is identified as Ed448 by looking at
enc[8]
, but the prefix array does not match the header bytes of theenc
array, causing this check to fail.An example:
The conversion fails for a key with the following encoding
Note the mismatch in octets with index 1 and 10.
Contrary, a valid key:
The text was updated successfully, but these errors were encountered: