pub struct XWing1024Algo;Expand description
X-Wing ML-KEM-1024 hybrid KEM adapter.
Implementations§
Source§impl XWing1024Algo
impl XWing1024Algo
Sourcepub const ALG: Algorithm = Algorithm::XWing1024
pub const ALG: Algorithm = Algorithm::XWing1024
The algorithm selector this adapter implements.
Sourcepub fn generate_keypair() -> Result<(Vec<u8>, Zeroizing<Vec<u8>>), AlgorithmError>
pub fn generate_keypair() -> Result<(Vec<u8>, Zeroizing<Vec<u8>>), AlgorithmError>
Generate an X-Wing-1024 keypair.
Sourcepub fn encapsulate(
public_key: &[u8],
) -> Result<(Zeroizing<Vec<u8>>, Vec<u8>), AlgorithmError>
pub fn encapsulate( public_key: &[u8], ) -> Result<(Zeroizing<Vec<u8>>, Vec<u8>), AlgorithmError>
Encapsulate using the public key.
Sourcepub fn decapsulate(
ciphertext: &[u8],
secret_key: &[u8],
) -> Result<Zeroizing<Vec<u8>>, AlgorithmError>
pub fn decapsulate( ciphertext: &[u8], secret_key: &[u8], ) -> Result<Zeroizing<Vec<u8>>, AlgorithmError>
Decapsulate using the secret key.
Auto Trait Implementations§
impl Freeze for XWing1024Algo
impl RefUnwindSafe for XWing1024Algo
impl Send for XWing1024Algo
impl Sync for XWing1024Algo
impl Unpin for XWing1024Algo
impl UnsafeUnpin for XWing1024Algo
impl UnwindSafe for XWing1024Algo
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