EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of zymkey4 driver configuration utilities. More...
#include <sys/types.h>
#include <zymkey/zk_app_utils.h>
#include "../utils/allocs.h"
#include "../utils/log.h"
#include "../utils/os.h"
Functions | |
zkCTX * | init_zymkey4 (void) |
Initialises an HSM context. More... | |
int | close_zymkey4 (zkCTX *ctx) |
Closes the zymkey4 context. More... | |
int | generate_zymkey4_key (zkCTX *ctx, uint8_t *key, size_t key_size) |
Generate a random Zymkey4 key. More... | |
int | encrypt_zymkey4_blob (zkCTX *ctx, uint8_t *in, size_t in_size, uint8_t **out, size_t *out_size) |
Encrypt a byte array wiht the Zymkey4 HSM. More... | |
int | decrypt_zymkey4_blob (zkCTX *ctx, uint8_t *in, size_t in_size, uint8_t **out, size_t *out_size) |
Decrypt a byte array wiht the Zymkey4 HSM. More... | |
File containing the implementation of zymkey4 driver configuration utilities.
int close_zymkey4 | ( | zkCTX * | ctx | ) |
Closes the zymkey4 context.
ctx | The Zymkey4 context |
int decrypt_zymkey4_blob | ( | zkCTX * | ctx, |
uint8_t * | in, | ||
size_t | in_size, | ||
uint8_t ** | out, | ||
size_t * | out_size | ||
) |
Decrypt a byte array wiht the Zymkey4 HSM.
ctx | The Zymkey4 context |
in | The input array |
in_size | The input array size |
out | The output decrypted array |
out_size | The output array size |
int encrypt_zymkey4_blob | ( | zkCTX * | ctx, |
uint8_t * | in, | ||
size_t | in_size, | ||
uint8_t ** | out, | ||
size_t * | out_size | ||
) |
Encrypt a byte array wiht the Zymkey4 HSM.
ctx | The Zymkey4 context |
in | The input array |
in_size | The input array size |
out | The output encrypted array |
out_size | The output array size |
int generate_zymkey4_key | ( | zkCTX * | ctx, |
uint8_t * | key, | ||
size_t | key_size | ||
) |
Generate a random Zymkey4 key.
ctx | The Zymkey4 context |
key | The returned key |
key_size | The key size |
zkCTX* init_zymkey4 | ( | void | ) |
Initialises an HSM context.