cipher/ decipher with 3DES alg
Posted: Wed Apr 26, 2017 11:46 pm
Hey guys,
I came across a problem recently. Hope you can figure me out.
I tried to cipher some text with 3DES alg with a key of 16 bytes. And I asked users to input the first part of my 16 bytes key - that is 8 characters. The second part is hard-coded.
I tried with simple key like "12345678". It ciphers without any problem. So I expected that the result could only be deciphered with that key. But the fact proved that what I thought was wrong. I can also decipher with a similar key, like "12345679".
Can anyone figure out the reason why this happened?
Thank you so much.
I came across a problem recently. Hope you can figure me out.
I tried to cipher some text with 3DES alg with a key of 16 bytes. And I asked users to input the first part of my 16 bytes key - that is 8 characters. The second part is hard-coded.
I tried with simple key like "12345678". It ciphers without any problem. So I expected that the result could only be deciphered with that key. But the fact proved that what I thought was wrong. I can also decipher with a similar key, like "12345679".
Can anyone figure out the reason why this happened?
Thank you so much.