Skip to main content

Veritran Docs

[en] Create an AES Crypto Profile

[en] 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.

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

[en] Parameter

[en] Example value

[en] Information

[en] Crypto profile code

[en] AES_TEST_PROFILE_CODE

[en] No additional information.

[en] Description

[en] Unit Test OpenSSL - AES

[en] No additional information.

[en] Algorithm

[en] AESCBC256

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

[en] Key size

32

[en] It is an informative field.

[en] Profile type

[en] OPENSSL

[en] No additional information.

[en] Product code

[en] P1

[en] No additional information.

[en] Profile encoding

[en] VTFET_HEXA_STR

[en] No additional information.

[en] Key code

[en] AES_TEST_KEY_CODE

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

[en] Additional data

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

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

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

[en] 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;  
 
    /