Problem using the tactical assertions :Symmetric Key Encryption / Decryption Assertion
search cancel

Problem using the tactical assertions :Symmetric Key Encryption / Decryption Assertion

book

Article ID: 233137

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Problem using the tactical assertions :Symmetric Key Encryption / Decryption Assertion

It isn't working when using AES/CBC/PKCS5Padding when the key is 16 characters (128) or 24 characters (192) fail the assertion but if the key is 32 characters works. I think the problem is the version I try with version 1.0 and 1.1 of the module and the same.

 

Environment

Release : 10.0

Component : API GATEWAY

Resolution

Attached to this KB unit test policy that can help configure the assertions 

Information: There is a correlation between algorithm and bits selected 

Randomly generated UUID string that was 32 bytes in length which of course would be 256 bits, thus meeting the requirement of the algorithm set for 256 bit encryption.

There is a need to take the bytes, convert bits then Compare that to the algorithm bits - if they do not match it will fail.  The value you use must meet the prerequisites of the algorithm chosen. 

What might be occurring is your IV value (not the key this time) might be either too long or not long enough. 

It ultimately means that your value is not adding up to the expected number of bits the algorithm requires.

Attachments

1643223035116__Unit Test Policies.zip get_app