0

I have been studying data compression for a while. For educational purposes, after a lot of reading, I managed to create a software that performs encryption and authentication using AES256-GCM. However, I have now reached a point after which I cannot find a possible answer and this is confusing me.

My software allows the user to choose the "hardness" of the encryption, a value ranging from 0% to 100% (a scale). Nonetheless, I have not managed exactly how I could mingle the logic of "hardness" with the logic of AES. Yes, I have a lot of ideas about playing with the key, the IV, the resulting data and so on, but a point I have learned on this area is that you should never reinventing the well when there is already studies on the same aspects and whose results had been checked and rechecked over and over and over again.

Therefore, what would be the best way to perform such work? I seek for theory, not necessarily coding.

SonicMens
  • 23
  • 1

3 Answers3

7

This begs the question, why would you in any real-world circumstance wish to reduce the difficulty for an attacker to break your cryptosystem?

To answer your question practically, the only reasonable way I can think of to accomplish this is to simply reduce the entropy in the key. At 100%, all 128 bits of the key are used. At 50%, 64 bits of the key are used, and the rest set to some static value (e.g., 0). At 25%, 32 bits of the key are used, and so on.

That said, I want to reiterate that there is no reason I can possibly conceive of to support such a feature, outside of sheer curiosity.

Edit: Note that this will result in an exponential decrease in security, which maps well onto how cryptographers typically think of the security of a system. Modern ciphers like AES-128 so strong that a 100-fold reduction in difficulty to break still leaves brute force well outside the realm of conceivable human feasibility ($\frac{2^{128}}{10^{2}} \equiv 2^{121}$).

Stephen Touset
  • 11,162
  • 1
  • 39
  • 53
2

The Encryption is not likely Compression where one can choose Normal, High or Low or something from scale of 0-100 as you mentioned.

If you really want to do it, you can think of it in two ways

  1. Reduce the keyspace, as already mentioned in an above answer
  2. Reduce the Rounds.

But these both will lead to a situation where you may end up in a breakthrough (security is compromised). Because keyspace and number of rounds are set after carefull analysis to provide a required level of security margin below which you should never go.

Another case can be, you can offer the user different Algorithms from which they can select like AES, Twofish, Camellie, CAST-256, SMS4 etc

crypt
  • 2,522
  • 22
  • 33
-4

Take a look https://en.wikipedia.org/wiki/Triple_DES

It is original DES with three different keys successively 3 × 56 = 168. In such way length of key increased 3x, but hardness much more.

You would use google for "Triple AES". My first try give me this:

Would a "Triple AES" (in the sense of how Triple Des works) serve for a dramatic increase in safety?