Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

CryptoException while decrypting in AEM

Avatar

Avatar
Validate 10
Level 2
sachin_solution
Level 2

Likes

6 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
sachin_solution
Level 2

Likes

6 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sachin_solution
Level 2

25-04-2018

we are facing CryptoException while decrypting the text in AEM 6.0 version. Actually one of our environment is having this issue. we dont have this issue in other environments. This issue is specific to only one environment. Literally we tried all the options.

Tried options:- Deleted /etc/key folder in publish server and restarted Adobe Granite Crypto Bundle and restarted pub server too. But nothing is helped and still facing the same error.

Below is complete error message

Caused by: com.adobe.granite.crypto.CryptoException: Cannot convert byte data

                at com.adobe.granite.crypto.internal.CryptoSupportImpl.unprotect(CryptoSupportImpl.java:160)

                at com.pearson.aem.aemcore.hybris.services.CommerceServiceImpl.getExternalUser(CommerceServiceImpl.java:326)

                ... 136 common frames omitted

Caused by: com.adobe.granite.crypto.CryptoException: Failed decrypting cipher text

                at com.adobe.granite.crypto.internal.CryptoSupportImpl.decrypt(CryptoSupportImpl.java:96)

                at com.adobe.granite.crypto.internal.CryptoSupportImpl.unprotect(CryptoSupportImpl.java:157)

                ... 137 common frames omitted

Caused by: com.rsa.jsafe.JSAFE_PaddingException: Invalid padding.

                at com.rsa.jsafe.JSAFE_SymmetricCipher.decryptFinal(Unknown Source)

                at com.adobe.granite.crypto.internal.jsafe.JSafeCryptoSupport.getPlainText(JSafeCryptoSupport.java:326)

                at com.adobe.granite.crypto.internal.jsafe.JSafeCryptoSupport.getPlainText(JSafeCryptoSupport.java:308)

                at com.adobe.granite.crypto.internal.CryptoSupportImpl.decrypt(CryptoSupportImpl.java:94)

                  ... 138 common frames omitted

Is there any config which we should cross verify? Pls suggest

Replies

Avatar

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

277 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

277 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
edubey
Level 10

25-04-2018

Was this encrypted by the same publisher which is decrypting it?

If you have multiple publish, make sure those are using same keys.

Avatar

Avatar
Validate 10
Level 2
sachin_solution
Level 2

Likes

6 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
sachin_solution
Level 2

Likes

6 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sachin_solution
Level 2

25-04-2018

Hi Edubey

This is not clustering environment. Encryption and decryption are happening in one pub servers.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

25-04-2018

Have you written custom code that performs encryption operations?  Never seen this happen OOTB.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

25-04-2018

I was talking to Support about this. As this is not a normal use case or even documented - there may be a bug somewhere. Please open a support ticket here.

Avatar

Avatar
Boost 1
Level 1
abiddanda
Level 1

Like

1 like

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Boost 1
Give Back
View profile

Avatar
Boost 1
Level 1
abiddanda
Level 1

Like

1 like

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Boost 1
Give Back
View profile
abiddanda
Level 1

08-06-2021

I'm seeing the same exception during package install for an OSGI xml config file containing an encrypted password.

Avatar

Avatar
Applaud 5
Level 3
anjali_biddanda
Level 3

Likes

23 likes

Total Posts

88 posts

Correct Reply

8 solutions
Top badges earned
Applaud 5
Give Back 10
Ignite 1
Validate 10
Validate 1
View profile

Avatar
Applaud 5
Level 3
anjali_biddanda
Level 3

Likes

23 likes

Total Posts

88 posts

Correct Reply

8 solutions
Top badges earned
Applaud 5
Give Back 10
Ignite 1
Validate 10
Validate 1
View profile
anjali_biddanda
Level 3

08-06-2021

I was seeing the same error during package install for an OSGI xml config file. Escape the curly braces for the package to install.