/Linux-v5.4/drivers/s390/cio/ |
D | airq.c | 134 struct airq_iv *iv; in airq_iv_create() local 137 iv = kzalloc(sizeof(*iv), GFP_KERNEL); in airq_iv_create() 138 if (!iv) in airq_iv_create() 140 iv->bits = bits; in airq_iv_create() 141 iv->flags = flags; in airq_iv_create() 149 iv->vector = dma_pool_zalloc(airq_iv_cache, GFP_KERNEL, in airq_iv_create() 150 &iv->vector_dma); in airq_iv_create() 151 if (!iv->vector) in airq_iv_create() 154 iv->vector = cio_dma_zalloc(size); in airq_iv_create() 155 if (!iv->vector) in airq_iv_create() [all …]
|
/Linux-v5.4/arch/s390/include/asm/ |
D | airq.h | 51 void airq_iv_release(struct airq_iv *iv); 52 unsigned long airq_iv_alloc(struct airq_iv *iv, unsigned long num); 53 void airq_iv_free(struct airq_iv *iv, unsigned long bit, unsigned long num); 54 unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, 57 static inline unsigned long airq_iv_alloc_bit(struct airq_iv *iv) in airq_iv_alloc_bit() argument 59 return airq_iv_alloc(iv, 1); in airq_iv_alloc_bit() 62 static inline void airq_iv_free_bit(struct airq_iv *iv, unsigned long bit) in airq_iv_free_bit() argument 64 airq_iv_free(iv, bit, 1); in airq_iv_free_bit() 67 static inline unsigned long airq_iv_end(struct airq_iv *iv) in airq_iv_end() argument 69 return iv->end; in airq_iv_end() [all …]
|
/Linux-v5.4/crypto/ |
D | testmgr.h | 66 const char *iv; member 101 const char *iv; member 7359 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10", 7371 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef", 7379 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c", 7387 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f", 7395 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47", 7467 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD", 7535 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47", 7767 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", [all …]
|
D | cfb.c | 50 u8 *iv = walk->iv; in crypto_cfb_final() local 53 crypto_cfb_encrypt_one(tfm, iv, stream); in crypto_cfb_final() 64 u8 *iv = walk->iv; in crypto_cfb_encrypt_segment() local 67 crypto_cfb_encrypt_one(tfm, iv, dst); in crypto_cfb_encrypt_segment() 69 iv = dst; in crypto_cfb_encrypt_segment() 75 memcpy(walk->iv, iv, bsize); in crypto_cfb_encrypt_segment() 86 u8 *iv = walk->iv; in crypto_cfb_encrypt_inplace() local 90 crypto_cfb_encrypt_one(tfm, iv, tmp); in crypto_cfb_encrypt_inplace() 92 iv = src; in crypto_cfb_encrypt_inplace() 97 memcpy(walk->iv, iv, bsize); in crypto_cfb_encrypt_inplace() [all …]
|
D | pcbc.c | 27 u8 * const iv = walk->iv; in crypto_pcbc_encrypt_segment() local 30 crypto_xor(iv, src, bsize); in crypto_pcbc_encrypt_segment() 31 crypto_cipher_encrypt_one(tfm, dst, iv); in crypto_pcbc_encrypt_segment() 32 crypto_xor_cpy(iv, dst, src, bsize); in crypto_pcbc_encrypt_segment() 48 u8 * const iv = walk->iv; in crypto_pcbc_encrypt_inplace() local 53 crypto_xor(iv, src, bsize); in crypto_pcbc_encrypt_inplace() 54 crypto_cipher_encrypt_one(tfm, src, iv); in crypto_pcbc_encrypt_inplace() 55 crypto_xor_cpy(iv, tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace() 94 u8 * const iv = walk->iv; in crypto_pcbc_decrypt_segment() local 98 crypto_xor(dst, iv, bsize); in crypto_pcbc_decrypt_segment() [all …]
|
D | ofb.c | 30 u8 * const iv = walk.iv; in crypto_ofb_crypt() local 34 crypto_cipher_encrypt_one(cipher, iv, iv); in crypto_ofb_crypt() 35 crypto_xor_cpy(dst, src, iv, bsize); in crypto_ofb_crypt() 44 crypto_cipher_encrypt_one(cipher, walk.iv, walk.iv); in crypto_ofb_crypt() 45 crypto_xor_cpy(walk.dst.virt.addr, walk.src.virt.addr, walk.iv, in crypto_ofb_crypt()
|
D | chacha_generic.c | 35 const struct chacha_ctx *ctx, const u8 *iv) in chacha_stream_xor() argument 43 crypto_chacha_init(state, ctx, iv); in chacha_stream_xor() 59 void crypto_chacha_init(u32 *state, const struct chacha_ctx *ctx, const u8 *iv) in crypto_chacha_init() argument 73 state[12] = get_unaligned_le32(iv + 0); in crypto_chacha_init() 74 state[13] = get_unaligned_le32(iv + 4); in crypto_chacha_init() 75 state[14] = get_unaligned_le32(iv + 8); in crypto_chacha_init() 76 state[15] = get_unaligned_le32(iv + 12); in crypto_chacha_init() 115 return chacha_stream_xor(req, ctx, req->iv); in crypto_chacha_crypt() 128 crypto_chacha_init(state, ctx, req->iv); in crypto_xchacha_crypt() 133 memcpy(&real_iv[0], req->iv + 24, 8); /* stream position */ in crypto_xchacha_crypt() [all …]
|
/Linux-v5.4/include/crypto/ |
D | cbc.h | 23 u8 *iv = walk->iv; in crypto_cbc_encrypt_segment() local 26 crypto_xor(iv, src, bsize); in crypto_cbc_encrypt_segment() 27 fn(tfm, iv, dst); in crypto_cbc_encrypt_segment() 28 memcpy(iv, dst, bsize); in crypto_cbc_encrypt_segment() 44 u8 *iv = walk->iv; in crypto_cbc_encrypt_inplace() local 47 crypto_xor(src, iv, bsize); in crypto_cbc_encrypt_inplace() 49 iv = src; in crypto_cbc_encrypt_inplace() 54 memcpy(walk->iv, iv, bsize); in crypto_cbc_encrypt_inplace() 88 u8 *iv = walk->iv; in crypto_cbc_decrypt_segment() local 92 crypto_xor(dst, iv, bsize); in crypto_cbc_decrypt_segment() [all …]
|
/Linux-v5.4/drivers/staging/wlan-ng/ |
D | p80211wep.c | 145 u8 *iv, u8 *icv) in wep_decrypt() argument 156 key[0] = iv[0]; in wep_decrypt() 157 key[1] = iv[1]; in wep_decrypt() 158 key[2] = iv[2]; in wep_decrypt() 159 keyidx = WEP_KEY(iv[3]); in wep_decrypt() 218 u8 *dst, u32 len, int keynum, u8 *iv, u8 *icv) in wep_encrypt() argument 235 get_random_bytes(iv, 3); in wep_encrypt() 236 while ((iv[1] == 0xff) && (iv[0] >= 3) && (iv[0] < keylen)) in wep_encrypt() 237 get_random_bytes(iv, 3); in wep_encrypt() 239 iv[3] = (keynum & 0x03) << 6; in wep_encrypt() [all …]
|
/Linux-v5.4/arch/x86/crypto/ |
D | aesni-intel_glue.c | 95 const u8 *in, unsigned int len, u8 *iv); 97 const u8 *in, unsigned int len, u8 *iv); 105 const u8 *in, unsigned int len, u8 *iv); 107 const u8 *in, unsigned int len, u8 *iv); 110 const u8 *in, bool enc, u8 *iv); 129 const u8 *in, unsigned long plaintext_len, u8 *iv, 151 const u8 *in, unsigned long ciphertext_len, u8 *iv, 158 u8 *iv, 173 void (*init)(void *ctx, struct gcm_context_data *gdata, u8 *iv, 191 asmlinkage void aes_ctr_enc_128_avx_by8(const u8 *in, u8 *iv, [all …]
|
D | glue_helper-asm-avx2.S | 55 #define load_ctr_16way(iv, bswap, x0, x1, x2, x3, x4, x5, x6, x7, t0, t0x, t1, \ argument 62 vmovdqu (iv), t2x; \ 86 vmovdqu t2x, (iv); 99 #define gf128mul_x_ble(iv, mask, tmp) \ argument 100 vpsrad $31, iv, tmp; \ 101 vpaddq iv, iv, iv; \ 104 vpxor tmp, iv, iv; 106 #define gf128mul_x2_ble(iv, mask1, mask2, tmp0, tmp1) \ argument 107 vpsrad $31, iv, tmp0; \ 108 vpaddq iv, iv, tmp1; \ [all …]
|
D | glue_helper.c | 80 u128 *iv = (u128 *)walk.iv; in glue_cbc_encrypt_req_128bit() local 83 u128_xor(dst, src, iv); in glue_cbc_encrypt_req_128bit() 85 iv = dst; in glue_cbc_encrypt_req_128bit() 91 *(u128 *)walk.iv = *iv; in glue_cbc_encrypt_req_128bit() 148 u128_xor(dst, dst, (u128 *)walk.iv); in glue_cbc_decrypt_req_128bit() 149 *(u128 *)walk.iv = last_iv; in glue_cbc_decrypt_req_128bit() 180 be128_to_le128(&ctrblk, (be128 *)walk.iv); in glue_ctr_req_128bit() 201 le128_to_be128((be128 *)walk.iv, &ctrblk); in glue_ctr_req_128bit() 211 be128_to_le128(&ctrblk, (be128 *)walk.iv); in glue_ctr_req_128bit() 216 le128_to_be128((be128 *)walk.iv, &ctrblk); in glue_ctr_req_128bit() [all …]
|
D | glue_helper-asm-avx.S | 44 #define load_ctr_8way(iv, bswap, x0, x1, x2, x3, x4, x5, x6, x7, t0, t1, t2) \ argument 50 vmovdqu (iv), x7; \ 70 vmovdqu t2, (iv); 83 #define gf128mul_x_ble(iv, mask, tmp) \ argument 84 vpsrad $31, iv, tmp; \ 85 vpaddq iv, iv, iv; \ 88 vpxor tmp, iv, iv; 90 #define load_xts_8way(iv, src, dst, x0, x1, x2, x3, x4, x5, x6, x7, tiv, t0, \ argument 95 vmovdqu (iv), tiv; \ 129 vmovdqu tiv, (iv);
|
D | twofish_glue_3way.c | 54 void twofish_enc_blk_ctr(void *ctx, u128 *dst, const u128 *src, le128 *iv) in twofish_enc_blk_ctr() argument 61 le128_to_be128(&ctrblk, iv); in twofish_enc_blk_ctr() 62 le128_inc(iv); in twofish_enc_blk_ctr() 70 le128 *iv) in twofish_enc_blk_ctr_3way() argument 80 le128_to_be128(&ctrblks[0], iv); in twofish_enc_blk_ctr_3way() 81 le128_inc(iv); in twofish_enc_blk_ctr_3way() 82 le128_to_be128(&ctrblks[1], iv); in twofish_enc_blk_ctr_3way() 83 le128_inc(iv); in twofish_enc_blk_ctr_3way() 84 le128_to_be128(&ctrblks[2], iv); in twofish_enc_blk_ctr_3way() 85 le128_inc(iv); in twofish_enc_blk_ctr_3way()
|
/Linux-v5.4/arch/arm64/crypto/ |
D | ghash-ce-glue.c | 424 u8 iv[AES_BLOCK_SIZE]; in gcm_encrypt() local 434 memcpy(iv, req->iv, GCM_IV_SIZE); in gcm_encrypt() 435 put_unaligned_be32(1, iv + GCM_IV_SIZE); in gcm_encrypt() 443 pmull_gcm_encrypt_block(tag, iv, ctx->aes_key.key_enc, nrounds); in gcm_encrypt() 444 put_unaligned_be32(2, iv + GCM_IV_SIZE); in gcm_encrypt() 445 pmull_gcm_encrypt_block(ks, iv, NULL, nrounds); in gcm_encrypt() 446 put_unaligned_be32(3, iv + GCM_IV_SIZE); in gcm_encrypt() 447 pmull_gcm_encrypt_block(ks + AES_BLOCK_SIZE, iv, NULL, nrounds); in gcm_encrypt() 448 put_unaligned_be32(4, iv + GCM_IV_SIZE); in gcm_encrypt() 458 iv, rk, nrounds, ks); in gcm_encrypt() [all …]
|
/Linux-v5.4/drivers/crypto/nx/ |
D | nx-aes-ccm.c | 123 static inline int crypto_ccm_check_iv(const u8 *iv) in crypto_ccm_check_iv() argument 126 if (1 > iv[0] || iv[0] > 7) in crypto_ccm_check_iv() 133 static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize, in generate_b0() argument 139 memcpy(b0, iv, 16); in generate_b0() 156 static int generate_pat(u8 *iv, in generate_pat() argument 172 memset(iv + 15 - iv[0], 0, iv[0] + 1); in generate_pat() 211 rc = generate_b0(iv, assoclen, authsize, nbytes, b0); in generate_pat() 485 u8 *iv = rctx->iv; in ccm4309_aes_nx_encrypt() local 487 iv[0] = 3; in ccm4309_aes_nx_encrypt() 488 memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3); in ccm4309_aes_nx_encrypt() [all …]
|
D | nx-aes-ctr.c | 89 processed, csbcpb->cpb.aes_ctr.iv); in ctr_aes_nx_crypt() 122 u8 iv[16]; in ctr3686_aes_nx_crypt() local 124 memcpy(iv, nx_ctx->priv.ctr.nonce, CTR_RFC3686_IV_SIZE); in ctr3686_aes_nx_crypt() 125 memcpy(iv + CTR_RFC3686_NONCE_SIZE, in ctr3686_aes_nx_crypt() 127 iv[12] = iv[13] = iv[14] = 0; in ctr3686_aes_nx_crypt() 128 iv[15] = 1; in ctr3686_aes_nx_crypt() 130 desc->info = iv; in ctr3686_aes_nx_crypt()
|
/Linux-v5.4/net/mac80211/ |
D | wep.c | 33 static inline bool ieee80211_wep_weak_iv(u32 iv, int keylen) in ieee80211_wep_weak_iv() argument 40 if ((iv & 0xff00) == 0xff00) { in ieee80211_wep_weak_iv() 41 u8 B = (iv >> 16) & 0xff; in ieee80211_wep_weak_iv() 50 int keylen, int keyidx, u8 *iv) in ieee80211_wep_get_iv() argument 56 if (!iv) in ieee80211_wep_get_iv() 59 *iv++ = (local->wep_iv >> 16) & 0xff; in ieee80211_wep_get_iv() 60 *iv++ = (local->wep_iv >> 8) & 0xff; in ieee80211_wep_get_iv() 61 *iv++ = local->wep_iv & 0xff; in ieee80211_wep_get_iv() 62 *iv++ = keyidx << 6; in ieee80211_wep_get_iv() 137 u8 *iv; in ieee80211_wep_encrypt() local [all …]
|
D | aes_gmac.c | 21 u8 *zero, *__aad, iv[AES_BLOCK_SIZE]; in ieee80211_aes_gmac() local 42 memcpy(iv, nonce, GMAC_NONCE_LEN); in ieee80211_aes_gmac() 43 memset(iv + GMAC_NONCE_LEN, 0, sizeof(iv) - GMAC_NONCE_LEN); in ieee80211_aes_gmac() 44 iv[AES_BLOCK_SIZE - 1] = 0x01; in ieee80211_aes_gmac() 47 aead_request_set_crypt(aead_req, sg, sg, 0, iv); in ieee80211_aes_gmac()
|
/Linux-v5.4/arch/x86/include/asm/crypto/ |
D | serpent-avx.h | 26 const u8 *src, le128 *iv); 29 const u8 *src, le128 *iv); 31 const u8 *src, le128 *iv); 34 le128 *iv); 36 extern void serpent_xts_enc(void *ctx, u128 *dst, const u128 *src, le128 *iv); 37 extern void serpent_xts_dec(void *ctx, u128 *dst, const u128 *src, le128 *iv);
|
D | camellia.h | 55 const u8 *src, le128 *iv); 58 const u8 *src, le128 *iv); 60 const u8 *src, le128 *iv); 89 le128 *iv); 91 le128 *iv); 93 extern void camellia_xts_enc(void *ctx, u128 *dst, const u128 *src, le128 *iv); 94 extern void camellia_xts_dec(void *ctx, u128 *dst, const u128 *src, le128 *iv);
|
/Linux-v5.4/block/ |
D | blk-integrity.c | 29 struct bio_vec iv, ivprv = { NULL }; in blk_rq_count_integrity_sg() local 35 bio_for_each_integrity_vec(iv, bio, iter) { in blk_rq_count_integrity_sg() 38 if (!biovec_phys_mergeable(q, &ivprv, &iv)) in blk_rq_count_integrity_sg() 40 if (seg_size + iv.bv_len > queue_max_segment_size(q)) in blk_rq_count_integrity_sg() 43 seg_size += iv.bv_len; in blk_rq_count_integrity_sg() 47 seg_size = iv.bv_len; in blk_rq_count_integrity_sg() 51 ivprv = iv; in blk_rq_count_integrity_sg() 71 struct bio_vec iv, ivprv = { NULL }; in blk_rq_map_integrity_sg() local 77 bio_for_each_integrity_vec(iv, bio, iter) { in blk_rq_map_integrity_sg() 80 if (!biovec_phys_mergeable(q, &ivprv, &iv)) in blk_rq_map_integrity_sg() [all …]
|
/Linux-v5.4/drivers/crypto/amcc/ |
D | crypto4xx_alg.c | 75 __le32 iv[AES_IV_SIZE]; in crypto4xx_crypt() local 81 crypto4xx_memcpy_to_le32(iv, req->iv, ivlen); in crypto4xx_crypt() 84 req->cryptlen, iv, ivlen, decrypt ? ctx->sa_in : ctx->sa_out, in crypto4xx_crypt() 229 __le32 iv[AES_IV_SIZE / 4] = { in crypto4xx_rfc3686_encrypt() local 231 cpu_to_le32p((u32 *) req->iv), in crypto4xx_rfc3686_encrypt() 232 cpu_to_le32p((u32 *) (req->iv + 4)), in crypto4xx_rfc3686_encrypt() 236 req->cryptlen, iv, AES_IV_SIZE, in crypto4xx_rfc3686_encrypt() 244 __le32 iv[AES_IV_SIZE / 4] = { in crypto4xx_rfc3686_decrypt() local 246 cpu_to_le32p((u32 *) req->iv), in crypto4xx_rfc3686_decrypt() 247 cpu_to_le32p((u32 *) (req->iv + 4)), in crypto4xx_rfc3686_decrypt() [all …]
|
/Linux-v5.4/net/rxrpc/ |
D | rxkad.c | 106 struct rxrpc_crypt iv; in rxkad_prime_packet_security() local 126 memcpy(&iv, token->kad->session_key, sizeof(iv)); in rxkad_prime_packet_security() 136 skcipher_request_set_crypt(req, &sg, &sg, tmpsize, iv.x); in rxkad_prime_packet_security() 186 struct rxrpc_crypt iv; in rxkad_secure_packet_auth() local 199 memset(&iv, 0, sizeof(iv)); in rxkad_secure_packet_auth() 204 skcipher_request_set_crypt(req, &sg, &sg, 8, iv.x); in rxkad_secure_packet_auth() 224 struct rxrpc_crypt iv; in rxkad_secure_packet_encrypt() local 242 memcpy(&iv, token->kad->session_key, sizeof(iv)); in rxkad_secure_packet_encrypt() 247 skcipher_request_set_crypt(req, &sg[0], &sg[0], sizeof(rxkhdr), iv.x); in rxkad_secure_packet_encrypt() 262 skcipher_request_set_crypt(req, sg, sg, len, iv.x); in rxkad_secure_packet_encrypt() [all …]
|
/Linux-v5.4/drivers/ssb/ |
D | host_soc.c | 177 struct ssb_init_invariants *iv) in ssb_host_soc_get_invariants() argument 183 memset(&iv->boardinfo, 0, sizeof(struct ssb_boardinfo)); in ssb_host_soc_get_invariants() 187 err = kstrtou16(strim(buf), 0, &iv->boardinfo.vendor); in ssb_host_soc_get_invariants() 192 if (!iv->boardinfo.vendor) in ssb_host_soc_get_invariants() 193 iv->boardinfo.vendor = SSB_BOARDVENDOR_BCM; in ssb_host_soc_get_invariants() 197 err = kstrtou16(strim(buf), 0, &iv->boardinfo.type); in ssb_host_soc_get_invariants() 203 memset(&iv->sprom, 0, sizeof(struct ssb_sprom)); in ssb_host_soc_get_invariants() 204 ssb_fill_sprom_with_fallback(bus, &iv->sprom); in ssb_host_soc_get_invariants() 207 iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10); in ssb_host_soc_get_invariants()
|