Question & Answer
Question
Decrypting error in the logs after running MigrateEncryptedInfo script *|* -85859EAB10125A3E8525766A008351F8- *|*
Answer
Technote (troubleshooting)
Problem(Abstract)
When the MigrateEncryptedInfo script is run to move the merchantkey from the instance.xml file to an external file you see the following errors in the MigrateEncryptedInfoError.log file.
Symptom
Errors in the MigrateEncryptedInfoError.log:
%3DES-F-DCRYPT; Exception caught while decrypting
; javax.crypto.BadPaddingException: Given final block not properly padded
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.Exception.<init>(Exception.java:41)
at java.security.GeneralSecurityException.<init>(GeneralSecurityException.java:43)
at javax.crypto.BadPaddingException.<init>(Unknown Source)
at com.ibm.crypto.provider.DESedeCipher.engineDoFinal(Unknown Source)
at javax.crypto.Cipher.doFinal(Unknown Source)
at com.ibm.commerce.util.wrapper.nc_cryptx.decrypt(nc_cryptx.java:136)
at com.ibm.commerce.util.nc_crypt.decrypt(nc_crypt.java:56)
at com.ibm.commerce.dbupdatetool.OneWayHashEncoder.processValue(OneWayHashEncoder.java:111)
at com.ibm.commerce.dbupdatetool.SimpleRowBrowser.execute(SimpleRowBrowser.java:40)
at com.ibm.commerce.dbupdatetool.DBMigrateTool.execute(DBMigrateTool.java:274)
at com.ibm.commerce.dbupdatetool.DBUpdateToolApp.<init>(DBUpdateToolApp.java:72)
at com.ibm.commerce.dbupdatetool.MKChangeApp.changeMK(MKChangeApp.java:324)
at com.ibm.commerce.dbupdatetool.MKChangeApp.<init>(MKChangeApp.java:201)
at com.ibm.commerce.dbupdatetool.MKChangeApp.main(MKChangeApp.java:363)
Error while decrypting legacy password for user: <USER_ID>
Cause
The script fails while trying to decrypt the password using the SALT key stored in the USERREG table for the user id stated in MigrateEncryptedInfoError.log :
Error while decrypting legacy password for user: <USER_ID>
Resolving the problem
- Check the USERREG table for this USER_ID to see if it has the correct salt value set.
- Ensure that the user password has not expired by checking the value in the PASSWORDEXPIRED column.
If the password has expired reset it by following these directions: Resetting accounts.
Was this topic helpful?
Document Information
Modified date:
12 October 2021
UID
ibm10766797