Struct schnorrkel::context::XoFTranscript [−][src]
Very simple transcript construction from a modern hash fucntion.
We provide this transcript type to directly use conventional hash functions with an extensible output mode, like Shake128 and Blake2x.
We recommend using merlin::Transcript
instead because merlin
provides the transcript abstraction natively and might function
better in low memory enviroments. We therefore do not provide
conveniences like signing_context
for this.
We note that merlin already uses Keccak, upon which Shak128 is based, and that no rust implementation for Blake2x currently exists.
We caution that our transcript abstractions cannot provide the protections agsint hash collisions that Ed25519 provides via double hashing, but that prehashed Ed25519 variants loose. As such, any hash function used here must be collision resistant. We strongly recommend agsint building XOFs from weaker hash functions like SHA1 with HKDF constructions or similar.
In XoFTranscript
style, we never expose the hash function H
underlying this type, so that developers cannot circument the
domain seperartion provided by our methods. We do this to make
&mut XoFTranscript : SigningTranscript
safe.
Implementations
impl<H> XoFTranscript<H> where
H: Input + ExtendableOutput + Clone,
[src]
H: Input + ExtendableOutput + Clone,
pub fn new(h: H) -> XoFTranscript<H>
[src]
Create a XoFTranscript
from a conventional hash functions with an extensible output mode.
We intentionally consume and never reexpose the hash function
provided, so that our domain seperation works correctly even
when using &mut XoFTranscript : SigningTranscript
.
Trait Implementations
impl<H> From<H> for XoFTranscript<H> where
H: Input + ExtendableOutput + Clone,
[src]
H: Input + ExtendableOutput + Clone,
fn from(h: H) -> XoFTranscript<H>
[src]
impl<H> SigningTranscript for XoFTranscript<H> where
H: Input + ExtendableOutput + Clone,
[src]
H: Input + ExtendableOutput + Clone,
fn commit_bytes(&mut self, label: &'static [u8], bytes: &[u8])
[src]
fn challenge_bytes(&mut self, label: &'static [u8], dest: &mut [u8])
[src]
fn witness_bytes_rng<R>(
&self,
label: &'static [u8],
dest: &mut [u8],
nonce_seeds: &[&[u8]],
rng: R
) where
R: RngCore + CryptoRng,
[src]
&self,
label: &'static [u8],
dest: &mut [u8],
nonce_seeds: &[&[u8]],
rng: R
) where
R: RngCore + CryptoRng,
fn proto_name(&mut self, label: &'static [u8])
[src]
fn commit_point(
&mut self,
label: &'static [u8],
compressed: &CompressedRistretto
)
[src]
&mut self,
label: &'static [u8],
compressed: &CompressedRistretto
)
fn challenge_scalar(&mut self, label: &'static [u8]) -> Scalar
[src]
fn witness_scalar(&self, label: &'static [u8], nonce_seeds: &[&[u8]]) -> Scalar
[src]
fn witness_bytes(
&self,
label: &'static [u8],
dest: &mut [u8],
nonce_seeds: &[&[u8]]
)
[src]
&self,
label: &'static [u8],
dest: &mut [u8],
nonce_seeds: &[&[u8]]
)
Auto Trait Implementations
impl<H> RefUnwindSafe for XoFTranscript<H> where
H: RefUnwindSafe,
H: RefUnwindSafe,
impl<H> Send for XoFTranscript<H> where
H: Send,
H: Send,
impl<H> Sync for XoFTranscript<H> where
H: Sync,
H: Sync,
impl<H> Unpin for XoFTranscript<H> where
H: Unpin,
H: Unpin,
impl<H> UnwindSafe for XoFTranscript<H> where
H: UnwindSafe,
H: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> VRFSigningTranscript for T where
T: SigningTranscript,
[src]
T: SigningTranscript,
type T = T
Real underlying SigningTranscript
pub fn transcript_with_malleability_addressed(Self, &PublicKey) -> T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,