Export to GitHub

slowaes - issue #5

Javascript AES-CBC: PKCS7 Padding broken for 16 bytes long blocks (and multiples)


Posted on Aug 9, 2009 by Massive Wombat

When encrypting 16 bytes long blocks (and multiples of 16 bytes) of plaintext with the Javascript version of SlowAES/CBC the padding block is not appended.

PKCS7 needs a full 16-bytes padding block made of 0x10 added to the plaintext before encryption in such case.

Thanks for the library! stefano

Comment #1

Posted on Sep 8, 2009 by Happy Elephant

Comment deleted

Attachments

Comment #2

Posted on Sep 8, 2009 by Happy Elephant

Try out this fix.

Attachments

Comment #3

Posted on Mar 8, 2011 by Quick Panda

I committed r39 which should fix this

Status: Fixed

Labels:
Type-Defect Priority-Medium