fcrypter package¶
Subpackages¶
Submodules¶
fcrypter.aes module¶
-
class
fcrypter.aes.
AESCryptorEAX
[source]¶ Bases:
fcrypter.base.templates.Cryptor
AES EAX mode file encryption through use of pycryptodome AES library
- For details, see
- https://en.wikipedia.org/wiki/EAX_mode http://web.cs.ucdavis.edu/~rogaway/papers/eax.pdf
-
encrypt_file
(key, f_path, encr_fpath)[source]¶ Encrypts files, then digests. Provides plaintext & ciphertext integrity
More info about “Encrypt then MAC” in Bellare & Namprempre paper:
Authenticated Encryption: Relations among notions and analysis of the generic composition paradigm
Since AES library doesn’t provide easy way to do this in seperate actions we add 16 dummy bytes as MAC, write the encrypted content and then seek the dummy bytes and overwrite with the correct MAC
This allows us to read a file for encryption in small chunks to avoid insufficient memory errors
fcrypter.cli module¶
fcrypter.fcrypter module¶
-
fcrypter.fcrypter.
get_aes_supported_modes
()[source]¶ Returns a named tuple with supported AES cipher modes and their class name callback