What method do you use to convert text into numbers for encryption with RSA so that it is not vulnerable to letter frequency (or other) attacks after it is encrypted? As of now I'm using LZ77 compression but it is still vulnerable in many ways.
答案 0 :(得分:0)
All "text" in a digital computer is already a number; it's stored as a sequence of bits, which form a large binary number. This number could be used as the base in an RSA operation.
RSA, like any other modern cipher, isn't subject to frequency attacks. Even in World War II, cryptographers understood that biases in ciphers were bad. They just weren't as good at eliminating them.
Accepted RSA message encoding schemes require the plain text message to be a bit shorter than the encoded message block so that random padding can be included. This results in radically different cipher text each time the same plain text is encrypted.
Anyway, RSA should be used only to encrypt other cryptographic keys, and those have far more entropy than human-readable text.