pub struct Unknown { /* private fields */ }
Expand description
Holds an unknown packet.
This is used by the parser to hold packets that it doesn’t know how to process rather than abort.
This packet effectively holds a binary blob.
A note on equality
Two Unknown
packets are considered equal if their tags and their
bodies are equal.
Implementations
sourceimpl Unknown
impl Unknown
sourcepub fn hash_algo_security(&self) -> HashAlgoSecurity
pub fn hash_algo_security(&self) -> HashAlgoSecurity
The security requirements of the hash algorithm for self-signatures.
A cryptographic hash algorithm usually has three security properties: pre-image resistance, second pre-image resistance, and collision resistance. If an attacker can influence the signed data, then the hash algorithm needs to have both second pre-image resistance, and collision resistance. If not, second pre-image resistance is sufficient.
In general, an attacker may be able to influence third-party signatures. But direct key signatures, and binding signatures are only over data fully determined by signer. And, an attacker’s control over self signatures over User IDs is limited due to their structure.
These observations can be used to extend the life of a hash algorithm after its collision resistance has been partially compromised, but not completely broken. For more details, please refer to the documentation for HashAlgoSecurity.
Trait Implementations
sourceimpl Any<Unknown> for Packet
impl Any<Unknown> for Packet
sourcefn downcast(self) -> Result<Unknown, Packet>
fn downcast(self) -> Result<Unknown, Packet>
Attempts to downcast to T
, returning the packet if it fails. Read more
sourcefn downcast_ref(&self) -> Option<&Unknown>
fn downcast_ref(&self) -> Option<&Unknown>
Attempts to downcast to &T
, returning None
if it fails. Read more
sourcefn downcast_mut(&mut self) -> Option<&mut Unknown>
fn downcast_mut(&mut self) -> Option<&mut Unknown>
Attempts to downcast to &mut T
, returning None
if it fails. Read more
sourceimpl IntoIterator for Unknown
impl IntoIterator for Unknown
Implement IntoIterator
so that
cert::insert_packets(sig)
just works.
sourceimpl MarshalInto for Unknown
impl MarshalInto for Unknown
sourcefn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the maximal length of the serialized representation. Read more
sourcefn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serializes into the given buffer. Read more
sourceimpl TryFrom<Packet> for Unknown
impl TryFrom<Packet> for Unknown
impl Eq for Unknown
Auto Trait Implementations
impl RefUnwindSafe for Unknown
impl Send for Unknown
impl Sync for Unknown
impl Unpin for Unknown
impl UnwindSafe for Unknown
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more