Crate crypt_guard
source ·Modules§
- The
cipher_aesmodule implements the AES (Advanced Encryption Standard) algorithm for secure data encryption and decryption, providing a robust symmetric key cryptography solution. - The
cipher_xchachamodule offers encryption and decryption functionalities using the XChaCha20 algorithm, extending ChaCha for higher nonce sizes and additional security. - A module for handling file-related metadata and operations in a cryptographic context.
- The
signaturemodule provides functionality for generating, managing, and verifying digital signatures, supporting various algorithms including post-quantum secure schemes.
Structs§
- Represents the AES cipher for encryption and decryption processes. It holds cryptographic information and a shared secret for operations.
- Represents the ChaCha cipher for encryption and decryption processes. It includes cryptographic information, a nonce for the operation, and a shared secret.
- Contains information necessary for performing cryptographic operations, including the content to be encrypted or decrypted, a passphrase, metadata defining the operation context, and a flag indicating whether the content should be saved securely.
- Holds metadata for cryptographic operations, specifying the process, encryption type, key encapsulation mechanism, and content type.
- Manages metadata related to a file, including its location, type, and state within a cryptographic context.
- Represents a cryptographic key, including its type and raw content.
- Implementation for Kyber 512 variant.
- Implementation for Kyber 768 variant.
- Implementation for Kyber 1024 variant.
- A structure to manage cryptographic keys and operations for the Kyber algorithm. It encapsulates the public key, secret key, ciphertext, and shared secret.
- Represents a generic Kyber structure with templated parameters for process status, Kyber size, content status, and algorithm parameter.
- Represents the data structure for Kyber algorithm, including key and nonce.
- Represents a Dilithium signature mechanism including the data, signature, and secret key components necessary for signing and verification processes.
- Represents a Falcon signature mechanism including the data, signature, and secret key components necessary for signing and verification processes.
Enums§
- Enumerates the types of content that can be encrypted or decrypted, such as messages or files.
- Enumerates the cryptographic mechanisms supported, such as AES and XChaCha20.
- Enumerates possible states a file can be in, especially in the context of encryption and decryption.
- Enumerates the types of files recognized by the cryptographic system.
- Enumerates the key encapsulation mechanisms supported, such as Kyber1024.
- Enumerates the types of cryptographic keys supported by the system.
- Enum representing Kyber variants.
- Enumerates the cryptographic processes, such as encryption and decryption.
Traits§
- Defines the functionalities for cryptographic operations, providing abstract methods for encryption and decryption that need to be implemented by specific cryptographic algorithms.
- Trait for Kyber cryptographic functions.
- Trait for implementing key management functions. This trait provides an interface for key pair generation, encapsulation/decapsulation of secrets, and key manipulation (such as setting and getting key values).
- Trait to specify Kyber size variants.