Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Problem decrypting some data instances

SA-530

Summary



The blob of a data class was encrypted.  Admin was seeing issues with decrypting some of the blobs of data while others decrypted without issue.


Error Messages



problem decrypting data

Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.AESCipher.engineDoFinal(DashoA13*..)
at javax.crypto.Cipher.doFinal(DashoA13*..)
at com.pega.pegarules.exec.internal.util.crypto.PRCipherBase.decrypt(PRCipherBase.java:228)
... 78 more


Steps to Reproduce



Try to open using obj-open-by-handle


Root Cause



The root cause of this problem is defect/misconfiguration in the PRPC operating environment. The data classes for the problem instances were created before the blob encryption was implemented. 
A site-specific cipher must be created and implemented before entering any data into properties or BLOBs which will be encrypted.  There is currently no facility for encrypting existing data.


Resolution



To resolve this issue the data instances had to be removed from the database.  The instances can then be reinstalled and this time the blob will be encrypted.
Suggest Edit

Published March 21, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us