Encryption functions for AES GCM | Adobe Higher Education
Skip to main content
Level 2
June 25, 2020
Beantwoord

Encryption functions for AES GCM

  • June 25, 2020
  • 3 reacties
  • 3026 Bekeken

Hello all,

Are there any function on Campaign that support AES GCM (No padding)?
Can you provide me an example to encrypt/decrypt a string?

@jonathon_wodnicki @kapilkochar @milan_vucetic @anita_punmiya @jyoti_yadav @jean-serge_biro & Community

 

Thanks in advace,
Salvatore

Er kunnen geen reacties meer worden geplaatst op dit onderwerp.
Beste antwoord door Milan_Vucetic

Hi @salvatore_dange,

Unfortunately not.
Only CBC chipper mode is supported and function is cryptString (AES algorithm).

Regards,

Milan

 

3 reacties

Milan_Vucetic
Level 9
June 25, 2020

Hi @salvatore_dange,

Unfortunately not.
Only CBC chipper mode is supported and function is cryptString (AES algorithm).

Regards,

Milan

 

Darren_Bowers
Level 9
June 25, 2020

Hi @salvatore_dange - as @milan_vucetic said, there is no built-in AES-GCM crypto library in Campaign, but you can easily create your own.

https://github.com/rndme/aes4js - if you bring in this JS file intro your JavaScript codes folder and then include it into whatever process you want to encrypt/decrypt with then you have AEM GCS library support.

Cheers Darren

Level 2
June 26, 2020

Hello,

Thanks for these feedbacks.

@darren_bowers this javascript probably needs some libraries and browser-related APIs to work. In fact, as you can see it fails with a simple test:


In case you find a code with no dependency, can you tell me also how to use it in a personalization block (loadLibrary probably doesn't work)?

 

@milan_vucetic what about RSA encryption methods?

 

Thanks again!
Salvatore

 

Darren_Bowers
Level 9
June 28, 2020
@salvatore_dange You might need to hunt around for example code that will run on Campaign. Its a bit hit and miss trying to find specific crypto libraries that are built from the ground up in JS. You might find you have to piece something together if you want native JS that runs on Campaign. Otherwise if you *must* have this particular cypher then you might have to create a local webservice that you can call to encrypt / decrypt when you need it.