pub struct SignatureHeader(/* private fields */);
Expand description
The header byte used to encode the signature metadata.
Trait Implementations§
Source§impl Clone for SignatureHeader
impl Clone for SignatureHeader
Source§fn clone(&self) -> SignatureHeader
fn clone(&self) -> SignatureHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SignatureHeader
impl Debug for SignatureHeader
Source§impl Default for SignatureHeader
impl Default for SignatureHeader
Source§fn default() -> Self
fn default() -> Self
According to section 3.11.3 in the specification 1, the signature header has the format
0cc1nnnn
where:
cc
signifies the encoding method.01
denotes using the compression encoding method and10
denotes encoding using the uncompressed method.nnnn
encodesLOG_N
.
For RPO Falcon 512 we use compression encoding and N = 512. Moreover, to differentiate the
RPO Falcon variant from the reference variant using SHAKE256, we flip the first bit in the
header. Thus, for RPO Falcon 512 the header is 10111001
Source§impl Deserializable for SignatureHeader
impl Deserializable for SignatureHeader
Source§fn read_from<R: ByteReader>(
source: &mut R,
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R, ) -> Result<Self, DeserializationError>
Reads a sequence of bytes from the provided
source
, attempts to deserialize these bytes
into Self
, and returns the result. Read moreSource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§impl PartialEq for SignatureHeader
impl PartialEq for SignatureHeader
Source§impl Serializable for &SignatureHeader
impl Serializable for &SignatureHeader
Source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes
self
into bytes and writes these bytes into the target
.Source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more
impl Eq for SignatureHeader
impl StructuralPartialEq for SignatureHeader
Auto Trait Implementations§
impl Freeze for SignatureHeader
impl RefUnwindSafe for SignatureHeader
impl Send for SignatureHeader
impl Sync for SignatureHeader
impl Unpin for SignatureHeader
impl UnwindSafe for SignatureHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more