API Connect

 View Only
  • 1.  Encrypt/ Decrypt payload using AES256 CBC algorithm

    Posted 8 days ago
    Hello Team,

    We need to Encrypt and Decrypt payload using AES256 CBC mode algorithm.
    We don't have IV value to decrypt data.
    We able to encrypt data without IV ,but when we decrypt data We are getting error i.e IV is required.
    We are Using below method to decrypt data.

    Method: crypto.createDecipheriv('aes256-cbc',key,iv); 
    Error    :
    Incorrect number of arguments provided to function 'createDecipheriv()'. Expected number of arguments: 3; actual number of arguments: 2


    Please guide how to encrypt/decrypt data using AES 256 CBC algorithm in IBM API connect v10?
    Also can we decrypt data without IV? if yes, then how to decrypt it.

    ------------------------------
    Jyoti Yadav
    ------------------------------


  • 2.  RE: Encrypt/ Decrypt payload using AES256 CBC algorithm

    Posted 7 days ago
    Dear Jyoti,

    Best way to encrypt payload is to first concatenate any random alphanumeric 16 byte string at start of your original payload, then pass it to Encryption function. This will also then help you to not depend on sharing IV with client applications.This will even also help you not loosing important initial 16 byte of original payload.

    Decryption :- make sure you are passing key & IV as buffer.

    ------------------------------
    Jayprakash Yadav
    ------------------------------



  • 3.  RE: Encrypt/ Decrypt payload using AES256 CBC algorithm

    Posted 2 days ago
    Hello Team,

    Please guide how to decrypt payload without IV?

    Thanks,
    Jyoti