Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

padding schemes corrupted - ZeroPadding #39

Closed
GoogleCodeExporter opened this issue Mar 22, 2015 · 1 comment
Closed

padding schemes corrupted - ZeroPadding #39

GoogleCodeExporter opened this issue Mar 22, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.
/*** encrypt */ 
var ciphertext = Crypto.AES.encrypt(plaintext , "Secret Passphrase", 
{ mode: new Crypto.mode.OFB(Crypto.pad.ZeroPadding) }); 

2.
/*** decrypt */ 
var plain = Crypto.AES.decrypt(ciphertext, "Secret Passphrase", 
{ mode: new Crypto.mode.OFB(Crypto.pad.ZeroPadding) }); 


What is the expected output? 

// encrypt
ciphertext = "SwcOSeXEGMIQUKEn7ibuoV28KfNXBPH3tngp3ORySr0=";
// decrypt
plaintext = "plaintext";        // this is 9 bytes

What do you see instead?
plaintext = "plaintext???????"; // this is 16 bytes

What version of the product are you using? 
*crypto-js v2.4.0
*crypto-js v2.5.2
*crypto-js v2.5.3

On what operating system?
SO: Windows 7 - 32 bit
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2

Please provide any additional information below.
The ZeroPadding should be fixed now in release 2.5.4 and in the latest 3.x 
release. 

Original issue reported on code.google.com by MicheleR...@gmail.com on 30 May 2012 at 8:22

@GoogleCodeExporter
Copy link
Author

Original comment by Jeff.Mott.OR on 30 May 2012 at 8:50

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant