pbrazhko / crypto-js

Automatically exported from code.google.com/p/crypto-js
0 stars 0 forks source link

Rabbit stream cipher failure. #79

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For the Rabbit stream cipher, From version 2.5.4 to 3.0 the output of version 
>=3.0 decryption message from the example is "4d657373616765" instead of 
"Message" as the preceding version produced. 

Tested on Firefox 19.0 and Chromium 24.0.13, Ubuntu

<script type="text/javascript" 
src="http://crypto-js.googlecode.com/svn/tags/2.5.4/build/crypto-sha1-hmac-pbkdf
2-rabbit/crypto-sha1-hmac-pbkdf2-rabbit.js"></script>
<script type="text/javascript">

var crypted = Crypto.Rabbit.encrypt("Message", "Secret Passphrase");
var plain = Crypto.Rabbit.decrypt(crypted, "Secret Passphrase");

    alert(plain);
</script>

<script type="text/javascript" 
src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/rabbit.js"></s
cript>
<script type="text/javascript">

var crypted = CryptoJS.Rabbit.encrypt("Message", "Secret Passphrase");
var plain = CryptoJS.Rabbit.decrypt(crypted, "Secret Passphrase");

    alert(plain);
</script>

Original issue reported on code.google.com by evanpm...@gmail.com on 22 Feb 2013 at 5:14

GoogleCodeExporter commented 8 years ago
alert(plain.toString(CryptoJS.enc.Latin1));

Original comment by Jeff.Mott.OR on 22 Feb 2013 at 5:55