add effective_key method to VerifyingKey

This method allows the group to export their tweaked
VerifyingKey, so 3rd parties can verify their signatures
without learning the taproot tweak.
This commit is contained in:
conduition 2024-03-02 21:39:17 +00:00 committed by zebra-lucky
parent e5b3f5dd90
commit 155dfa632b
1 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,13 @@ where
self.element
}
/// Return the effective signing key given the specific signing parameters
/// to be verified against. For most ciphersuites, this simply returns the
/// same verifying key unchanged.
pub fn effective_key(self, sig_params: &C::SigningParameters) -> Self {
VerifyingKey::new(<C>::effective_pubkey_element(&self, sig_params))
}
/// Check if VerifyingKey is odd
pub fn y_is_odd(&self) -> bool {
<C::Group as Group>::y_is_odd(&self.element)