Penumbra’s signatures are provided by
decaf377-rdsa, a variant of the Zcash
RedDSA construction instantiated using the
These are Schnorr signatures, with two additional properties relevant to
They support randomization of signing and verification keys. Spending a note requires use of the signing key that controls its spend authorization, but if the same spend verification key were included in multiple transactions, they would be linkable. Instead, both the signing and verification keys are kept secret1, and each spend description includes a randomization of the verification key, together with a proof that the randomized verification key was derived from the correct spend verification key.
They support addition and subtraction of signing and verification keys. This property is used for binding signatures, which bind zero-knowledge proofs to the transaction they were intended for and enforce conservation of value.
Let be the
decaf377 group of prime order . Keys and signatures
are parameterized by a domain . Each domain has an associated generator
. Currently, there are two defined domains: and
. The hash function is instantiated by using
blake2b with the personalization string
decaf377-rdsa---, treating the 64-byte output as the little-endian encoding of
an integer, and reducing that integer modulo .
A signing key is a scalar . The corresponding verification key is the group element .
On input message
m with signing key , verification key , and domain :
- Generate 80 random bytes.
- Compute the nonce as .
- Commit to the nonce as .
- Compute the challenge as .
- Compute the response as .
- Output the signature
R_bytes || s_bytes.
On input message
m, verification key
A_bytes, and signature
- Parse from
A_bytes, or fail if
A_bytesis not a valid (hence canonical)
R_bytes || s_bytesand the components as and , or fail if they are not valid (hence canonical) encodings.
- Recompute the challenge as .
- Check the verification equation , rejecting the signature if it is not satisfied.
The first signature domain used in Penumbra is for spend authorization signatures. The basepoint is the conventional
Spend authorization signatures support randomization:
Given a randomizer , the randomized signing key is .
Given a randomizer , the randomized verification key is .
Randomizing a signing key and then deriving the verification key associated to the randomized signing key gives the same result as randomizing the original verification key (with the same randomizer).
The second signature domain used in Penumbra is for binding signatures. The
basepoint is the result of converting
blake2b(b"decaf377-rdsa-binding") to an element and applying
decaf377’s CDH map-to-group method.
Since the verification key corresponding to the signing key is , adding and subtracting signing and verification keys commutes with derivation of the verification key, as desired.
decaf377 CDH map is unstable, so it may change in the future and change binding signatures with it.
This situation is a good example of why it’s better to avoid the terms “public key” and “private key”, and prefer more precise terminology that names keys according to the cryptographic capability they represent, rather than an attribute of how they’re commonly used. In this example, the verification key should not be public, since it could link different transactions.