fix typo and remove magic number

pull/301/head
JacobBarthelmeh 2022-04-05 14:58:36 -07:00
parent 8fefc773a5
commit 07fe3d305b
5 changed files with 9 additions and 9 deletions

View File

@ -1,8 +1,8 @@
Example use cases when compiling wolfSSL with --enable-caam=seco
## Setup Envirnment
## Setup Environment
Setup the location to SECO HSM and NVM library, cryptodev header (if wolfSSL is built to look for it), wolfSSL library path, and libz install path. The following is examples of setting the envirnment variables:
Setup the location to SECO HSM and NVM library, cryptodev header (if wolfSSL is built to look for it), wolfSSL library path, and libz install path. The following is examples of setting the environment variables:
export HSM_DIR=/home/user/imx-seco-libs/export/usr
export CRYPTODEV_DIR=/home/user/build-xwayland/sysroots-components/aarch64/cryptodev-linux/usr/include

View File

@ -34,9 +34,9 @@ static unsigned int createAesKey()
unsigned int keyIdOut;
int keyInfo = CAAM_KEY_PERSISTENT;
int keyType = CAAM_KEYTYPE_AES128;
byte pubOut[32];
byte pubOut[AES_MAX_KEY_SIZE];
/* generate a CMAC key in the HSM */
/* generate a AES-CBC key in the HSM */
if (wc_SECO_GenerateKey(CAAM_GENERATE_KEY, keyGroup, pubOut, 0, keyType,
keyInfo, &keyIdOut) != 0) {
printf("Error generating key in hsm\n");

View File

@ -36,9 +36,9 @@ static unsigned int createAesKey()
unsigned int keyIdOut;
int keyInfo = CAAM_KEY_PERSISTENT;
int keyType = CAAM_KEYTYPE_AES128;
byte pubOut[32];
byte pubOut[AES_MAX_KEY_SIZE];
/* generate a CMAC key in the HSM */
/* generate a AES-CCM key in the HSM */
if (wc_SECO_GenerateKey(CAAM_GENERATE_KEY, keyGroup, pubOut, 0, keyType,
keyInfo, &keyIdOut) != 0) {
printf("Error generating key in hsm\n");

View File

@ -36,9 +36,9 @@ static unsigned int createAesKey()
unsigned int keyIdOut;
int keyInfo = CAAM_KEY_PERSISTENT;
int keyType = CAAM_KEYTYPE_AES128;
byte pubOut[32];
byte pubOut[AES_MAX_KEY_SIZE];
/* generate a CMAC key in the HSM */
/* generate a AES-ECB key in the HSM */
if (wc_SECO_GenerateKey(CAAM_GENERATE_KEY, keyGroup, pubOut, 0, keyType,
keyInfo, &keyIdOut) != 0) {
printf("Error generating key in hsm\n");

View File

@ -36,7 +36,7 @@ static unsigned int createAesKey()
int keyType = CAAM_KEYTYPE_AES128;
byte pubOut[AES_256_KEY_SIZE];
/* generate a CMAC key in the HSM */
/* generate a AES-GCM key in the HSM */
if (wc_SECO_GenerateKey(CAAM_GENERATE_KEY, keyGroup, pubOut, 0, keyType,
keyInfo, &keyIdOut) != 0) {
printf("Error generating key in hsm\n");