Hi Stijn,


In reaction to our correspondence end of April, I’m currently working on a trimmed down version of the ACM to be able to sign simple attribute certificates using the command line.

In this process I stumbled upon on the web. Which reproduces exactly the same error as I get using my own implementation:


Embedded: iaik.pkcs.PKCSException: Padding error: javax.crypto.BadPaddingException: Given final block not properly padded

  at iaik.pkcs.pkcs12.AuthenticatedSafe.decrypt(Unknown Source)

  at iaik.pkcs.pkcs12.PKCS12.decrypt(Unknown Source)


  at P12SecurityTest.main(


l3tM3InNow permis.p12 - Failed to log in


I’m using a single line input file containing: “l3tM3InNow permis.p12” (without the quotes).  

Reckoning you might have encountered this problem before I’m hoping you could point me in the right direction. Maybe I’m missing some environmental settings? (e.g. or is the java version an ussue? (using java version "1.6.0_24", Java(TM) SE Runtime Environment (build 1.6.0_24-b07), Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)). I also encountered hint towards not using the toCharArray due to padding issues, yet in-code specification of the password as char[] was to no avail.



Kind Regards,


Jan Willem Beusink