-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Rewriting PublicKeyInfo.unwrap().dump() with PublicKeyInfo['public_key'].parsed.dump() #154
Comments
Are you dealing with different types of keys, e.g. RSA and EC? The reason this was removed from asn1crypto is that some private keys don't contain the public key in their structure, and thus the public key needs to be computed using math. Some security-minded users were concerned the process of computing the public key from the private key could allow for a side-channel attack to determine (part of, or the whole) private key. Thus, without using a cryptography library such as oscrypto, or another Python crypto library that provides access to (constant-time) functions to compute the public key from the private key, there isn't a way to handle all keys strictly within asn1crypto. |
So far looks like we've seen RSA only, because https://github.com/wbond/asn1crypto/blob/0.24.0/asn1crypto/keys.py#L1040 My usage is this. It verifies the signature of content. The certificate is for TLS. Is there any sample that can cover both case? |
Figured out:
can be replaced with:
|
Due to the change in 1.0.0, I'm rewriting
PublicKeyInfo.unwrap().dump()
withPublicKeyInfo['public_key'].parsed.dump()
. Is this right approach or any other better way?The text was updated successfully, but these errors were encountered: