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
Implement IntoIterator
so that
cert::insert_packets(sig)
just works.
impl IntoIterator for Unknown
Implement IntoIterator
so that
cert::insert_packets(sig)
just works.