fix typo and remove magic number
parent
8fefc773a5
commit
07fe3d305b
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue