| /linux/net/tipc/ |
| H A D | crypto.c | 37 #include <crypto/aead.h> 135 * struct tipc_aead - TIPC AEAD key structure 145 * @key: the aead key 181 * @aead: array of pointers to AEAD keys for encryption/decryption 206 struct tipc_aead __rcu *aead[KEY_MAX + 1]; member 240 struct tipc_aead *aead; member 247 struct tipc_aead *aead; member 251 static struct tipc_aead *tipc_aead_get(struct tipc_aead __rcu *aead); 252 static inline void tipc_aead_put(struct tipc_aead *aead); 254 static int tipc_aead_users(struct tipc_aead __rcu *aead); [all …]
|
| /linux/drivers/crypto/xilinx/ |
| H A D | zynqmp-aes-gcm.c | 11 #include <crypto/internal/aead.h> 53 struct aead_engine_alg aead; member 139 struct crypto_aead *aead = crypto_aead_reqtfm(req); in zynqmp_aes_aead_cipher() local 140 struct xilinx_aead_tfm_ctx *tfm_ctx = crypto_aead_ctx(aead); in zynqmp_aes_aead_cipher() 223 data_size = data_size + crypto_aead_authsize(aead); in zynqmp_aes_aead_cipher() 243 struct crypto_aead *aead = crypto_aead_reqtfm(req); in versal_aes_aead_cipher() local 244 struct xilinx_aead_tfm_ctx *tfm_ctx = crypto_aead_ctx(aead); in versal_aes_aead_cipher() 295 out_len = total_len + crypto_aead_authsize(aead); in versal_aes_aead_cipher() 428 struct crypto_aead *aead = crypto_aead_reqtfm(req); in xilinx_handle_aes_req() local 429 struct aead_alg *alg = crypto_aead_alg(aead); in xilinx_handle_aes_req() [all …]
|
| /linux/drivers/net/ovpn/ |
| H A D | crypto_aead.c | 10 #include <crypto/aead.h> 42 * an AEAD request structure with extra space for SG 44 * @tfm: the AEAD cipher handle 48 * the initialization vector (IV), the AEAD request, and an array of scatterlist 68 /* reserve space for the AEAD request */ in ovpn_aead_crypto_tmp_size() 81 * @aead: the AEAD cipher handle 85 * temporary buffer. If the AEAD cipher specifies an IV size, the pointer is 86 * adjusted using the AEAD's alignment mask to ensure proper alignment. 90 static u8 *ovpn_aead_crypto_tmp_iv(struct crypto_aead *aead, void *tmp) in ovpn_aead_crypto_tmp_iv() argument 92 return likely(crypto_aead_ivsize(aead)) ? in ovpn_aead_crypto_tmp_iv() [all …]
|
| /linux/drivers/crypto/cavium/nitrox/ |
| H A D | nitrox_aead.c | 7 #include <crypto/aead.h> 10 #include <crypto/internal/aead.h> 33 static int nitrox_aes_gcm_setkey(struct crypto_aead *aead, const u8 *key, in nitrox_aes_gcm_setkey() argument 37 struct nitrox_crypto_ctx *nctx = crypto_aead_ctx(aead); in nitrox_aes_gcm_setkey() 58 static int nitrox_aead_setauthsize(struct crypto_aead *aead, in nitrox_aead_setauthsize() argument 61 struct nitrox_crypto_ctx *nctx = crypto_aead_ctx(aead); in nitrox_aead_setauthsize() 69 aead->authsize = authsize; in nitrox_aead_setauthsize() 74 static int nitrox_aes_gcm_setauthsize(struct crypto_aead *aead, in nitrox_aes_gcm_setauthsize() argument 90 return nitrox_aead_setauthsize(aead, authsize); in nitrox_aes_gcm_setauthsize() 215 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in nitrox_aes_gcm_enc() local [all …]
|
| /linux/net/ipv4/ |
| H A D | esp4.c | 4 #include <crypto/aead.h> 40 * Allocate an AEAD request structure with extra space for SG and IV. 47 static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int extralen) in esp_alloc_tmp() argument 53 len += crypto_aead_ivsize(aead); in esp_alloc_tmp() 56 len += crypto_aead_alignmask(aead) & in esp_alloc_tmp() 61 len += sizeof(struct aead_request) + crypto_aead_reqsize(aead); in esp_alloc_tmp() 74 static inline u8 *esp_tmp_iv(struct crypto_aead *aead, void *tmp, int extralen) in esp_tmp_iv() argument 76 return crypto_aead_ivsize(aead) ? in esp_tmp_iv() 78 crypto_aead_alignmask(aead) + 1) : tmp + extralen; in esp_tmp_iv() 81 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument [all …]
|
| H A D | esp4_offload.c | 15 #include <crypto/aead.h> 211 struct crypto_aead *aead; in esp4_gso_segment() local 224 aead = x->data; in esp4_gso_segment() 230 if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) in esp4_gso_segment() 233 __skb_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead)); in esp4_gso_segment() 253 struct crypto_aead *aead = x->data; in esp_input_tail() local 256 if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead))) in esp_input_tail() 272 struct crypto_aead *aead; in esp_xmit() local 296 aead = x->data; in esp_xmit() 297 alen = crypto_aead_authsize(aead); in esp_xmit() [all …]
|
| /linux/net/rxrpc/ |
| H A D | rxgk_kdf.c | 102 struct crypto_aead *aead; in rxgk_set_up_ciphers() local 119 aead = crypto_krb5_prepare_encryption(krb5, &TK, RXGK_CLIENT_ENC_RESPONSE, gfp); in rxgk_set_up_ciphers() 120 if (IS_ERR(aead)) in rxgk_set_up_ciphers() 122 gk->resp_enc = aead; in rxgk_set_up_ciphers() 148 aead = crypto_krb5_prepare_encryption( in rxgk_set_up_ciphers() 150 if (IS_ERR(aead)) in rxgk_set_up_ciphers() 152 gk->tx_enc = aead; in rxgk_set_up_ciphers() 153 aead = crypto_krb5_prepare_encryption( in rxgk_set_up_ciphers() 155 if (IS_ERR(aead)) in rxgk_set_up_ciphers() 157 gk->rx_enc = aead; in rxgk_set_up_ciphers() [all …]
|
| /linux/net/ipv6/ |
| H A D | esp6.c | 16 #include <crypto/aead.h> 56 * Allocate an AEAD request structure with extra space for SG and IV. 64 static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int seqihlen) in esp_alloc_tmp() argument 70 len += crypto_aead_ivsize(aead); in esp_alloc_tmp() 73 len += crypto_aead_alignmask(aead) & in esp_alloc_tmp() 78 len += sizeof(struct aead_request) + crypto_aead_reqsize(aead); in esp_alloc_tmp() 91 static inline u8 *esp_tmp_iv(struct crypto_aead *aead, void *tmp, int seqhilen) in esp_tmp_iv() argument 93 return crypto_aead_ivsize(aead) ? in esp_tmp_iv() 95 crypto_aead_alignmask(aead) + 1) : tmp + seqhilen; in esp_tmp_iv() 98 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument [all …]
|
| H A D | esp6_offload.c | 15 #include <crypto/aead.h> 251 struct crypto_aead *aead; in esp6_gso_segment() local 264 aead = x->data; in esp6_gso_segment() 270 if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) in esp6_gso_segment() 273 __skb_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead)); in esp6_gso_segment() 291 struct crypto_aead *aead = x->data; in esp6_input_tail() local 294 if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead))) in esp6_input_tail() 310 struct crypto_aead *aead; in esp6_xmit() local 331 aead = x->data; in esp6_xmit() 332 alen = crypto_aead_authsize(aead); in esp6_xmit() [all …]
|
| /linux/include/crypto/ |
| H A D | aead.h | 3 * AEAD: Authenticated Encryption with Associated Data 18 * DOC: Authenticated Encryption With Associated Data (AEAD) Cipher API 20 * The AEAD cipher API is used with the ciphers of type CRYPTO_ALG_TYPE_AEAD 21 * (listed as type "aead" in /proc/crypto) 24 * However, the kernel supports other types of AEAD ciphers which are defined 32 * here as well. Naturally all *skcipher* symbols must be exchanged the *aead* 33 * pendants discussed in the following. In addition, for the AEAD operation, 40 * code is the key bonus an AEAD cipher has over "standard" block chaining 81 * struct aead_request - AEAD request 105 * struct aead_alg - AEAD cipher definition [all …]
|
| /linux/crypto/ |
| H A D | essiv.c | 3 * ESSIV skcipher and aead template for block encryption 17 * we need to instantiate an aead that accepts the same special key format 19 * embedded into the AAD area of the aead request. This means the AEAD 32 #include <crypto/internal/aead.h> 53 struct crypto_aead *aead; member 102 crypto_aead_clear_flags(tctx->u.aead, CRYPTO_TFM_REQ_MASK); in essiv_aead_setkey() 103 crypto_aead_set_flags(tctx->u.aead, crypto_aead_get_flags(tfm) & in essiv_aead_setkey() 105 err = crypto_aead_setkey(tctx->u.aead, key, keylen); in essiv_aead_setkey() 131 return crypto_aead_setauthsize(tctx->u.aead, authsize); in essiv_aead_setauthsize() 244 aead_request_set_tfm(subreq, tctx->u.aead); in essiv_aead_crypt() [all …]
|
| H A D | ccm.c | 8 #include <crypto/internal/aead.h> 84 static int crypto_ccm_setkey(struct crypto_aead *aead, const u8 *key, in crypto_ccm_setkey() argument 87 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead); in crypto_ccm_setkey() 93 crypto_skcipher_set_flags(ctr, crypto_aead_get_flags(aead) & in crypto_ccm_setkey() 100 crypto_ahash_set_flags(mac, crypto_aead_get_flags(aead) & in crypto_ccm_setkey() 127 struct crypto_aead *aead = crypto_aead_reqtfm(req); in format_input() local 132 m = crypto_aead_authsize(aead); in format_input() 169 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_ccm_auth() local 170 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead); in crypto_ccm_auth() 227 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_ccm_encrypt_done() local [all …]
|
| /linux/include/crypto/internal/ |
| H A D | aead.h | 3 * AEAD: Authenticated Encryption with Associated Data 11 #include <crypto/aead.h> 58 static inline struct aead_instance *aead_alg_instance(struct crypto_aead *aead) in aead_alg_instance() argument 60 return aead_instance(crypto_tfm_alg_instance(&aead->base)); in aead_alg_instance() 120 static inline void crypto_aead_set_reqsize(struct crypto_aead *aead, in crypto_aead_set_reqsize() argument 123 aead->reqsize = reqsize; in crypto_aead_set_reqsize() 126 static inline void crypto_aead_set_reqsize_dma(struct crypto_aead *aead, in crypto_aead_set_reqsize_dma() argument 130 aead->reqsize = reqsize; in crypto_aead_set_reqsize_dma()
|
| /linux/arch/arm64/crypto/ |
| H A D | sm4-ce-ccm-glue.c | 3 * SM4-CCM AEAD Algorithm using ARMv8 Crypto Extensions 16 #include <crypto/internal/aead.h> 55 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_format_input() local 70 m = crypto_aead_authsize(aead); in ccm_format_input() 92 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_calculate_auth_mac() local 93 struct sm4_ctx *ctx = crypto_aead_ctx(aead); in ccm_calculate_auth_mac() 193 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_encrypt() local 194 struct sm4_ctx *ctx = crypto_aead_ctx(aead); in ccm_encrypt() 213 crypto_aead_authsize(aead), 1); in ccm_encrypt() 220 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_decrypt() local [all …]
|
| H A D | sm4-ce-gcm-glue.c | 3 * SM4-GCM AEAD Algorithm using ARMv8 Crypto Extensions 17 #include <crypto/internal/aead.h> 73 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_calculate_auth_mac() local 74 struct sm4_gcm_ctx *ctx = crypto_aead_ctx(aead); in gcm_calculate_auth_mac() 137 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_crypt() local 138 struct sm4_gcm_ctx *ctx = crypto_aead_ctx(aead); in gcm_crypt() 177 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_encrypt() local 189 crypto_aead_authsize(aead), 1); in gcm_encrypt() 196 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_decrypt() local 197 unsigned int authsize = crypto_aead_authsize(aead); in gcm_decrypt()
|
| /linux/security/keys/trusted-keys/ |
| H A D | trusted_dcp.c | 6 #include <crypto/aead.h> 134 struct crypto_aead *aead; in do_aead_crypto() local 138 aead = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC); in do_aead_crypto() 139 if (IS_ERR(aead)) { in do_aead_crypto() 140 ret = PTR_ERR(aead); in do_aead_crypto() 144 ret = crypto_aead_setauthsize(aead, DCP_BLOB_AUTHLEN); in do_aead_crypto() 150 aead_req = aead_request_alloc(aead, GFP_KERNEL); in do_aead_crypto() 171 if (crypto_aead_setkey(aead, key, AES_KEYSIZE_128)) { in do_aead_crypto() 172 pr_err("Can't set crypto AEAD key\n"); in do_aead_crypto() 185 crypto_free_aead(aead); in do_aead_crypto()
|
| /linux/net/xfrm/ |
| H A D | xfrm_algo.c | 9 #include <crypto/aead.h> 32 .aead = { 51 .aead = { 70 .aead = { 89 .aead = { 108 .aead = { 127 .aead = { 146 .aead = { 165 .aead = { 750 const struct xfrm_aead_name *aead in xfrm_ealg_get_byname() 770 const struct xfrm_aead_name *aead = data; xfrm_aead_name_match() local [all...] |
| /linux/net/tls/ |
| H A D | tls_device_fallback.c | 33 #include <crypto/aead.h> 41 struct crypto_aead *aead, char *aad, in tls_enc_record() argument 112 struct crypto_aead *aead) in tls_init_aead_request() argument 114 aead_request_set_tfm(aead_req, aead); in tls_init_aead_request() 118 static struct aead_request *tls_alloc_aead_request(struct crypto_aead *aead, in tls_alloc_aead_request() argument 122 crypto_aead_reqsize(aead); in tls_alloc_aead_request() 127 tls_init_aead_request(aead_req, aead); in tls_alloc_aead_request() 132 struct crypto_aead *aead, struct scatterlist *sg_in, in tls_enc_records() argument 143 rc = tls_enc_record(aead_req, aead, aad, iv, in tls_enc_records()
|
| /linux/Documentation/crypto/ |
| H A D | krb5.rst | 19 - The krb5enc AEAD algorithm 195 crypto object, an AEAD template for encryption and a synchronous hash for 205 struct crypto_aead *aead, 211 struct crypto_aead *aead, 257 The krb5enc AEAD algorithm 260 A template AEAD crypto algorithm, called "krb5enc", is provided that hashes the
|
| /linux/drivers/crypto/bcm/ |
| H A D | cipher.h | 16 #include <crypto/aead.h> 110 struct aead_alg aead; member 164 /* Buffers only used for aead */ 273 * For AEAD requests, start of associated data. This will typically 282 * API src scatterlist for AEAD starts with AAD, if present. For first 291 * Same for destination. For AEAD, if there is AAD, output data must 308 * buffer for AEAD requests. So allocate as DMAable memory. If IV 458 /* Number of ICV check failures for AEAD messages */
|
| /linux/drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/ |
| H A D | chcr_ipsec.c | 55 #include <crypto/internal/aead.h> 58 #include <crypto/aead.h> 146 int authsize = x->aead->alg_icv_len / 8; in ch_ipsec_setauthsize() 169 int keylen = (x->aead->alg_key_len + 7) / 8; in ch_ipsec_setkey() 170 unsigned char *key = x->aead->alg_key; in ch_ipsec_setkey() 262 if (!x->aead) { in ch_ipsec_xfrm_add_state() 263 NL_SET_ERR_MSG_MOD(extack, "Cannot offload xfrm states without aead"); in ch_ipsec_xfrm_add_state() 266 if (x->aead->alg_icv_len != 128 && in ch_ipsec_xfrm_add_state() 267 x->aead->alg_icv_len != 96) { in ch_ipsec_xfrm_add_state() 268 …NL_SET_ERR_MSG_MOD(extack, "Cannot offload xfrm states with AEAD ICV length other than 96b & 128b"… in ch_ipsec_xfrm_add_state() [all …]
|
| /linux/tools/testing/selftests/net/ |
| H A D | l2tp.sh | 246 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \ 251 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \ 256 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \ 261 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \ 285 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \ 290 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \ 295 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \ 300 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \
|
| /linux/drivers/crypto/ |
| H A D | talitos.c | 36 #include <crypto/internal/aead.h> 914 * Defines a priority for doing AEAD with descriptors type 1066 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in ipsec_esp_unmap() local 1067 struct talitos_ctx *ctx = crypto_aead_ctx(aead); in ipsec_esp_unmap() 1068 unsigned int ivsize = crypto_aead_ivsize(aead); in ipsec_esp_unmap() 1069 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp_unmap() 1274 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in ipsec_esp() local 1275 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp() 1276 struct talitos_ctx *ctx = crypto_aead_ctx(aead); in ipsec_esp() 1280 unsigned int ivsize = crypto_aead_ivsize(aead); in ipsec_esp() [all …]
|
| /linux/fs/afs/ |
| H A D | cm_security.c | 185 struct crypto_aead *aead; in afs_create_yfs_cm_token() local 318 aead = crypto_krb5_prepare_encryption(token_krb5, token_key, RXGK_SERVER_ENC_TOKEN, in afs_create_yfs_cm_token() 320 if (IS_ERR(aead)) { in afs_create_yfs_cm_token() 321 ret = PTR_ERR(aead); in afs_create_yfs_cm_token() 326 ret = crypto_krb5_encrypt(token_krb5, aead, &sg, 1, encsize, offset, toksize, false); in afs_create_yfs_cm_token() 335 crypto_free_aead(aead); in afs_create_yfs_cm_token()
|
| /linux/net/sunrpc/auth_gss/ |
| H A D | gss_krb5_crypto.c | 100 * by a single AEAD operation through the crypto/krb5 library. 111 struct crypto_aead *aead = kctx->initiate ? in gss_krb5_aead_encrypt() local 143 * The AEAD operates in-place, but on the client send path the in gss_krb5_aead_encrypt() 179 ret = crypto_krb5_encrypt(krb5, aead, sg, nsg, sec_len, in gss_krb5_aead_encrypt() 208 struct crypto_aead *aead = kctx->initiate ? in gss_krb5_aead_decrypt() local 230 ret = crypto_krb5_decrypt(krb5, aead, sg, nsg, in gss_krb5_aead_decrypt()
|