I'm trying to move cryptographic key operations in the Monero Python module from pure Python to pynacl
which is a wrapper around libsodium
.
The first problem I stumbled upon is that Monero secret keys are 256 bit (32 bytes) while nacl.bindings.crypto_sign_ed25519_sk_to_pk
expects the secret key to be twice as large (64 bytes).
I also see that unclamped scalar is also 64-byte long. Perhaps the reason for key size difference is related to that?