Skip to content

High Security Encryption/Decryption of Files based on AES-256-OFB, AES-256-CTR, CAMELLIA-256 (768 bits)

License

Notifications You must be signed in to change notification settings

samuelelandi/cryptolandi

Repository files navigation

Cryptolandi - Symmetric Encryption of Files - 768 bits security

Cryptolandi encrypts/decrypts files for the highest security level with 768 bits symmetric encryption.

Preface

Quantum processors are in sight and the whole civil society is still using AES, an algorithm invented more than 20 years ago.
The scientific literature says that AES 256 should not be broken from Quantum processors, I would not be so sure.
AES uses at the maximum keys with 256 bit lenght. On the hidden side, there are leaked information reporting how the most powerful governments developed their own algorithms with higher security, reaching for sure at least 512 bits.
Many cyber experts state that increasing the number of bits would slow down the communication protocols at the point that could become impossible to make a simple video call and it would be necessary a specific new algorithm to increase the security keeping the same speed for execution.
It looks that we, as common human beings, should continue to use AES-256 with peace of mind.
Someone could try to invent a new algorithm, in this case we need to verify it very well with the contribution of many researcher and years of serious work.
This application is instead a smart way to improve the security level of files encryption, increasing the key size and trusting the strenght and reliability of multiple well known algorithms.

General Info

The modern phones and computers are so fast that you can apply 3 layers of encryption without visible delay, even for real time protocols, like those used for video/audio calls. I had direct experience making this product, https://www.kryptophone.ae which has a specific version using 3 layers of symmetric encryption and perfect video/audio quality.
I've applied multiple encryption layers using longer keys and different algorithms, at least if one algorithm is broken algebraically, the others could still guarantee the safety.
If you make a direct comparison in term of Mbits/ throughput, AES-256 always wins against a 3 layers encryption, anyway the important point are the visible effects in the user experience and nobody can see the difference between 1 layers or 3 layers even in a real time video call.

How it works

Cryptolandi (or Cryptoland if you prefer), makes the following:

  • Each file is encrypted initially by AES 256 bit.

  • The encrypted file with AES 256 is encrypted again by Chacha20 256 bit.

  • The resulting double encrypted file is encrypted again by CAMELLIA 256 bit. For each encryption step, a different key of 256 bit is used, achieving a security level of 768 bits by 3 different encryption algorithms. This is not a new encryption algorithm, it's a smart application of well-known encryption algorithms to increase the security level.

  • The main weakness may be the password that you will supply for the encryption, your security is in your hands. The password is hashed by sha3-512 bits algorithm, thousands up to millions of times to expand it and derive the required 768 bits key (3 keys of 256 bits).

  • The Init Vectors (IV) required from the algorithm are generated randomly because they must be always different, and they are stored at the bottom of the encrypted file. The size of the encrypted file is a bigger of only 64 bytes compared to the file of origin.

  • This program uses temporary files that are removed at the end of the process.

  • The speed even with big files is very high, I've encrypted 10 GB in 18 seconds in a 8 core machine and Flash memory as storage, not bad right?

  • The variables are overwritten with 0x0 before closing the program.

  • AES-256 make use of GCM chaining method, a TAG of 16 bytes is generated and used to verify the consistency of the decryption by this signature (HMAC).

How to build

This utility works on Linux and it has been tested on Debian 10 and Raspberry OS.
Install the required libraries and compilers:

./setup.sh

compile the program

./build.sh

How to run:

Example to ENCRYPT a file:

cryptolandi -e originfilename encryptedfilename password

Example to DECRYPT a file:

cryptolandi -d encryptedfilename originfilename  password

About

High Security Encryption/Decryption of Files based on AES-256-OFB, AES-256-CTR, CAMELLIA-256 (768 bits)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published