Returns the signature of a given digit, requires the digit index to modify the secret key for each digit
(secret_key: &SecretKey, digit_index: u32, message_digit: u32)
| 77 | |
| 78 | /// Returns the signature of a given digit, requires the digit index to modify the secret key for each digit |
| 79 | pub fn digit_signature(secret_key: &SecretKey, digit_index: u32, message_digit: u32) -> HashOut { |
| 80 | let mut hash = secret_key_for_digit(secret_key, digit_index); |
| 81 | for _ in 0..message_digit { |
| 82 | hash = hash160::Hash::hash(&hash[..]); |
| 83 | } |
| 84 | *hash.as_byte_array() |
| 85 | } |
| 86 | |
| 87 | /// Returns the public key of a given digit, requires the digit index to modify the secret key for each digit |
| 88 | fn public_key_for_digit(ps: &Parameters, secret_key: &SecretKey, digit_index: u32) -> HashOut { |
no test coverage detected