45#define PROFILE_COUNT 16
69 if (
test->additional_len ) {
72 test->additional_len );
91 if (
test->additional_len ) {
93 test->additional_len );
116 unsigned int line ) {
130 if (
test->additional_len ) {
133 test->additional_len );
152 if (
test->additional_len ) {
154 test->additional_len );
177 unsigned int line ) {
205 const void *
src,
void *dst,
size_t len ) ) {
217 for ( i = 0 ; i <
sizeof (
random ) ; i++ )
219 for ( i = 0 ; i <
sizeof (
key ) ; i++ )
221 for ( i = 0 ; i <
sizeof (
iv ) ; i++ )
#define NULL
NULL pointer (VOID *).
struct golan_eq_context ctx
union @162305117151260234136356364136041353210355154177 key
struct arbelprm_rc_send_wqe rc
#define assert(condition)
Assert a condition at run-time.
unsigned long cipher_cost_decrypt(struct cipher_algorithm *cipher, size_t key_len)
Calculate cipher decryption cost.
static unsigned long cipher_cost(struct cipher_algorithm *cipher, size_t key_len, void(*op)(struct cipher_algorithm *cipher, void *ctx, const void *src, void *dst, size_t len))
Calculate cipher encryption or decryption cost.
unsigned long cipher_cost_encrypt(struct cipher_algorithm *cipher, size_t key_len)
Calculate cipher encryption cost.
void cipher_decrypt_okx(struct cipher_test *test, const char *file, unsigned int line)
Report a cipher decryption test result.
#define PROFILE_COUNT
Number of sample iterations for profiling.
void cipher_encrypt_okx(struct cipher_test *test, const char *file, unsigned int line)
Report a cipher encryption test result.
void cipher_okx(struct cipher_test *test, const char *file, unsigned int line)
Report a cipher encryption and decryption test result.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
static int cipher_setkey(struct cipher_algorithm *cipher, void *ctx, const void *key, size_t keylen)
static int cipher_setiv(struct cipher_algorithm *cipher, void *ctx, const void *iv, size_t ivlen)
#define cipher_decrypt(cipher, ctx, src, dst, len)
static int is_auth_cipher(struct cipher_algorithm *cipher)
#define cipher_encrypt(cipher, ctx, src, dst, len)
static void cipher_auth(struct cipher_algorithm *cipher, void *ctx, void *auth)
static void profile_stop(struct profiler *profiler)
Stop profiling.
static void profile_start(struct profiler *profiler)
Start profiling.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void * memset(void *dest, int character, size_t len) __nonnull
static uint16_t struct vmbus_xfer_pages_operations * op
unsigned long profile_mean(struct profiler *profiler)
Get mean sample value.
long int random(void)
Generate a pseudo-random number between 0 and 2147483647L or 2147483562?
static void srand(unsigned int seed)
uint32_t cost
Root path cost.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
size_t blocksize
Block size.
int confidential
Cipher is capable of providing confidentiality.
size_t ctxsize
Context size.
size_t authsize
Authentication tag size.
void(* auth)(struct cipher_algorithm *cipher, void *ctx, void *auth)
Generate authentication tag.
size_t alignsize
Alignment size.
A data structure for storing profiling information.
Self-test infrastructure.
#define okx(success, file, line)
Report test result.
u8 iv[16]
Initialization vector.