In our ed25519 key blinding code we have a few pieces that are not in the spec. At the very least we have the following constant strings that get hashed, which are not mentioned in the spec:
Also, starting in #22006 (moved) we validate received ed25519 pubkeys so we are not
afraid that a received onion address pubkey will have a torsion component
(hence clearing the lowest three bits is not necessary).
I actually don't think that clamping there is a terrible thing to do, but it
reduces the strength of the blinding factor by 3 bits or something. I'm not
sure if we should go ahead and remove the clamping or not, but we should
probably mention it in the spec if we do keep it.
The Tor ed25519 implementation also adds a constant string to the hash input of
the extended secret key form like this:
In prop224 we actually don't need KH as part of the key expansion procedure. In the legacy design we used KH as a key confirmation of the key expansion, however in prop224 we have a whole mac just for this AUTH_INPUT_MAC. So we actually don't need KH in the following paragraph:
The hidden service and its client need to derive crypto keys from the NTOR_KEY_SEED part of the handshake output. To do so, they use the KDF construction as follows: K = KDF(NTOR_KEY_SEED | m_hsexpand, HASH_LEN * 3 + S_KEY_LEN * 2) The first HASH_LEN bytes of K form KH; the next HASH_LEN form the forward digest Df; the next HASH_LEN bytes form the backward digest Db; the next S_KEY_LEN bytes form Kf, and the final S_KEY_LEN bytes form Kb. Excess bytes from K are discarded.