- 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)
- 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?
- That's almost right. Due to specifics of underlying elliptic cryptography, the biggest private key is
lis 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
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.
- 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.