Layer7 API Management

Expand all | Collapse all

Symmetric Encryption-Decryption of XML tags

Jump to Best Answer
  • 1.  Symmetric Encryption-Decryption of XML tags

    Posted 12-23-2016 10:02 AM



     I am facing issue in symmetric encryption-decryption of XML data. Below is the explanation:


    Input Data:


    Step 1: Symmetrically encrypted it using tactical symmetric assertion with 16 bit key. Encryption algo it AES/CBC/PKCS5.


    While decrypting the encrypted values, received in Step1, using tactical symmetric assertion with same 16 bit key (used in Step 1), I am getting following output:



    However the expected output was the input data value itself. Please help. Am I missing any step in decryption or encryption?




  • 2.  Re: Symmetric Encryption-Decryption of XML tags
    Best Answer

    Posted 12-23-2016 11:43 AM
      |   view attached



    Good afternoon. The encryption and decryption of the Symmetrical assertion will interpret the XML element incorrect and will drop them so you need to base64 the data prior to encrypting and decode from base64 once you have completed the decryption. I've attached a sample policy that outlines how this can be done.




    Stephen Hughes

    Director, CA Support