Crate dco3_crypto

Crate dco3_crypto 

Source
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
DracoonCrypto
Implements symmetric and asymmetric encryption for DRACOON by implementing traits using the openssl crate
EncryptionInfo
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
PlainFileKey
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
PlainUserKeyPairContainer
Asymmetric plain user keypair container The private key is in plain and can be used for decryption
PrivateKeyContainer
Container holding only the private key used for file key decryption
PublicKeyContainer
Container holding only the public key used for file key encryption
UserKeyPairContainer
Asymmetric user keypair container The private key is protected via secret and needs to be decrypted for usage

Enums§

DracoonCryptoError
FileKeyVersion
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
PlainFileKeyVersion
Represents the used cipher for the plain file key used for symmetric encryption / decryption Only AES256 GCM is currently used
UserKeyPairVersion
Represents the user keypair version Standard is 4096 bit (2048 bit for compatibility only)

Traits§

ChunkedEncryption
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)
DracoonRSACrypto
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)
PrivateKey
Trait to get only the private key container of either a private key or a user keypair container
PublicKey
Trait to get only the public key container of either a public key or a user keypair container

Type Aliases§

ChunkedEncryptionResult
EncryptionResult