4
#include <gnutls_int.h>
6
struct padlock_cipher_data {
7
unsigned char iv[16]; /* Initialization vector */
12
int dgst:1; /* n/a in C3 */
13
int align:1; /* n/a in C3 */
14
int ciphr:1; /* n/a in C3 */
15
unsigned int keygen:1;
17
unsigned int encdec:1;
20
} cword; /* Control word */
21
AES_KEY ks; /* Encryption key */
25
struct padlock_cipher_data expanded_key;
29
extern const gnutls_crypto_cipher_st aes_gcm_padlock_struct;
31
int padlock_aes_cipher_setkey(void *_ctx, const void *userkey, size_t keysize);
34
unsigned int padlock_capability(void);
35
void padlock_reload_key(void);
36
int padlock_ecb_encrypt(void *out, const void *inp,
37
struct padlock_cipher_data *ctx, size_t len);
38
int padlock_cbc_encrypt(void *out, const void *inp,
39
struct padlock_cipher_data *ctx, size_t len);
40
void padlock_sha1_oneshot(void *ctx, const void *inp, size_t len);
41
void padlock_sha256_oneshot(void *ctx, const void *inp, size_t len);