1

I'm able to successfully encrypt and decrypt using dp:encrypt-string and dp:decrypt-data in datapower. But how do I know the value of IV being used to encrypt by datapower?

Edit- First 16 bytes of the ciphertext generated by Datapower is the IV used. But how do I force datapower to use an IV of my choice over the random IV used by datapower?

akn
  • 59
  • 1
  • 10
  • Can you post an example algorithm / key / plaintext / cipher combination so we can investigate? Indeed the [documentation of the function](https://www.ibm.com/support/knowledgecenter/SS9H2Y_7.7.0/com.ibm.dp.doc/encrypt-string_cryptographicfunction.html) doesn't seem to specify how the IV is handled. – Maarten Bodewes Dec 27 '19 at 17:05
  • 1
    @Maarten - reinstate Monica After some more digging I came to know that the first 16 bytes of the ciphertext generated by datapower is the IV used. I have verified it by decrypting a ciphertext on Java. Now my problem is how to make the datapower use an IV of my choice rather than using a random IV.? I have edited the initial post accordingly. – akn Dec 30 '19 at 07:02
  • Ah, OK. Generally you should not change the question significantly. Instead you could answer your own question or you could delete it and then ask a new one. In this case little harm is done. Upvotes/downvotes could however still be present for the old question rather than the new. It seems however that I'm the only one that upvoted so far. Still: please don't change the subject of your question in the future! – Maarten Bodewes Dec 30 '19 at 11:51

0 Answers0