Home > other >  Resist "known plaintext attack on the RC4 encryption"
Resist "known plaintext attack on the RC4 encryption"

Time:09-30

RC4 algorithm according to the key generation code stream, and then use the password flow was carried out on the clear word for word section exclusive or operation, generating ciphertext,
My doubt is, as long as the communication key must be on both sides, the generated code stream is not certain, so, wouldn't it be unable to resist "known plaintext attack", because as long as know a set of corresponding cipher plaintext and long enough, can be used to get the password of an exclusive or operation flow, though they can't know the original key, but as long as know the password, to decrypt the cipher can be,

CodePudding user response:

Found a online calculation under the RC4 encryption website tried, does seem can crack (website address: http://tool.chacuo.net/cryptrc4)
I input the key is: 123456 (ASCII characters)
The first set of clear: abcdefg (ASCII characters, the corresponding HEX is "61 62 63 64 65 66 67")
Site output cipher: YZodA0FVcg==(Base64 encoding, into a HEX is "61 9 a 1 d 03 41 55, 72")
The cipher text "03 41 55 72 61 9 a 1 d" with a clear vision or get password flow "00 F8 7 e 67 24 33 15"

And then the key is changeless, select another set of clear: 1234567 (ASCII characters, the corresponding HEX is "31 32 33 34 35 36, 37)
Use of the site is encrypted, get: McpNUxEFIg==(Base64 encoding, into a HEX is 31 CA 53 11 05 22 "4 d")
Then use the password of the flow is calculated just 24 15 "33" 00 F8 7 e 67 and ciphertext 31 CA 53 11 05 22 "4 d" exclusive or operation, successfully get clear "31 32 33 34 35 36 37"
With the password flow "00 F8 7 e 67 24 33 15"

CodePudding user response:

To learn, and which encryption safer
  • Related