4 #include <gnutls_int.h>
7 struct padlock_cipher_data {
8 unsigned char iv[16]; /* Initialization vector */
13 int dgst:1; /* n/a in C3 */
14 int align:1; /* n/a in C3 */
15 int ciphr:1; /* n/a in C3 */
16 unsigned int keygen:1;
18 unsigned int encdec:1;
21 } cword; /* Control word */
22 AES_KEY ks; /* Encryption key */
26 struct padlock_cipher_data expanded_key;
30 extern const gnutls_crypto_cipher_st aes_gcm_padlock_struct;
31 extern const gnutls_crypto_mac_st hmac_sha_padlock_struct;
32 extern const gnutls_crypto_digest_st sha_padlock_struct;
34 int padlock_aes_cipher_setkey(void *_ctx, const void *userkey,
38 unsigned int padlock_capability(void);
39 void padlock_reload_key(void);
40 int padlock_ecb_encrypt(void *out, const void *inp,
41 struct padlock_cipher_data *ctx, size_t len);
42 int padlock_cbc_encrypt(void *out, const void *inp,
43 struct padlock_cipher_data *ctx, size_t len);