Skip to main content

Veritran Docs

Create an AES Crypto Profile

In the SQL editor, create the crypto profile in the VT-NET database using StoreProcedure. This will create a new entry in the crypto_profile table.

AES Crypto profile entries in the VT-NET database must contain the following parameters:

Parameter

Example value

Information

Crypto profile code

AES_TEST_PROFILE_CODE

No additional information.

Description

Unit Test OpenSSL - AES

No additional information.

Algorithm

AESCBC256

It can be either AESCBC256 or AESCBC128, always matching the key size on 32 or 16, respectively.

Key size

32

It is an informative field.

Profile type

OPENSSL

No additional information.

Product code

P1

No additional information.

Profile encoding

VTFET_HEXA_STR

No additional information.

Key code

AES_TEST_KEY_CODE

It must match the certificate code set up in Middleware, as the user-defined platform certificate will be used as key.

Additional data

{\"openssl\": {\"key\": \"840EB903BFDDB7F24A6F6620DE3D5514EDEFD2B1CF852B1EB5564649422B5F1FC5AB58D0AD280FEA31C3746627242E5B\", \"padding\": \"pkcs7\", \"iv\": \"35373337373633363638343436383538\"}}

  • On the jsonAdditionalData structure, the field openssl.key should be the result of encrypting the AES key with vtCrypto utility.

  • The openssl.padding can be "pkcs7", "pkcs5", "veritran" or "zeros". The openssl.iv should be the initial vector on hexadecimal notation.

The following code snippet shows how to create a crypto profile entry in the database using the example values.

BEGIN  
 
        VTDB.INS_UPD_CRYPTO_PROFILES(' AES_TEST_PROFILE_CODE ',' Unit Test OpenSSL - AES ','AESCBC256',’OPENSSL',2049,TO_CLOB('{\"openssl\": {\"key\": \"840EB903BFDDB7F24A6F6620DE3D5514EDEFD2B1CF852B1EB5564649422B5F1FC5AB58D0AD280FEA31C3746627242E5B\", \"padding\": \"pkcs7\", \"iv\": \"35373337373633363638343436383538\"}}'), 'MB','H',NULL,’RSAE’,'VERITRAN', NULL, 0);  
 
    END;  
 
    /