Expand description
§dco3-crypto
dco3-crypto is a wrapper around symmetric and asymmetric encryption used in DRACOON.
DRACOON is a cloud service provider - more information can be found on https://dracoon.com
Files are encrypted with AES 256 GCM using random bytes as individual key for each file.
Users have a symmetric RSA keypair (4096bit) and use the public key to encrypt the file keys for
file en- and decryption. The private key is used to decrypt file keys.
The crate is based on openssl, which allows to generate keypairs and to perform desired en- and decryption operations.
Structs§
- Crypter
- Allows chunked en- and decryption. Holds a reference to a buffer to store the mssage, processed bytes as count and the used plain file key and mode. Requires generic type annotation The type ‘C’ represents an internal handler for the encryption functions with chunking
- Dracoon
Crypto - Implements symmetric and asymmetric encryption for DRACOON by implementing traits using the openssl crate
- Encryption
Info - Represents the state of the rescue keys in a room
- FileKey
- Represents the encrypted file key Contains key, iv and tag used for decryption key, iv, and tag are base64 encoded bytes The key is additonally encrypted with public keypair encryption
- Finalized
- Open
- Plain
File Key - Represents the encrypted file key Contains key, iv and tag used for decryption key, iv, and tag are base64 encoded bytes key is the plain base64 encoded random bytes used
- Plain
User KeyPair Container - Asymmetric plain user keypair container The private key is in plain and can be used for decryption
- Private
KeyContainer - Container holding only the private key used for file key decryption
- Public
KeyContainer - Container holding only the public key used for file key encryption
- User
KeyPair Container - Asymmetric user keypair container The private key is protected via secret and needs to be decrypted for usage
Enums§
- Dracoon
Crypto Error - File
KeyVersion - Represents the version of the encrypted file key Indicates which asymmetric keypair version is required Standard is 4096 bit (2048 bit for compatibility only)
- KeyState
- Possible states of rescue keys in a room
- Plain
File KeyVersion - Represents the used cipher for the plain file key used for symmetric encryption / decryption Only AES256 GCM is currently used
- User
KeyPair Version - Represents the user keypair version Standard is 4096 bit (2048 bit for compatibility only)
Traits§
- Chunked
Encryption - Represents all functions required for a Crypter to perform chunked encryption / decryption
- Decrypt
- Trait representing necessary functions for symmetric decryption
- Decrypter
- Represents methods to return a decrypter over a generic internal C See usage of Crypter and relevant chunked encryption for Crypter<OpenSslCrypter)
- DracoonRSA
Crypto - Trait representing all functions required for asymmetric encryption
- Encrypt
- Trait representing necessary functions for symmetric encryption
- Encrypter
- Represents methods to return an enrypter over a generic internal C See usage of Crypter and relevant chunked encryption for Crypter<OpenSslCrypter)
- Private
Key - Trait to get only the private key container of either a private key or a user keypair container
- Public
Key - Trait to get only the public key container of either a public key or a user keypair container