feat(crypto): expose governance signing context and make shamir_threshold pub const

This commit is contained in:
CleverWild
2026-06-13 15:06:36 +02:00
parent d7950beb09
commit af13465c03
3 changed files with 19 additions and 10 deletions

View File

@@ -8,6 +8,7 @@ use rand::RngExt;
pub static CLIENT_CONTEXT: &[u8] = b"arbiter_client";
pub static OPERATOR_CONTEXT: &[u8] = b"arbiter_operator";
pub static GOVERNANCE_CONTEXT: &[u8] = b"arbiter_governance_vote";
const NONCE_SIZE: usize = 32;
@@ -90,6 +91,11 @@ impl PublicKey {
self.0
.verify_with_context(&challenge, context, &signature.0)
}
#[must_use]
pub fn verify_message(&self, message: &[u8], context: &[u8], signature: &Signature) -> bool {
self.0.verify_with_context(message, context, &signature.0)
}
}
impl Signature {