One-Way Functions to Encrypt and Decrypt Messages
Third condition of the functions that facilitates computer security
In the previous article, we explained that a function that has a corresponding inverse function is especially useful for encrypting information. Three examples of known functions that have an inverse are:
Linear as: Y = -4 X + 3 Domain= the Reals
Cubic: Y = X3 + 2 Domain= the Reals
Radicals: Y = X1/2 Domain= Reals greater than or equal to zero
The drawback is that these functions are easy to encrypt and decrypt.
One-way functions
We will say that a function is unidirectional if once we calculate a value of Y, it is excessively difficult for another person to determine the value of X from where it originated:
Unidirectionality is the third condition for a function to be suitable for encrypting our information.
The functions that meet this condition are exponential functions and their logarithmic inverse.
Exponential function
The exponential function has a base (b) and an exponent (x), the exponent tells how often to multiply the base by itself: Y = bX
Y = 10X, the base is 10 and the exponent is X:
If X=1, Y = 10(1) = 10
If X=2, Y = 10(2) = 100
Other values are:
Y = 2X, the base is 2 and the exponent is X:
If X=1, Y = 2(1) = 2
If X=2, Y = 2(2) = 4
Other values are:
Y = eX where e = 2.71828 which is an approximate value.
Note that in this case it is not so easy to compute the Y values.
Logarithmic function
Definition: Y = Log b X
Y = Log 10 X; to determine the value of Y, express X as a power of 10. The result Y is the exponent:
Y = Log10 (10)1 = 1
Y = Log10(100) = Log10(10)2 = 2
Y = Log 2 X; to determine the value of Y, express X as a power of 2. The result is the exponent:
Y = Log e X; to determine the value of Y, we must express X as a power of e = 2.71828. The result is the exponent:
Observations:
1. The calculation of the powers of exponential functions in the three examples proved to be surprisingly easy and practical.
2. When we worked with the logarithmic functions, it was not easy and practical to solve it and in the case of the logarithm with base = e, it was more entertaining.
In the case of the exponential function Y = 2e30X If X= 1:
Y = 2e30 results in an enormous number.
And working with the respective inverse function Y = (Log e X) /30(1+ loge2it is even more difficult (only with advanced mathematical methods). In practice, cryptography uses huge numbers as exponents, such as:
19753737373798342475993456729120034581093746524476
Therefore, finding the value of X (1) from the inverse value (2e30) will be excessively difficult for an attacker, but it is good for our security.
Conclusion:
Exponential and logarithmic functions are the right ones for encrypting and decrypting data and information, because they are unidirectional, make our job easier, but increase the difficulty for an attacker.
In the next article I will explain how modular mathematics makes cryptography the key to computer security by making encryption and decryption even easier but more difficult for an attacker.