3.6.7 Seal IetfTranscript

This commit is contained in:
Luke Parker 2023-03-01 00:42:01 -05:00
parent 5a3406bb5f
commit a42a84e1e8
No known key found for this signature in database

View file

@ -87,10 +87,13 @@ pub trait Algorithm<C: Curve>: Clone {
) -> Result<Vec<(C::F, C::G)>, ()>; ) -> Result<Vec<(C::F, C::G)>, ()>;
} }
mod sealed {
pub use super::*;
/// IETF-compliant transcript. This is incredibly naive and should not be used within larger /// IETF-compliant transcript. This is incredibly naive and should not be used within larger
/// protocols. /// protocols.
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct IetfTranscript(Vec<u8>); pub struct IetfTranscript(pub(crate) Vec<u8>);
impl Transcript for IetfTranscript { impl Transcript for IetfTranscript {
type Challenge = Vec<u8>; type Challenge = Vec<u8>;
@ -113,6 +116,8 @@ impl Transcript for IetfTranscript {
unimplemented!() unimplemented!()
} }
} }
}
pub(crate) use sealed::IetfTranscript;
/// HRAm usable by the included Schnorr signature algorithm to generate challenges. /// HRAm usable by the included Schnorr signature algorithm to generate challenges.
pub trait Hram<C: Curve>: Clone { pub trait Hram<C: Curve>: Clone {