aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/nx/nx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/nx/nx.h')
-rw-r--r--drivers/crypto/nx/nx.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/crypto/nx/nx.h b/drivers/crypto/nx/nx.h
index de3ea8738146..cdff03a42ae7 100644
--- a/drivers/crypto/nx/nx.h
+++ b/drivers/crypto/nx/nx.h
@@ -2,6 +2,8 @@
2#ifndef __NX_H__ 2#ifndef __NX_H__
3#define __NX_H__ 3#define __NX_H__
4 4
5#include <crypto/ctr.h>
6
5#define NX_NAME "nx-crypto" 7#define NX_NAME "nx-crypto"
6#define NX_STRING "IBM Power7+ Nest Accelerator Crypto Driver" 8#define NX_STRING "IBM Power7+ Nest Accelerator Crypto Driver"
7#define NX_VERSION "1.0" 9#define NX_VERSION "1.0"
@@ -91,8 +93,11 @@ struct nx_crypto_driver {
91 93
92#define NX_GCM4106_NONCE_LEN (4) 94#define NX_GCM4106_NONCE_LEN (4)
93#define NX_GCM_CTR_OFFSET (12) 95#define NX_GCM_CTR_OFFSET (12)
94struct nx_gcm_priv { 96struct nx_gcm_rctx {
95 u8 iv[16]; 97 u8 iv[16];
98};
99
100struct nx_gcm_priv {
96 u8 iauth_tag[16]; 101 u8 iauth_tag[16];
97 u8 nonce[NX_GCM4106_NONCE_LEN]; 102 u8 nonce[NX_GCM4106_NONCE_LEN];
98}; 103};
@@ -100,8 +105,11 @@ struct nx_gcm_priv {
100#define NX_CCM_AES_KEY_LEN (16) 105#define NX_CCM_AES_KEY_LEN (16)
101#define NX_CCM4309_AES_KEY_LEN (19) 106#define NX_CCM4309_AES_KEY_LEN (19)
102#define NX_CCM4309_NONCE_LEN (3) 107#define NX_CCM4309_NONCE_LEN (3)
103struct nx_ccm_priv { 108struct nx_ccm_rctx {
104 u8 iv[16]; 109 u8 iv[16];
110};
111
112struct nx_ccm_priv {
105 u8 b0[16]; 113 u8 b0[16];
106 u8 iauth_tag[16]; 114 u8 iauth_tag[16];
107 u8 oauth_tag[16]; 115 u8 oauth_tag[16];
@@ -113,7 +121,7 @@ struct nx_xcbc_priv {
113}; 121};
114 122
115struct nx_ctr_priv { 123struct nx_ctr_priv {
116 u8 iv[16]; 124 u8 nonce[CTR_RFC3686_NONCE_SIZE];
117}; 125};
118 126
119struct nx_crypto_ctx { 127struct nx_crypto_ctx {