Closed PraneethJay closed 1 week ago
Hello Praneeth,
We did not have implemented yet the pyo3 bindings to generate RSA keys from cloudproof_py
. Currently, only Covercrypt keys are supported - those are specific keys allowing fine-grained partitioning during encryption.
About your python code, your function generate_and_store_keys
generate Covercrypt keys (not RSA keys) that are exported as raw bytes (not DER) through the method to_bytes()
and cannot be converted to PEM.
If you're interested by RSA or EC keys generation in python, we could eventually plan to implement them.
I hope this assistance has been helpful to you. We're closing the issue as there are no plans to support RSA or EC keys in cloudproof_python. Feel free to contribute if necessary.
Cannot convert retrieved keys to PEM format and not working for encryption also. The issue is in retrieved keys. Is there have any wrap ? Do you have any suggestions ?
Execute Result: Public Key UID: 7621c826-988a-495a-8bc5-2fcea67ed8ca Private Key UID: a3e0be46-c481-42c1-83bb-205d3409caa0 Keys stored with policy Failed to convert DER key to PEM format: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [<OpenSSLError(code=109052027, lib=13, reason=123, reason_text=header too long)>]) Failed to convert private key to PEM format.