Symmetric Tactical Assertion : Receiver unable to decrypt results from encrypted output
search cancel

Symmetric Tactical Assertion : Receiver unable to decrypt results from encrypted output

book

Article ID: 107676

calendar_today

Updated On:

Products

STARTER PACK-7 CA Rapid App Security CA API Gateway

Issue/Introduction



When using the SymetricEncryptionTacticalAssertion.saar.   The receiver of the encrypted output is not able to decrypt the data generated from the tactical assertion. It is unclear from the documentation how does one process the output to get the IV (Initialization vector).

Environment

Release:
Component: APIGTW

Resolution


For encryption the IV (initialization vector) is randomly generated, and then it is pre-pended to the encrypted bytes . 

So the first X bytes of the returned bytearray will be the iv that was used. 

Where X depends on the block size of the cipher : Which is coded as : 

IV_BLOCK_SIZE_BYTES_AES = 16 
IV_BLOCK_SIZE_BYTES_AES_GSM = 12 
IV_BLOCK_SIZE_BYTES_DES_TRIPPLE_DES = 8 

So the first X bytes of the returned packet are the initial IV string.