MCPcopy Create free account
hub / github.com/BitVM/BitVM / generate_public_key

Method generate_public_key

bitvm/src/signatures/public.rs:73–79  ·  view source on GitHub ↗

Generates a public key for the given `secret_key`.

(secret_key: &WinternitzSecret)

Source from the content-addressed store, hash-verified

71
72 /// Generates a public key for the given `secret_key`.
73 fn generate_public_key(secret_key: &WinternitzSecret) -> Self::PublicKey {
74 let pubkey_vec = winternitz::generate_public_key(&Self::PARAMETERS, secret_key);
75 match Self::PublicKey::try_from(pubkey_vec) {
76 Ok(public_key) => public_key,
77 _ => unreachable!(),
78 }
79 }
80
81 /// Generates a signature for the given `secret_key` and `message`,
82 /// in form of a Bitcoin witness.

Callers

nothing calls this directly

Calls 1

generate_public_keyFunction · 0.85

Tested by

no test coverage detected