-
Notifications
You must be signed in to change notification settings - Fork 46
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
Generate normal (non-extended keys) #142
Comments
hi! I created PR adding the above to the documentation -> #143 |
also |
Thanks for the explanation, but I still have a problem. In the latest step in your document:
So the result is NOT a signing key, this is an extended signing key, because it is 128 bytes long. The normal signing keys (generated with cardano-cli by default) is 64 bytes long, and this is the only way to sign transactions with PyNaCl library. Is there any way to generate normal (non-extended) private key with cardano addresses? |
So below is signing key + chain code (64+32=96 bytes):
And below it is just signing key (64 bytes):
Please use this branch to have it : #134 |
No. Not at the moment. cardano-addresses is specifically designed to work with key derivation and extended keys. edit: As Pawel pointed above, there's ongoing work to extend support to non-extended keys in cardano-addresses and reduce the incompatibility surface with cardano-cli, but this isn't available at the moment. |
Sorry I totally confused the key length. So the normal signing key (I guess) should be 32 bytes long (64 bytes in hex encoded). If you check Cardano-cli key-gen, that also generates 32 bytes long normal secret keys (by default). The reason why I need it: in my project we are develop an automated transaction signing service in python. We are using the PyNaCl library to sign the transactions.
PyNaCl is only supports 32 bytes (128 bits) long normal signing keys. source: https://pynacl.readthedocs.io/en/latest/signing/#nacl.signing.SigningKey With cardano-cli generated signing key, I can sign and submit Cardano transactions. So somehow I need a find a way to generate normal (non-extended) 32 bytes long signatures + verification keys... |
With the following command I can easily generate normal (non-extended) signing/verification keys:
#cardano-cli address key-gen --verification-key-file test.vkey --signing-key-file test.skey
The result signing file looks like:
{
“type”: “PaymentSigningKeyShelley_ed25519”,
“description”: “Payment Signing Key”,
“cborHex”: “58205603938b6f6fa9acd09b692126fxxxxxxxx865c81f7ca1ddcb40b5d41xxxxxx”
}
Verification key file also contains a non-extended public key.
So this is a simple signing/verification key, what I can use PyNaCl library without any problems.
How can I generate similar normal (non extended) signing/verifying keys with Cardano-addresses?
I cannot find any way to generate non-extended keys from menemonic/derivation.
The text was updated successfully, but these errors were encountered: