All public key algorithms are based on the trapdoor function , that is, mathematical constructs that are "easily" calculated in one way, but "difficult" if you do not have additional information (used as a private key), in which case the opposite becomes "easy" .
“Easy” and “hard” are simply high-quality adjectives that are always more formally defined in terms of computational complexity . "Hard" very often refers to calculations that cannot be solved in polynomial time O (n x ) for some fixed x and where n is the input.
In the case of RSA, the “light” function is a modular exponentiation of C = M e mod N, where factors N are kept secret. The “tough” problem is to find the e-th root of C (i.e., M). Of course, “hard” does not mean that it is always difficult, but (intuitively) that increasing the size of N by a certain factor increases complexity by a much larger factor.
The sizes of the recommended module (2048 bits or 617 decimal digits) refer to the available computing power at the moment, so if you stick to them, you are sure that it will be extremely expensive for an attacker to break it. For more details, I should direct you to a brilliant answer to .SE cryptography (go and upvote: -)).
Finally, in order to have a hatch, N is constructed to be a composite number. This theory, in order to increase productivity, N can have more than two factors, but the general safety rule is that all factors must be balanced and have approximately the same size. This means that if you have K factors and N bits are B bits, each factor is approximately B / K bits longs.
This problem to solve is not the same as the problem of the whole factorization problem . The two are related in that if you can determine the factor N, you can calculate the private key by repeating what the side that generated the key did. As a rule, the exponent e used is very small (3); it cannot be ruled out that someday someone will develop an algorithm for calculating the e-th without factoring N.
EDIT: Fixed number of decimal digits for RSA key module with a length of 2048 bits.
SquareRootOfTwentyThree
source share