mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
3.6.7 Seal IetfTranscript
This commit is contained in:
@@ -87,11 +87,14 @@ pub trait Algorithm<C: Curve>: Clone {
|
||||
) -> Result<Vec<(C::F, C::G)>, ()>;
|
||||
}
|
||||
|
||||
/// IETF-compliant transcript. This is incredibly naive and should not be used within larger
|
||||
/// protocols.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct IetfTranscript(Vec<u8>);
|
||||
impl Transcript for IetfTranscript {
|
||||
mod sealed {
|
||||
pub use super::*;
|
||||
|
||||
/// IETF-compliant transcript. This is incredibly naive and should not be used within larger
|
||||
/// protocols.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct IetfTranscript(pub(crate) Vec<u8>);
|
||||
impl Transcript for IetfTranscript {
|
||||
type Challenge = Vec<u8>;
|
||||
|
||||
fn new(_: &'static [u8]) -> IetfTranscript {
|
||||
@@ -112,7 +115,9 @@ impl Transcript for IetfTranscript {
|
||||
fn rng_seed(&mut self, _: &'static [u8]) -> [u8; 32] {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
}
|
||||
pub(crate) use sealed::IetfTranscript;
|
||||
|
||||
/// HRAm usable by the included Schnorr signature algorithm to generate challenges.
|
||||
pub trait Hram<C: Curve>: Clone {
|
||||
|
||||
Reference in New Issue
Block a user