Struct sequoia_openpgp::packet::Unknown
source · 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§
source§impl 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.
sourcepub fn error(&self) -> &Error
pub fn error(&self) -> &Error
Gets the unknown packet’s error.
This is the error that caused parsing or processing to abort.
sourcepub fn set_error(&mut self, error: Error) -> Error
pub fn set_error(&mut self, error: Error) -> Error
Sets the unknown packet’s error.
This is the error that caused parsing or processing to abort.
sourcepub fn into_error(self) -> Error
pub fn into_error(self) -> Error
Returns the error.
Trait Implementations§
source§impl Any<Unknown> for Packet
impl Any<Unknown> for Packet
source§impl IntoIterator for Unknown
impl IntoIterator for Unknown
Implement IntoIterator
so that
cert::insert_packets(sig)
just works.
source§impl MarshalInto for Unknown
impl MarshalInto for Unknown
source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
source§impl PartialEq for Unknown
impl PartialEq for Unknown
source§impl TryFrom<Packet> for Unknown
impl TryFrom<Packet> for Unknown
impl Eq for Unknown
Auto Trait Implementations§
impl Freeze for Unknown
impl RefUnwindSafe for Unknown
impl Send for Unknown
impl Sync for Unknown
impl Unpin for Unknown
impl UnwindSafe for Unknown
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)