Function tor_llcrypto::pk::keymanip::blind_pubkey
source · pub fn blind_pubkey(
pk: &VerifyingKey,
h: [u8; 32]
) -> Result<VerifyingKey, BlindingError>
Available on crate feature
hsv3-client
only.Expand description
Blind the ed25519 public key pk
using the blinding factor
h
, and return the blinded public key.
This algorithm is described in rend-spec-v3.txt
, section A.2.
In the terminology of that section, the value pk
corresponds to
A
, and
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 public key.
§Availability
This function is only available when the hsv3-client
feature is enabled.