Function tor_llcrypto::pk::keymanip::blind_keypair

source ·
pub fn blind_keypair(
    keypair: &ExpandedKeypair,
    h: [u8; 32]
) -> Result<ExpandedKeypair, BlindingError>
Available on crate feature hsv3-service only.
Expand description

Blind the ed25519 secret key sk using the blinding factor h, and return the blinded secret key.

This algorithm is described in rend-spec-v3.txt, section A.2. h is the value h = H(...), before clamping.

Note that the approach used to clamp h to a scalar means that different possible values for h may yield the same output for a given pk. This and other limitations make this function unsuitable for use outside the context of rend-spec-v3.txt without careful analysis.

§Errors

This function can fail if the input is not actually a valid Ed25519 secret key.

§Availability

This function is only available when the hsv3-client feature is enabled.