Crate cosmian_crypto_core
source ·Expand description
This crate implements crypto primitives which are used in many other Cosmian cryptographic resources.
Re-exports§
pub use kdf::*;
Modules§
- Implements the
Serializer
andDeserializer
objects using LEB128.
Macros§
- Blake2b 512 Variable Output Hash Function.
- Blake2s 256 Hash Function with Variable Output.
- Key Derivation Function (KDF).
- Key Derivation Function (KDF).
Structs§
- Structure implementing
SymmetricCrypto
and theDEM
interfaces based on AES 128 GCM. - Structure implementing
SymmetricCrypto
and theDEM
interfaces based on AES 256 GCM. - Cached signer implementation for Ed25519. This implementation is faster than the direct implementation when signing multiple messages with the same key.
- Secret from which the private keys are derived
- A thread safe Elliptic Curve Integrated Encryption Scheme (ECIES) using
- The
EciesSalsaSealBox
struct provides Elliptic Curve Integrated Encryption Scheme (ECIES) functionality. - A thread safe Elliptic Curve Integrated Encryption Scheme (ECIES) using
- An Ed25519 keypair which is compatible with the signature crate.
- Nonce object of the given size.
- Curve Point of a Ristretto Curve25519.
- Holds a secret information of
LENGTH
bytes. - A type that holds symmetric key of a fixed size.
- An X25519 keypair which is compatible with the signature crate.
Enums§
- Error type for this crate.
- Supported RSA key length (length of the modulus)
- Supported PKCS#11 compatible key wrapping algorithms for RSA
Constants§
- Length of a Curve25519 secret in bytes.
- Length of a Ed25519 public key in bytes.
- Length of a Ristretto public key in bytes.
- Length of a serialized X25519 public key in bytes.
Traits§
- Cryptographic bytes
- Defines a DEM based on a symmetric scheme as defined in section 9.1 of the ISO 2004.
- Defines a DEM based on a symmetric scheme as defined in section 9.1 of the ISO 2004 that allows encryption and decryption in place.
- Defines a DEM based on a symmetric scheme as defined in section 9.1 of the ISO 2004 that allows encrypting and decrypting a stream.
- Elliptic Curve Integrated Encryption Scheme (ECIES) trait.
- To use with ECIES, Private keys must implement this trait. The only requirement is that their are instantiable from a random value.
- To use with ECIES, Public keys must implement this trait.
- To use with ECIES, Shared points must implement this trait.
- Trait for ECIES stream cipher.
- A Fixed Size Array of cryptographic bytes
- Defines a DEM which is instantiable from a key
- A Fixed Size Array of cryptographic bytes that can be generated from a cryptographically secure random generator.
- Secret array of bytes such as a symmetric key or an elliptic curve private key.
Functions§
- Unwrap to a plain text of variable length
- Unwrap to a plain text of a 64-bits modulo size
- Wrap a plain text of variable length
- Wrap a plain text of a 64-bits modulo size
Type Aliases§
- Use
ChaCha
with 12 rounds as cryptographic RNG. - The public key is a Curve Point