Handle small characters input
When the input data length for CRDP APIs using FPE or Random2 algorithm is shorter than the minimum length specified by the algorithm's requirements, ciphertext or tokens cannot be generated according to the algorithm's specifications. In such cases, the admin can either choose to return the same value as the input or return an error, depending on the setting of the Allow Small Input parameter.
Effective length is of the size of the input data that is actually processed by the algorithm.
If the Allow Small Input parameter is disabled and user attempts to protect a small input value, CRDP doesn't process it and returns the Input buffer is too short (len=1), it has to be at least 2 bytes long
error.
If the Allow Small Input parameter is enabled, CRDP will process small input value as shown in the examples.
Support to handle small character input will be available in CipherTrust Manager 2.22 and higher versions.
Note
Null
or "" (empty) characters are always by passed, that is, the output is same as the input irrespective of any protection policy configurations.To protect Luhn-compliant data, a minimum of 3 characters from the character set are required.
How to configure output for small input
When creating a protection policy on CipherTrust Manager, select the Allow Small Input checkbox. By default, this field is enabled.
Examples
The below examples demonstrate how CRDP handles requests to protect/reveal small input using the following protection policy configurations:
Protection Policy Version: Internal
Prefix: CC-
Allow Small Input: Enabled
Character Set: Alphanumeric
Reveal Format: SHOW_FIRST_TWO_LAST_FOUR
ProtectBulk Request
{
"protection_policy_name": "testPolicy",
"data_array": [
null,
"",
"1",
"1234-5678-1234-5678"
]
}
Response
{
"status": "Success",
"total_count": 4,
"success_count": 4,
"error_count": 0,
"protected_data_array": [
{
"protected_data": null
},
{
"protected_data": ""
},
{
"protected_data": "1001000CC-1"
},
{
"protected_data": "1001000CC-4okj-o5lA-i3EW-AkQx"
}
]
}
RevealBulk Request
{
"protection_policy_name": "testPolicy",
"protected_data_array": [
{
"protected_data": null
},
{
"protected_data": ""
},
{
"protected_data": "1001000CC-1"
},
{
"protected_data": "1001000CC-4okj-o5lA-i3EW-AkQx"
}
],
"username": "maskedUser"
}
Response
{
"status": "Success",
"total_count": 4,
"success_count": 4,
"error_count": 0,
"data_array": [
{
"data": null
},
{
"data": ""
},
{
"data": "1"
},
{
"data": "12XX-XXXX-XXXX-5678"
}
]
}