Skip to content

Commit 2a9a70c

Browse files
committed
More on key generation
1 parent 0a45ecb commit 2a9a70c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bip-schnorr.mediawiki

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,9 @@ The algorithm ''PubKey(sk)'' is defined as:
125125
* Fail if ''d = 0'' or ''d ≥ n''.
126126
* Return ''bytes(d⋅G)''.
127127
128-
Note that ''PubKey(sk) = PubKey(bytes(n - int(sk))'', so every public key has two corresponding private keys.
128+
Note that we use a very different public key format (32 bytes) than the ones used by existing systems (which typically use elliptic curve points as public keys, or 33-byte or 65-byte encodings of them). A side effect is that ''PubKey(sk) = PubKey(bytes(n - int(sk))'', so every public key has two corresponding private keys.
129129
130-
Alternatively, the public key can be created according to [https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki BIP32] which describes the derivation of 33-byte compressed public keys.
131-
In order to translate such public keys into bip-schnorr compatible keys, the first byte must be dropped.
130+
As an alternative to generating keys randomly, it is also possible and safe to repurpose existing key generation algorithms for ECDSA in a compatible way. The private keys constructed by such an algorithm can be used as ''sk'' directly. The public keys constructed by such an algorithm (assuming they use the 33-byte compressed encoding) need to be converted by dropping the first byte. Specifically, [https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki BIP32] and schemes built on top of it remain usable.
132131
133132
==== Signing ====
134133

0 commit comments

Comments
 (0)