Struct openmls_rust_crypto::RustCrypto
source · [−]pub struct RustCrypto { /* private fields */ }
Trait Implementations
sourceimpl Debug for RustCrypto
impl Debug for RustCrypto
sourceimpl Default for RustCrypto
impl Default for RustCrypto
sourceimpl OpenMlsCrypto for RustCrypto
impl OpenMlsCrypto for RustCrypto
sourcefn supports(&self, ciphersuite: Ciphersuite) -> Result<(), CryptoError>
fn supports(&self, ciphersuite: Ciphersuite) -> Result<(), CryptoError>
Check whether the Ciphersuite
is supported by the backend or not. Read more
sourcefn supported_ciphersuites(&self) -> Vec<Ciphersuite>
fn supported_ciphersuites(&self) -> Vec<Ciphersuite>
Returns the list of supported Ciphersuite
s.
sourcefn hkdf_extract(
&self,
hash_type: HashType,
salt: &[u8],
ikm: &[u8]
) -> Result<Vec<u8>, CryptoError>
fn hkdf_extract(
&self,
hash_type: HashType,
salt: &[u8],
ikm: &[u8]
) -> Result<Vec<u8>, CryptoError>
HKDF extract. Read more
sourcefn hkdf_expand(
&self,
hash_type: HashType,
prk: &[u8],
info: &[u8],
okm_len: usize
) -> Result<Vec<u8>, CryptoError>
fn hkdf_expand(
&self,
hash_type: HashType,
prk: &[u8],
info: &[u8],
okm_len: usize
) -> Result<Vec<u8>, CryptoError>
HKDF expand. Read more
sourcefn hash(&self, hash_type: HashType, data: &[u8]) -> Result<Vec<u8>, CryptoError>
fn hash(&self, hash_type: HashType, data: &[u8]) -> Result<Vec<u8>, CryptoError>
Hash the data
. Read more
sourcefn aead_encrypt(
&self,
alg: AeadType,
key: &[u8],
data: &[u8],
nonce: &[u8],
aad: &[u8]
) -> Result<Vec<u8>, CryptoError>
fn aead_encrypt(
&self,
alg: AeadType,
key: &[u8],
data: &[u8],
nonce: &[u8],
aad: &[u8]
) -> Result<Vec<u8>, CryptoError>
AEAD encrypt with the given parameters. Read more
sourcefn aead_decrypt(
&self,
alg: AeadType,
key: &[u8],
ct_tag: &[u8],
nonce: &[u8],
aad: &[u8]
) -> Result<Vec<u8>, CryptoError>
fn aead_decrypt(
&self,
alg: AeadType,
key: &[u8],
ct_tag: &[u8],
nonce: &[u8],
aad: &[u8]
) -> Result<Vec<u8>, CryptoError>
AEAD decrypt with the given parameters. Read more
sourcefn signature_key_gen(
&self,
alg: SignatureScheme
) -> Result<(Vec<u8>, Vec<u8>), CryptoError>
fn signature_key_gen(
&self,
alg: SignatureScheme
) -> Result<(Vec<u8>, Vec<u8>), CryptoError>
Generate a signature key. Read more
sourcefn verify_signature(
&self,
alg: SignatureScheme,
data: &[u8],
pk: &[u8],
signature: &[u8]
) -> Result<(), CryptoError>
fn verify_signature(
&self,
alg: SignatureScheme,
data: &[u8],
pk: &[u8],
signature: &[u8]
) -> Result<(), CryptoError>
Verify the signature Read more
sourcefn sign(
&self,
alg: SignatureScheme,
data: &[u8],
key: &[u8]
) -> Result<Vec<u8>, CryptoError>
fn sign(
&self,
alg: SignatureScheme,
data: &[u8],
key: &[u8]
) -> Result<Vec<u8>, CryptoError>
Sign with the given parameters. Read more
sourcefn hpke_seal(
&self,
config: HpkeConfig,
pk_r: &[u8],
info: &[u8],
aad: &[u8],
ptxt: &[u8]
) -> HpkeCiphertext
fn hpke_seal(
&self,
config: HpkeConfig,
pk_r: &[u8],
info: &[u8],
aad: &[u8],
ptxt: &[u8]
) -> HpkeCiphertext
HPKE single-shot encryption of ptxt
to pk_r
, using info
and aad
.
sourcefn hpke_open(
&self,
config: HpkeConfig,
input: &HpkeCiphertext,
sk_r: &[u8],
info: &[u8],
aad: &[u8]
) -> Result<Vec<u8>, CryptoError>
fn hpke_open(
&self,
config: HpkeConfig,
input: &HpkeCiphertext,
sk_r: &[u8],
info: &[u8],
aad: &[u8]
) -> Result<Vec<u8>, CryptoError>
HPKE single-shot decryption of input
with sk_r
, using info
and
aad
. Read more
sourcefn hpke_setup_sender_and_export(
&self,
config: HpkeConfig,
pk_r: &[u8],
info: &[u8],
exporter_context: &[u8],
exporter_length: usize
) -> Result<(Vec<u8>, Vec<u8>), CryptoError>
fn hpke_setup_sender_and_export(
&self,
config: HpkeConfig,
pk_r: &[u8],
info: &[u8],
exporter_context: &[u8],
exporter_length: usize
) -> Result<(Vec<u8>, Vec<u8>), CryptoError>
HPKE single-shot setup of a sender and immediate export a secret. Read more
sourcefn hpke_setup_receiver_and_export(
&self,
config: HpkeConfig,
enc: &[u8],
sk_r: &[u8],
info: &[u8],
exporter_context: &[u8],
exporter_length: usize
) -> Result<Vec<u8>, CryptoError>
fn hpke_setup_receiver_and_export(
&self,
config: HpkeConfig,
enc: &[u8],
sk_r: &[u8],
info: &[u8],
exporter_context: &[u8],
exporter_length: usize
) -> Result<Vec<u8>, CryptoError>
HPKE single-shot setup of a receiver and immediate export a secret. Read more
sourcefn derive_hpke_keypair(&self, config: HpkeConfig, ikm: &[u8]) -> HpkeKeyPair
fn derive_hpke_keypair(&self, config: HpkeConfig, ikm: &[u8]) -> HpkeKeyPair
Derive a new HPKE keypair from a given input key material.
sourceimpl OpenMlsRand for RustCrypto
impl OpenMlsRand for RustCrypto
Auto Trait Implementations
impl RefUnwindSafe for RustCrypto
impl Send for RustCrypto
impl Sync for RustCrypto
impl Unpin for RustCrypto
impl UnwindSafe for RustCrypto
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more