Answer the question
In order to leave comments, you need to log in
How to encrypt string with rsa algorithm?
Hello, I understand the rsa algorithm itself, but I don't understand its software implementation.
After all, when I encrypt a variable of type char, then my value should be about 2 thousand, but char lies within the boundaries of [0; 255], which is why when I assign about 2 thousand to a variable, it is taken modulo 256 and it becomes impossible to decrypt the ciphertext .
Answer the question
In order to leave comments, you need to log in
Well, actually, it would not be bad for you to get acquainted with long arithmetic . Well, you drive data into it, because data is just bits, a vector of ones and zeros. And char is a vector of bits of length 8. There is no limit in long arithmetic and everything is limited by the modulus. Something like this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question