Home
last modified time | relevance | path

Searched refs:iv (Results 1 – 25 of 471) sorted by relevance

12345678910>>...19

/freebsd/sys/crypto/rijndael/
H A Drijndael-api-fst.c84 uint8_t block[16], iv[4][4]; in rijndael_blockEncrypt() local
109 memcpy(iv, input, 16); in rijndael_blockEncrypt()
110 ((uint32_t*)block)[0] ^= ((uint32_t*)iv)[0]; in rijndael_blockEncrypt()
111 ((uint32_t*)block)[1] ^= ((uint32_t*)iv)[1]; in rijndael_blockEncrypt()
112 ((uint32_t*)block)[2] ^= ((uint32_t*)iv)[2]; in rijndael_blockEncrypt()
113 ((uint32_t*)block)[3] ^= ((uint32_t*)iv)[3]; in rijndael_blockEncrypt()
125 memcpy(iv, input, 16); in rijndael_blockEncrypt()
126 ((uint32_t*)block)[0] ^= ((uint32_t*)iv)[0]; in rijndael_blockEncrypt()
127 ((uint32_t*)block)[1] ^= ((uint32_t*)iv)[1]; in rijndael_blockEncrypt()
128 ((uint32_t*)block)[2] ^= ((uint32_t*)iv)[2]; in rijndael_blockEncrypt()
[all …]
/freebsd/crypto/openssl/crypto/des/
H A Dcfb64ede.c33 unsigned char *iv, c, cc; in DES_ede3_cfb64_encrypt() local
35 iv = &(*ivec)[0]; in DES_ede3_cfb64_encrypt()
39 c2l(iv, v0); in DES_ede3_cfb64_encrypt()
40 c2l(iv, v1); in DES_ede3_cfb64_encrypt()
48 iv = &(*ivec)[0]; in DES_ede3_cfb64_encrypt()
49 l2c(v0, iv); in DES_ede3_cfb64_encrypt()
50 l2c(v1, iv); in DES_ede3_cfb64_encrypt()
51 iv = &(*ivec)[0]; in DES_ede3_cfb64_encrypt()
53 c = *(in++) ^ iv[n]; in DES_ede3_cfb64_encrypt()
55 iv[n] = c; in DES_ede3_cfb64_encrypt()
[all …]
H A Dcfb64enc.c32 unsigned char *iv, c, cc; in DES_cfb64_encrypt() local
34 iv = &(*ivec)[0]; in DES_cfb64_encrypt()
38 c2l(iv, v0); in DES_cfb64_encrypt()
40 c2l(iv, v1); in DES_cfb64_encrypt()
43 iv = &(*ivec)[0]; in DES_cfb64_encrypt()
45 l2c(v0, iv); in DES_cfb64_encrypt()
47 l2c(v0, iv); in DES_cfb64_encrypt()
48 iv = &(*ivec)[0]; in DES_cfb64_encrypt()
50 c = *(in++) ^ iv[n]; in DES_cfb64_encrypt()
52 iv[n] = c; in DES_cfb64_encrypt()
[all …]
H A Dcfb_enc.c39 unsigned char *iv; in DES_cfb_encrypt() local
54 iv = &(*ivec)[0]; in DES_cfb_encrypt()
55 c2l(iv, v0); in DES_cfb_encrypt()
56 c2l(iv, v1); in DES_cfb_encrypt()
81 iv = &ovec[0]; in DES_cfb_encrypt()
82 l2c(v0, iv); in DES_cfb_encrypt()
83 l2c(v1, iv); in DES_cfb_encrypt()
84 l2c(d0, iv); in DES_cfb_encrypt()
85 l2c(d1, iv); in DES_cfb_encrypt()
98 iv = &ovec[0]; in DES_cfb_encrypt()
[all …]
H A Dncbc_enc.c31 unsigned char *iv; in DES_cbc_encrypt() local
33 iv = &(*ivec)[0]; in DES_cbc_encrypt()
36 c2l(iv, tout0); in DES_cbc_encrypt()
37 c2l(iv, tout1); in DES_cbc_encrypt()
64 iv = &(*ivec)[0]; in DES_cbc_encrypt()
65 l2c(tout0, iv); in DES_cbc_encrypt()
66 l2c(tout1, iv); in DES_cbc_encrypt()
69 c2l(iv, xor0); in DES_cbc_encrypt()
70 c2l(iv, xor1); in DES_cbc_encrypt()
99 iv = &(*ivec)[0]; in DES_cbc_encrypt()
[all …]
H A Dxcbc_enc.c31 unsigned char *iv; in DES_xcbc_encrypt() local
40 iv = &(*ivec)[0]; in DES_xcbc_encrypt()
43 c2l(iv, tout0); in DES_xcbc_encrypt()
44 c2l(iv, tout1); in DES_xcbc_encrypt()
70 iv = &(*ivec)[0]; in DES_xcbc_encrypt()
71 l2c(tout0, iv); in DES_xcbc_encrypt()
72 l2c(tout1, iv); in DES_xcbc_encrypt()
74 c2l(iv, xor0); in DES_xcbc_encrypt()
75 c2l(iv, xor1); in DES_xcbc_encrypt()
102 iv = &(*ivec)[0]; in DES_xcbc_encrypt()
[all …]
/freebsd/crypto/openssl/test/
H A Digetest.c39 const unsigned char iv[32]; member
83 const unsigned char iv[64]; member
154 unsigned char iv[AES_BLOCK_SIZE * 2]; in test_ige_vectors() local
164 memcpy(iv, v->iv, sizeof(iv)); in test_ige_vectors()
165 AES_ige_encrypt(v->in, buf, v->length, &key, iv, v->encrypt); in test_ige_vectors()
170 test_output_memory("iv", v->iv, sizeof(v->iv)); in test_ige_vectors()
176 memcpy(iv, v->iv, sizeof(iv)); in test_ige_vectors()
178 AES_ige_encrypt(buf, buf, v->length, &key, iv, v->encrypt); in test_ige_vectors()
183 test_output_memory("iv", v->iv, sizeof(v->iv)); in test_ige_vectors()
209 AES_bi_ige_encrypt(v->in, buf, v->length, &key1, &key2, v->iv, in test_bi_ige_vectors()
[all …]
H A Dbftest.c350 unsigned char cbc_in[40], cbc_out[40], iv[8]; in test_bf_cbc() local
360 memcpy(iv, cbc_iv, sizeof(iv)); in test_bf_cbc()
362 &key, iv, BF_ENCRYPT); in test_bf_cbc()
366 memcpy(iv, cbc_iv, 8); in test_bf_cbc()
367 BF_cbc_encrypt(cbc_out, cbc_in, len, &key, iv, BF_DECRYPT); in test_bf_cbc()
376 unsigned char cbc_in[40], cbc_out[40], iv[8]; in test_bf_cfb64() local
386 memcpy(iv, cbc_iv, 8); in test_bf_cfb64()
389 &key, iv, &n, BF_ENCRYPT); in test_bf_cfb64()
391 len - 13, &key, iv, &n, BF_ENCRYPT); in test_bf_cfb64()
396 memcpy(iv, cbc_iv, 8); in test_bf_cfb64()
[all …]
/freebsd/crypto/openssl/crypto/rc2/
H A Drc2cfb64.c33 unsigned char *iv, c, cc; in RC2_cfb64_encrypt() local
35 iv = (unsigned char *)ivec; in RC2_cfb64_encrypt()
39 c2l(iv, v0); in RC2_cfb64_encrypt()
41 c2l(iv, v1); in RC2_cfb64_encrypt()
44 iv = (unsigned char *)ivec; in RC2_cfb64_encrypt()
46 l2c(t, iv); in RC2_cfb64_encrypt()
48 l2c(t, iv); in RC2_cfb64_encrypt()
49 iv = (unsigned char *)ivec; in RC2_cfb64_encrypt()
51 c = *(in++) ^ iv[n]; in RC2_cfb64_encrypt()
53 iv[n] = c; in RC2_cfb64_encrypt()
[all …]
/freebsd/crypto/openssl/crypto/rc5/
H A Drc5cfb64.c33 unsigned char *iv, c, cc; in RC5_32_cfb64_encrypt() local
35 iv = (unsigned char *)ivec; in RC5_32_cfb64_encrypt()
39 c2l(iv, v0); in RC5_32_cfb64_encrypt()
41 c2l(iv, v1); in RC5_32_cfb64_encrypt()
44 iv = (unsigned char *)ivec; in RC5_32_cfb64_encrypt()
46 l2c(t, iv); in RC5_32_cfb64_encrypt()
48 l2c(t, iv); in RC5_32_cfb64_encrypt()
49 iv = (unsigned char *)ivec; in RC5_32_cfb64_encrypt()
51 c = *(in++) ^ iv[n]; in RC5_32_cfb64_encrypt()
53 iv[n] = c; in RC5_32_cfb64_encrypt()
[all …]
/freebsd/crypto/openssl/crypto/idea/
H A Di_cfb64.c34 unsigned char *iv, c, cc; in IDEA_cfb64_encrypt() local
41 iv = (unsigned char *)ivec; in IDEA_cfb64_encrypt()
45 n2l(iv, v0); in IDEA_cfb64_encrypt()
47 n2l(iv, v1); in IDEA_cfb64_encrypt()
50 iv = (unsigned char *)ivec; in IDEA_cfb64_encrypt()
52 l2n(t, iv); in IDEA_cfb64_encrypt()
54 l2n(t, iv); in IDEA_cfb64_encrypt()
55 iv = (unsigned char *)ivec; in IDEA_cfb64_encrypt()
57 c = *(in++) ^ iv[n]; in IDEA_cfb64_encrypt()
59 iv[n] = c; in IDEA_cfb64_encrypt()
[all …]
/freebsd/crypto/openssl/crypto/bf/
H A Dbf_cfb64.c33 unsigned char *iv, c, cc; in BF_cfb64_encrypt() local
35 iv = (unsigned char *)ivec; in BF_cfb64_encrypt()
39 n2l(iv, v0); in BF_cfb64_encrypt()
41 n2l(iv, v1); in BF_cfb64_encrypt()
44 iv = (unsigned char *)ivec; in BF_cfb64_encrypt()
46 l2n(t, iv); in BF_cfb64_encrypt()
48 l2n(t, iv); in BF_cfb64_encrypt()
49 iv = (unsigned char *)ivec; in BF_cfb64_encrypt()
51 c = *(in++) ^ iv[n]; in BF_cfb64_encrypt()
53 iv[n] = c; in BF_cfb64_encrypt()
[all …]
/freebsd/crypto/openssl/crypto/cast/
H A Dc_cfb64.c33 unsigned char *iv, c, cc; in CAST_cfb64_encrypt() local
35 iv = ivec; in CAST_cfb64_encrypt()
39 n2l(iv, v0); in CAST_cfb64_encrypt()
41 n2l(iv, v1); in CAST_cfb64_encrypt()
44 iv = ivec; in CAST_cfb64_encrypt()
46 l2n(t, iv); in CAST_cfb64_encrypt()
48 l2n(t, iv); in CAST_cfb64_encrypt()
49 iv = ivec; in CAST_cfb64_encrypt()
51 c = *(in++) ^ iv[n]; in CAST_cfb64_encrypt()
53 iv[n] = c; in CAST_cfb64_encrypt()
[all …]
/freebsd/crypto/openssh/openbsd-compat/
H A Dlibressl-api-compat.c30 EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len) in EVP_CIPHER_CTX_get_iv() argument
45 if (iv == NULL) in EVP_CIPHER_CTX_get_iv()
48 memcpy(iv, EVP_CIPHER_CTX_iv(ctx), len); in EVP_CIPHER_CTX_get_iv()
50 memcpy(iv, ctx->iv, len); in EVP_CIPHER_CTX_get_iv()
59 EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len) in EVP_CIPHER_CTX_set_iv() argument
74 if (iv == NULL) in EVP_CIPHER_CTX_set_iv()
77 memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), iv, len); in EVP_CIPHER_CTX_set_iv()
79 memcpy(ctx->iv, iv, len); in EVP_CIPHER_CTX_set_iv()
/freebsd/crypto/openssl/crypto/modes/
H A Dcbc128.c29 const unsigned char *iv = ivec; in CRYPTO_cbc128_encrypt() local
39 out[n] = in[n] ^ iv[n]; in CRYPTO_cbc128_encrypt()
41 iv = out; in CRYPTO_cbc128_encrypt()
50 *(size_t_aX *)(in + n) ^ *(size_t_aX *)(iv + n); in CRYPTO_cbc128_encrypt()
52 iv = out; in CRYPTO_cbc128_encrypt()
61 out[n] = in[n] ^ iv[n]; in CRYPTO_cbc128_encrypt()
63 out[n] = iv[n]; in CRYPTO_cbc128_encrypt()
65 iv = out; in CRYPTO_cbc128_encrypt()
72 if (ivec != iv) in CRYPTO_cbc128_encrypt()
73 memcpy(ivec, iv, 16); in CRYPTO_cbc128_encrypt()
[all …]
/freebsd/contrib/libfido2/src/
H A Daes256.c11 aes256_cbc(const fido_blob_t *key, const u_char *iv, const fido_blob_t *in, in aes256_cbc() argument
38 if (EVP_CipherInit(ctx, cipher, key->ptr, iv, encrypt) == 0 || in aes256_cbc()
58 u_char iv[16]; in aes256_cbc_proto1() local
60 memset(&iv, 0, sizeof(iv)); in aes256_cbc_proto1()
62 return aes256_cbc(key, iv, in, out, encrypt); in aes256_cbc_proto1()
70 u_char iv[16]; in aes256_cbc_fips() local
79 if (in->len < sizeof(iv)) { in aes256_cbc_fips()
84 if (fido_get_random(iv, sizeof(iv)) < 0) { in aes256_cbc_fips()
90 memcpy(iv, in->ptr, sizeof(iv)); in aes256_cbc_fips()
91 cin.ptr = in->ptr + sizeof(iv); in aes256_cbc_fips()
[all …]
/freebsd/crypto/openssl/crypto/evp/
H A De_aes.c52 unsigned char *iv; /* Temporary IV store */ member
71 const unsigned char iv[16]);
108 unsigned char *iv; /* Temporary IV store */ member
145 const unsigned char *iv, int enc) in aesni_init_key() argument
184 ctx->iv, EVP_CIPHER_CTX_is_encrypting(ctx)); in aesni_cbc_cipher()
224 const unsigned char *iv, int enc) in aesni_gcm_init_key() argument
227 if (!iv && !key) in aesni_gcm_init_key()
237 if (iv == NULL && gctx->iv_set) in aesni_gcm_init_key()
238 iv = gctx->iv; in aesni_gcm_init_key()
239 if (iv) { in aesni_gcm_init_key()
[all …]
H A De_aria.c37 unsigned char *iv; /* Temporary IV store */ member
62 const unsigned char *iv, int enc) in aria_init_key() argument
186 CRYPTO_ctr128_encrypt(in, out, len, &dat->ks, ctx->iv, in aria_ctr_cipher()
216 const unsigned char *iv, int enc) in aria_gcm_init_key() argument
221 if (!iv && !key) in aria_gcm_init_key()
237 if (iv == NULL && gctx->iv_set) in aria_gcm_init_key()
238 iv = gctx->iv; in aria_gcm_init_key()
239 if (iv) { in aria_gcm_init_key()
240 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); in aria_gcm_init_key()
247 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); in aria_gcm_init_key()
[all …]
H A De_des3.c49 const DES_key_schedule ks[3], unsigned char iv[8]);
51 const DES_key_schedule ks[3], unsigned char iv[8]);
55 const unsigned char *iv, int enc);
58 const unsigned char *iv, int enc);
88 (DES_cblock *)ctx->iv, in des_ede_ofb_cipher()
100 (DES_cblock *)ctx->iv, in des_ede_ofb_cipher()
114 ctx->iv); in des_ede_cbc_cipher()
121 (DES_cblock *)ctx->iv, in des_ede_cbc_cipher()
130 (DES_cblock *)ctx->iv, in des_ede_cbc_cipher()
142 &data(ctx)->ks3, (DES_cblock *)ctx->iv, in des_ede_cfb64_cipher()
[all …]
/freebsd/sys/opencrypto/
H A Dxform_aes_cbc.c56 char iv[AES_BLOCK_LEN]; member
92 out[i] = in[i] ^ ctx->iv[i]; in aes_cbc_encrypt()
94 memcpy(ctx->iv, out, AES_BLOCK_LEN); in aes_cbc_encrypt()
106 out[i] ^= ctx->iv[i]; in aes_cbc_decrypt()
107 memcpy(ctx->iv, block, AES_BLOCK_LEN); in aes_cbc_decrypt()
119 out[i] = in[i] ^ ctx->iv[i]; in aes_cbc_encrypt_multi()
121 memcpy(ctx->iv, out, AES_BLOCK_LEN); in aes_cbc_encrypt_multi()
139 out[i] ^= ctx->iv[i]; in aes_cbc_decrypt_multi()
140 memcpy(ctx->iv, block, AES_BLOCK_LEN); in aes_cbc_decrypt_multi()
161 aes_cbc_reinit(void *vctx, const uint8_t *iv, size_t iv_len) in aes_cbc_reinit() argument
[all …]
H A Dxform_cml.c56 char iv[CAMELLIA_BLOCK_LEN]; member
92 out[i] = in[i] ^ ctx->iv[i]; in cml_encrypt()
94 memcpy(ctx->iv, out, CAMELLIA_BLOCK_LEN); in cml_encrypt()
106 out[i] ^= ctx->iv[i]; in cml_decrypt()
107 memcpy(ctx->iv, block, CAMELLIA_BLOCK_LEN); in cml_decrypt()
120 out[i] = in[i] ^ ctx->iv[i]; in cml_encrypt_multi()
122 memcpy(ctx->iv, out, CAMELLIA_BLOCK_LEN); in cml_encrypt_multi()
141 out[i] ^= ctx->iv[i]; in cml_decrypt_multi()
142 memcpy(ctx->iv, block, CAMELLIA_BLOCK_LEN); in cml_decrypt_multi()
163 cml_reinit(void *vctx, const uint8_t *iv, size_t iv_len) in cml_reinit() argument
[all …]
/freebsd/crypto/openssl/crypto/aes/
H A Daes_ige.c90 aes_block_t iv; in AES_ige_encrypt() local
93 load_block(iv, ivec); in AES_ige_encrypt()
99 tmp2.data[n] = tmp.data[n] ^ iv.data[n]; in AES_ige_encrypt()
105 iv = tmp2; in AES_ige_encrypt()
111 memcpy(ivec, iv.data, AES_BLOCK_SIZE); in AES_ige_encrypt()
143 aes_block_t iv; in AES_ige_encrypt() local
146 load_block(iv, ivec); in AES_ige_encrypt()
157 tmp.data[n] ^= iv.data[n]; in AES_ige_encrypt()
159 iv = tmp2; in AES_ige_encrypt()
165 memcpy(ivec, iv.data, AES_BLOCK_SIZE); in AES_ige_encrypt()
[all …]
/freebsd/contrib/bearssl/src/rand/
H A Daesctr_drbg.c47 unsigned char iv[12]; in br_aesctr_drbg_generate() local
50 memset(iv, 0, sizeof iv); in br_aesctr_drbg_generate()
81 iv, ctx->cc, buf, clen); in br_aesctr_drbg_generate()
126 unsigned char s[16], iv[12]; in br_aesctr_drbg_update() local
134 memset(iv, 0xFF, sizeof iv); in br_aesctr_drbg_update()
136 ctx->sk.vtable->run(&ctx->sk.vtable, iv, 0xFFFFFFFF, s, 16); in br_aesctr_drbg_update()
177 memcpy(iv, G, 12); in br_aesctr_drbg_update()
179 ctx->sk.vtable->run(&ctx->sk.vtable, iv, in br_aesctr_drbg_update()
181 iv[0] ^= 0x01; in br_aesctr_drbg_update()
184 ctx->sk.vtable->run(&ctx->sk.vtable, iv, in br_aesctr_drbg_update()
/freebsd/sys/contrib/openzfs/module/zfs/
H A Dvdev_indirect.c294 indirect_vsd_t *iv = zio->io_vsd; in vdev_indirect_map_free() local
297 while ((is = list_remove_head(&iv->iv_splits)) != NULL) { in vdev_indirect_map_free()
313 kmem_free(iv, sizeof (*iv)); in vdev_indirect_map_free()
1200 indirect_vsd_t *iv = zio->io_vsd; in vdev_indirect_gather_splits() local
1237 list_insert_tail(&iv->iv_splits, is); in vdev_indirect_gather_splits()
1261 indirect_vsd_t *iv = zio->io_vsd; in vdev_indirect_read_all() local
1265 for (indirect_split_t *is = list_head(&iv->iv_splits); in vdev_indirect_read_all()
1266 is != NULL; is = list_next(&iv->iv_splits, is)) { in vdev_indirect_read_all()
1293 iv->iv_reconstruct = B_TRUE; in vdev_indirect_read_all()
1300 indirect_vsd_t *iv = kmem_zalloc(sizeof (*iv), KM_SLEEP); in vdev_indirect_io_start() local
[all …]
/freebsd/contrib/bearssl/inc/
H A Dbearssl_block.h440 void *iv, void *data, size_t len);
496 void *iv, void *data, size_t len);
563 const void *iv, uint32_t cc, void *data, size_t len);
839 void br_aes_big_cbcenc_run(const br_aes_big_cbcenc_keys *ctx, void *iv,
850 void br_aes_big_cbcdec_run(const br_aes_big_cbcdec_keys *ctx, void *iv,
864 const void *iv, uint32_t cc, void *data, size_t len);
1059 void br_aes_small_cbcenc_run(const br_aes_small_cbcenc_keys *ctx, void *iv,
1070 void br_aes_small_cbcdec_run(const br_aes_small_cbcdec_keys *ctx, void *iv,
1084 const void *iv, uint32_t cc, void *data, size_t len);
1278 void br_aes_ct_cbcenc_run(const br_aes_ct_cbcenc_keys *ctx, void *iv,
[all …]

12345678910>>...19