Closed kwantam closed 2 years ago
Ah, just wanted add a note: Bram Cohen brought to my attention that Chia has already deployed the v2 spec. That's what got me thinking about this.
See #28, #26, and #25 for prior discussions of KeyGen.
BTW: in discussing "how to pick a good salt," we probably want to mention that HKDF analysis really wants a uniform random bitstring, so that is RECOMMENDED. (But it should not be REQUIRED, because if one willing to make stronger assumptions about H
then one can use a "structured" bitstring as in v2. In v4 the statement was just that we didn't want to build those stronger assumptions into the spec.)
I propose modifying the KeyGen procedure to make the salt application specified. This has a few benefits:
salt = H(salt)
invocation to after the HKDF invocation in the pseudocode, which naturally builds in a very very minor optimization.To be clear, the goal is to maintain full spec and implementation compatibility with v4. Here's a proposed change to keygen:
Notice that, by specifying
salt = H("BLS-SIG-KEYGEN-SALT-")
, the above is compatible with v4; whereas by specifying `salt = "BLS-SIG-KEYGEN-SALT-", it is compatible with v2. We can also add suggestions for how to pick a good salt.