We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi 👋
Firstly thanks for the work and the great library :)
Currently in your DER encoding you are not stripping any leading 0 value octets.
When generating a PKCS8 PEM from a 4096 bit rsa key using derToPKCS8PEM the top level sequence contains leading 0's in the value of its length.
derToPKCS8PEM
So for example:
30 83 00 02 23 . . . . . . .
The same key using OpenSSL will produce:
30 82 02 22
If you look at the DER spec it specifies that these should be stripped during DER encoding:
10.1 Length forms The definite form of length encoding shall be used, encoded in the minimum number of octets. [Contrast with 8.1.3.2 b).]
https://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
The text was updated successfully, but these errors were encountered:
Have you ever found a workaround to that?
Sorry, something went wrong.
No branches or pull requests
Hi 👋
Firstly thanks for the work and the great library :)
Currently in your DER encoding you are not stripping any leading 0 value octets.
When generating a PKCS8 PEM from a 4096 bit rsa key using
derToPKCS8PEM
the top level sequence contains leading 0's in the value of its length.So for example:
The same key using OpenSSL will produce:
If you look at the DER spec it specifies that these should be stripped during DER encoding:
https://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
The text was updated successfully, but these errors were encountered: