1. As I understand, the private spend key is 256-bit value and this key determines exactly all other keys. Are there exactly 2^256 options when creating a wallet? i.e. does every 256-bit value can be used to generate a unique wallet? (I know that in bitcoin for example, this is not the case - 2 private keys may correspond to the same bitcoin address)
  2. When generating a wallet using the official cli wallet, every private spend key corresponds to a mnemonic seed. How does this affect the size of the set of keys that can be generated by the official cli wallet? Can it generate every possible private spend key or is the mnemonic seed mechanism limits it?

1 Answer 1

  1. That's almost right. Due to specifics of underlying elliptic cryptography, the biggest private key is l-1, where l is defined in the CN whitepaper as:

l = 2^252 + 27742317777372353535851937790883648493

Anything bigger than that will get wrapped around by performing mod l operation so you'll always end up with a private key below l.

Also, private view key doesn't have to be deterministic and you could generate it independently. It's more practical to derive it from the private spend key, though.

  1. No limits. You can represent any 256 bit number with the mnemonic and vice versa. The mnemonic scheme is an encoding. It's really the same number but in different base (1626) where each "digit" is represented by a word from the dictionary. The last word is a checksum so the mnemonic also had some error-checking integrated.
  • Thanks! And what about the uniqueness of the private spend keys: can 2 different keys correspond to the same address (assuming the view keys are derived from the spend keys)?
    – Jona
    Apr 2, 2017 at 11:49
  • 1
    I don't think so but I'm not 100% sure. In Monero, a private key is "how many times the curve basepoint (G) is added to itself", and the public key is the x-coordinate so it should be 1-to-1. Maybe this would be of interest to you: andrea.corbellini.name/2015/05/17/…
    – JollyMort
    Apr 2, 2017 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.