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

Function generate_public_key

bitvm/src/signatures/winternitz.rs:105–111  ·  view source on GitHub ↗

Returns the public key for the given secret key and the parameters

(ps: &Parameters, secret_key: &SecretKey)

Source from the content-addressed store, hash-verified

103
104/// Returns the public key for the given secret key and the parameters
105pub fn generate_public_key(ps: &Parameters, secret_key: &SecretKey) -> PublicKey {
106 let mut public_key = PublicKey::with_capacity(ps.total_digit_len() as usize);
107 for i in 0..ps.total_digit_len() {
108 public_key.push(public_key_for_digit(ps, secret_key, i));
109 }
110 public_key
111}
112
113/// Computes the checksum for the given message.
114fn checksum(ps: &Parameters, message_digits: &[u32]) -> u32 {

Calls 3

public_key_for_digitFunction · 0.85
total_digit_lenMethod · 0.80
pushMethod · 0.45