struct BlindPublicKey [src]

A blind public key.

Fields

key: PublicKeyPublic key equivalent, that can used for signature verification.

Members

Source

pub const BlindPublicKey = struct { /// Public key equivalent, that can used for signature verification. key: PublicKey, /// Recover a public key from a blind version of it. pub fn unblind(blind_public_key: BlindPublicKey, blind_seed: [blind_seed_length]u8, ctx: []const u8) (IdentityElementError || NonCanonicalError || EncodingError || WeakPublicKeyError)!PublicKey { const blind_h = blindCtx(blind_seed, ctx); const inv_blind_factor = Scalar.fromBytes(blind_h[0..32].*).invert().toBytes(); const pk_p = try (try Curve.fromBytes(blind_public_key.key.bytes)).mul(inv_blind_factor); return PublicKey.fromBytes(pk_p.toBytes()); } }