|
EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of generic HSM driver configuration utilities. More...
#include <sys/types.h>#include "generic_hsm_driver.h"#include "../utils/allocs.h"#include "../utils/log.h"#include "../utils/os.h"Functions | |
| struct hsm_context * | init_hsm (void) |
| Initialises an HSM context. More... | |
| int | close_hsm (struct hsm_context *context) |
| Closes the HSM context. More... | |
| int | generate_hsm_key (struct hsm_context *context, uint8_t *key, size_t key_size) |
| Generate an HSM key. More... | |
| int | encrypt_hsm_blob (struct hsm_context *context, uint8_t *in, size_t in_size, uint8_t **out, size_t *out_size) |
| Encrypt a byte array wiht the HSM. More... | |
| int | decrypt_hsm_blob (struct hsm_context *context, uint8_t *in, size_t in_size, uint8_t **out, size_t *out_size) |
| Decrypt a byte array wiht the HSM. More... | |
File containing the implementation of generic HSM driver configuration utilities.
| int close_hsm | ( | struct hsm_context * | context | ) |
Closes the HSM context.
| context | Tje HSM context |
| int decrypt_hsm_blob | ( | struct hsm_context * | context, |
| uint8_t * | in, | ||
| size_t | in_size, | ||
| uint8_t ** | out, | ||
| size_t * | out_size | ||
| ) |
Decrypt a byte array wiht the HSM.
| context | The HSM context |
| in | The input array |
| in_size | The input array size |
| out | The output decrypted array |
| out_size | The output array size |
| int encrypt_hsm_blob | ( | struct hsm_context * | context, |
| uint8_t * | in, | ||
| size_t | in_size, | ||
| uint8_t ** | out, | ||
| size_t * | out_size | ||
| ) |
Encrypt a byte array wiht the HSM.
| context | The HSM context |
| in | The input array |
| in_size | The input array size |
| out | The output encrypted array |
| out_size | The output array size |
| int generate_hsm_key | ( | struct hsm_context * | context, |
| uint8_t * | key, | ||
| size_t | key_size | ||
| ) |
Generate an HSM key.
| context | The HSM context |
| key | The returned key |
| key_size | The key size |
| struct hsm_context* init_hsm | ( | void | ) |
Initialises an HSM context.