Go to the documentation of this file.
2 #ifndef __NX_CSBCPB_H__
3 #define __NX_CSBCPB_H__
99 #define NX_FDM_INTERMEDIATE 0x01
100 #define NX_FDM_CONTINUATION 0x02
101 #define NX_FDM_ENDE_ENCRYPT 0x80
103 #define NX_CPB_FDM(c) ((c)->cpb.hdr.fdm)
104 #define NX_CPB_KS_DS(c) ((c)->cpb.hdr.ks_ds)
106 #define NX_CPB_KEY_SIZE(c) (NX_CPB_KS_DS(c) >> 4)
107 #define NX_CPB_SET_KEY_SIZE(c, x) NX_CPB_KS_DS(c) |= ((x) << 4)
108 #define NX_CPB_SET_DIGEST_SIZE(c, x) NX_CPB_KS_DS(c) |= (x)
134 #define NX_CSB_VALID_BIT 0x80
154 #define NX_MODE_AES_ECB 0
155 #define NX_MODE_AES_CBC 1
156 #define NX_MODE_AES_GMAC 2
157 #define NX_MODE_AES_GCA 3
158 #define NX_MODE_AES_GCM 4
159 #define NX_MODE_AES_CCA 5
160 #define NX_MODE_AES_CCM 6
161 #define NX_MODE_AES_CTR 7
162 #define NX_MODE_AES_XCBC_MAC 20
163 #define NX_MODE_SHA 0
164 #define NX_MODE_SHA_HMAC 1
165 #define NX_MODE_AES_CBC_HMAC_ETA 8
166 #define NX_MODE_AES_CBC_HMAC_ATE 9
167 #define NX_MODE_AES_CBC_HMAC_EAA 10
168 #define NX_MODE_AES_CTR_HMAC_ETA 12
169 #define NX_MODE_AES_CTR_HMAC_ATE 13
170 #define NX_MODE_AES_CTR_HMAC_EAA 14
172 #define NX_FDM_CI_FULL 0
173 #define NX_FDM_CI_FIRST 1
174 #define NX_FDM_CI_LAST 2
175 #define NX_FDM_CI_MIDDLE 3
177 #define NX_FDM_PR_NONE 0
178 #define NX_FDM_PR_PAD 1
180 #define NX_KS_AES_128 1
181 #define NX_KS_AES_192 2
182 #define NX_KS_AES_256 3
184 #define NX_DS_SHA256 2
185 #define NX_DS_SHA512 3
189 #define NX_FC_AES_HMAC 6
191 #define NX_MAX_FC (NX_FC_AES_HMAC + 1)
192 #define NX_MAX_MODE (NX_MODE_AES_XCBC_MAC + 1)
194 #define HCOP_FC_AES NX_FC_AES
195 #define HCOP_FC_SHA NX_FC_SHA
196 #define HCOP_FC_AES_HMAC NX_FC_AES_HMAC
199 #define NX_PROPS_AES_128 0
200 #define NX_PROPS_AES_192 1
201 #define NX_PROPS_AES_256 2
202 #define NX_PROPS_SHA256 1
203 #define NX_PROPS_SHA512 2