Struct hpke_rs_rust_crypto::HpkeRustCrypto
source · pub struct HpkeRustCrypto {}
Expand description
The Rust Crypto HPKE Provider
Trait Implementations§
source§impl Debug for HpkeRustCrypto
impl Debug for HpkeRustCrypto
source§impl Display for HpkeRustCrypto
impl Display for HpkeRustCrypto
source§impl HpkeCrypto for HpkeRustCrypto
impl HpkeCrypto for HpkeRustCrypto
source§fn supports_kdf(_: KdfAlgorithm) -> Result<(), Error>
fn supports_kdf(_: KdfAlgorithm) -> Result<(), Error>
Returns an error if the KDF algorithm is not supported by this crypto provider.
source§fn supports_kem(alg: KemAlgorithm) -> Result<(), Error>
fn supports_kem(alg: KemAlgorithm) -> Result<(), Error>
Returns an error if the KEM algorithm is not supported by this crypto provider.
source§fn supports_aead(alg: AeadAlgorithm) -> Result<(), Error>
fn supports_aead(alg: AeadAlgorithm) -> Result<(), Error>
Returns an error if the AEAD algorithm is not supported by this crypto provider.
source§fn kdf_extract(alg: KdfAlgorithm, salt: &[u8], ikm: &[u8]) -> Vec<u8>
fn kdf_extract(alg: KdfAlgorithm, salt: &[u8], ikm: &[u8]) -> Vec<u8>
KDF Extract
source§fn kdf_expand(
alg: KdfAlgorithm,
prk: &[u8],
info: &[u8],
output_size: usize
) -> Result<Vec<u8>, Error>
fn kdf_expand( alg: KdfAlgorithm, prk: &[u8], info: &[u8], output_size: usize ) -> Result<Vec<u8>, Error>
KDF Expand
source§fn kem_derive(alg: KemAlgorithm, pk: &[u8], sk: &[u8]) -> Result<Vec<u8>, Error>
fn kem_derive(alg: KemAlgorithm, pk: &[u8], sk: &[u8]) -> Result<Vec<u8>, Error>
KEM Derive
source§fn kem_derive_base(alg: KemAlgorithm, sk: &[u8]) -> Result<Vec<u8>, Error>
fn kem_derive_base(alg: KemAlgorithm, sk: &[u8]) -> Result<Vec<u8>, Error>
KEM Derive with base
source§fn kem_key_gen(
alg: KemAlgorithm,
prng: &mut Self::HpkePrng
) -> Result<Vec<u8>, Error>
fn kem_key_gen( alg: KemAlgorithm, prng: &mut Self::HpkePrng ) -> Result<Vec<u8>, Error>
KEM Key generation
source§fn kem_validate_sk(alg: KemAlgorithm, sk: &[u8]) -> Result<Vec<u8>, Error>
fn kem_validate_sk(alg: KemAlgorithm, sk: &[u8]) -> Result<Vec<u8>, Error>
Validate a secret key for its correctness.
source§fn aead_seal(
alg: AeadAlgorithm,
key: &[u8],
nonce: &[u8],
aad: &[u8],
msg: &[u8]
) -> Result<Vec<u8>, Error>
fn aead_seal( alg: AeadAlgorithm, key: &[u8], nonce: &[u8], aad: &[u8], msg: &[u8] ) -> Result<Vec<u8>, Error>
AEAD encrypt.
source§fn aead_open(
alg: AeadAlgorithm,
key: &[u8],
nonce: &[u8],
aad: &[u8],
msg: &[u8]
) -> Result<Vec<u8>, Error>
fn aead_open( alg: AeadAlgorithm, key: &[u8], nonce: &[u8], aad: &[u8], msg: &[u8] ) -> Result<Vec<u8>, Error>
AEAD decrypt.
§type HpkePrng = HpkeRustCryptoPrng
type HpkePrng = HpkeRustCryptoPrng
The PRNG implementation returned in
HpkeCrypto::prng()
.source§fn kdf_digest_length(alg: KdfAlgorithm) -> usize
fn kdf_digest_length(alg: KdfAlgorithm) -> usize
Get the length of the output digest.
source§fn aead_key_length(alg: AeadAlgorithm) -> usize
fn aead_key_length(alg: AeadAlgorithm) -> usize
Get key length for AEAD. Read more
source§fn aead_nonce_length(alg: AeadAlgorithm) -> usize
fn aead_nonce_length(alg: AeadAlgorithm) -> usize
Get key length for AEAD. Read more
source§fn aead_tag_length(alg: AeadAlgorithm) -> usize
fn aead_tag_length(alg: AeadAlgorithm) -> usize
Get key length for AEAD. Read more
Auto Trait Implementations§
impl RefUnwindSafe for HpkeRustCrypto
impl Send for HpkeRustCrypto
impl Sync for HpkeRustCrypto
impl Unpin for HpkeRustCrypto
impl UnwindSafe for HpkeRustCrypto
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