dfvfs.encryption package
Submodules
dfvfs.encryption.aes_decrypter module
The AES decrypter implementation.
- class dfvfs.encryption.aes_decrypter.AESDecrypter(cipher_mode=None, initialization_vector=None, key=None, **kwargs)[source]
Bases:
CryptographyBlockCipherDecrypter
AES decrypter using Cryptography.
- ENCRYPTION_METHOD = 'aes'
dfvfs.encryption.blowfish_decrypter module
The Blowfish decrypter implementation.
- class dfvfs.encryption.blowfish_decrypter.BlowfishDecrypter(cipher_mode=None, initialization_vector=None, key=None, **kwargs)[source]
Bases:
CryptographyBlockCipherDecrypter
Blowfish decrypter using Cryptography.
- ENCRYPTION_METHOD = 'blowfish'
dfvfs.encryption.decrypter module
The decrypter interface.
- class dfvfs.encryption.decrypter.CryptographyBlockCipherDecrypter(algorithm=None, cipher_mode=None, initialization_vector=None, **kwargs)[source]
Bases:
Decrypter
Block cipher decrypter using Cryptography.
- Decrypt(encrypted_data, finalize=False)[source]
Decrypts the encrypted data.
- Parameters
encrypted_data (bytes) – encrypted data.
finalize (Optional[bool]) – True if the end of data has been reached and the cipher context should be finalized.
- Returns
decrypted data and remaining encrypted data.
- Return type
tuple[bytes, bytes]
- class dfvfs.encryption.decrypter.Decrypter(**kwargs)[source]
Bases:
object
Decrypter interface.
- abstract Decrypt(encrypted_data, finalize=False)[source]
Decrypts the encrypted data.
- Parameters
encrypted_data (bytes) – encrypted data.
finalize (Optional[bool]) – True if the end of data has been reached and the cipher context should be finalized.
- Returns
decrypted data and remaining encrypted data.
- Return type
tuple[bytes, bytes]
dfvfs.encryption.des3_decrypter module
The triple DES decrypter implementation.
- class dfvfs.encryption.des3_decrypter.DES3Decrypter(cipher_mode=None, initialization_vector=None, key=None, **kwargs)[source]
Bases:
CryptographyBlockCipherDecrypter
Triple DES decrypter using Cryptography.
- ENCRYPTION_METHOD = 'des3'
dfvfs.encryption.manager module
The encryption manager.
- class dfvfs.encryption.manager.EncryptionManager[source]
Bases:
object
Encryption manager.
- classmethod DeregisterDecrypter(decrypter)[source]
Deregisters a decrypter for a specific encryption method.
- Parameters
decrypter (type) – decrypter class.
- Raises
KeyError – if the corresponding decrypter is not set.
- classmethod GetDecrypter(encryption_method, **kwargs)[source]
Retrieves the decrypter object for a specific encryption method.
- Parameters
encryption_method (str) – encryption method identifier.
kwargs (dict) – keyword arguments depending on the decrypter.
- Returns
decrypter or None if the encryption method does not exists.
- Return type
- Raises
CredentialError – if the necessary credentials are missing.
dfvfs.encryption.rc4_decrypter module
The RC4 decrypter implementation.
- class dfvfs.encryption.rc4_decrypter.RC4Decrypter(key=None, **kwargs)[source]
Bases:
Decrypter
RC4 decrypter using Cryptography.
- Decrypt(encrypted_data, finalize=False)[source]
Decrypts the encrypted data.
- Parameters
encrypted_data (bytes) – encrypted data.
finalize (Optional[bool]) – True if the end of data has been reached and the cipher context should be finalized.
- Returns
decrypted data and remaining encrypted data.
- Return type
tuple[bytes,bytes]
- ENCRYPTION_METHOD = 'rc4'
Module contents
Imports for the encryption manager.