these three following Python scripts allow you to create secure containers of personnal files, using two pairs of RSA keys. One for signing and one for encrypt your data.
Encryption scheme :
Decryption scheme :
Allow you to generate two pair of RSA keys of 2048 bits by default. Usage :
$ genkeys.py
or
$ genkeys.py 4096
for 4096 bits key lenght.
Allow you to secure one or multiple files in a secure container. RSA keys must be presents in the same directory.
$ archive.py file1 file2 ...
This will create a encrypted JSON file in the same directory.
Allow you to open one or multiple secure containers. RSA keys must be presents in the same directory.
$ unarchive.py container1 ...
- Create a secure container using AES GCM algorithm and a 256 bits key
- Encrypt the symetrical key with RSA (OAEP)
- Sign encrypted data with RSA (PSS)
- 1.0
- pycrypto-2.7a1
- Python3
- The JSON secure container is about 20% bigger than original data.
- Intermediate TAR file should be created in memory rather than on the disk.