Skip to content
Advertisement

AES Encryption algorithms and padding scheme

Hello currently i have to do an AES encription and send it to an external SW but i am having trouble with the sonarqube.

this is the relevant part of my current code:

JavaScript

Is a little spaguetti cause it´s recyclated for an old code (TripleDES) sorry for that. But we can get the gist of it that`s that we are using an AES configuration with AES/CBC/PKCS5PADDING

the thing is that our sonarqube is getting this output when i send this code:

enter image description here

Could someone explain me a little about oracle padding attacks and if there is some impact using the instance recommended by sonar? I am quite lost with encryption

pd: The SW has accepted to change the configuration but i would like to understand why i have to use one specific configuration above others

thanks

Advertisement

Answer

Well the question is already solved thanks to @Topaco in the comments below. I will update my code here in order to make this question answered.

My current Code looks like this:

JavaScript

I think it a pretty clean example of AES encryption, hope it´s useful to someone

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement