Open sirex opened 9 years ago
Generate primary and public keys and return serialized values of these keys.
For this we need a wrapper functions with following API:
serialized_private_key, serialized_public_key = generate(password) primary_key = load_private_key(serialized_private_key, password) public_key = load_public_key(serialized_public_key)
serialization.Encoding.DER serialization encoding should be used. And for the encoding use serialization.PrivateFormat.PKCS8 for private key and serialization.PublicFormat.SubjectPublicKeyInfo for public key.
serialization.Encoding.DER
serialization.PrivateFormat.PKCS8
serialization.PublicFormat.SubjectPublicKeyInfo
See: https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/
Generate primary and public keys and return serialized values of these keys.
For this we need a wrapper functions with following API:
serialization.Encoding.DER
serialization encoding should be used. And for the encoding useserialization.PrivateFormat.PKCS8
for private key andserialization.PublicFormat.SubjectPublicKeyInfo
for public key.See: https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/