| /xnu-10063.141.1/osfmk/corecrypto/ |
| H A D | cccbc.c | 71 const void *cc_sized_by(len)iv, in cccbc_copy_iv() argument 80 memcpy(iv_ctx, iv, len); in cccbc_copy_iv() 82 cc_memcpy(iv_ctx, iv, len); in cccbc_copy_iv() 97 cccbc_set_iv(const struct ccmode_cbc *mode, cccbc_iv *iv_ctx, const void *iv) in cccbc_set_iv() argument 101 if (iv) { in cccbc_set_iv() 102 return cccbc_copy_iv(iv_ctx, iv, mode->block_size); in cccbc_set_iv() 111 cccbc_iv *iv, in cccbc_update() argument 118 return mode->cbc(ctx, iv, nblocks, in, out); in cccbc_update() 125 const void *iv, in cccbc_one_shot() argument 135 if (iv) { in cccbc_one_shot() [all …]
|
| H A D | ccgcm.c | 72 const void *iv) in ccgcm_init_with_iv() argument 80 rc = ccgcm_set_iv(mode, ctx, CCGCM_IV_NBYTES, iv); in ccgcm_init_with_iv() 92 const void *cc_sized_by(iv_nbytes)iv) in ccgcm_set_iv() argument 96 return mode->set_iv(ctx, iv_nbytes, iv); in ccgcm_set_iv() 100 ccgcm_inc_iv(CC_UNUSED const struct ccmode_gcm *mode, ccgcm_ctx *ctx, void *iv) in ccgcm_inc_iv() argument 110 cc_memcpy(iv, Y0, CCGCM_IV_NBYTES); in ccgcm_inc_iv() 178 size_t iv_nbytes, const void *iv, in ccgcm_one_shot() argument 191 rc = ccgcm_set_iv(mode, ctx, iv_nbytes, iv); cc_require(rc == 0, errOut); in ccgcm_one_shot() 208 ccgcm_set_iv_legacy(const struct ccmode_gcm *mode, ccgcm_ctx *key, size_t iv_nbytes, const void *iv) in ccgcm_set_iv_legacy() argument 214 if (iv_nbytes == 0 || iv == NULL) { in ccgcm_set_iv_legacy() [all …]
|
| H A D | ccmode_internal.h | 104 int ccmode_cbc_decrypt(const cccbc_ctx *ctx, cccbc_iv *iv, size_t nblocks, 106 int ccmode_cbc_encrypt(const cccbc_ctx *ctx, cccbc_iv *iv, size_t nblocks, 158 const void *iv); 203 size_t rawkey_len, const void *rawkey, const void *iv); 246 size_t rawkey_len, const void *rawkey, const void *iv); 291 const void *iv); 333 const void *iv);
|
| H A D | ccmode_gcm_internal.h | 25 int ccmode_gcm_set_iv(ccgcm_ctx *ctx, size_t iv_nbytes, const void *iv);
|
| /xnu-10063.141.1/EXTERNAL_HEADERS/corecrypto/ |
| H A D | ccpad.h | 22 size_t ccpad_cts1_decrypt(const struct ccmode_cbc *cbc, cccbc_ctx *ctx, cccbc_iv *iv, 26 size_t ccpad_cts1_encrypt(const struct ccmode_cbc *cbc, cccbc_ctx *ctx, cccbc_iv *iv, 29 size_t ccpad_cts2_decrypt(const struct ccmode_cbc *cbc, cccbc_ctx *ctx, cccbc_iv *iv, 33 size_t ccpad_cts2_encrypt(const struct ccmode_cbc *cbc, cccbc_ctx *ctx, cccbc_iv *iv, 36 size_t ccpad_cts3_decrypt(const struct ccmode_cbc *cbc, cccbc_ctx *ctx, cccbc_iv *iv, 40 size_t ccpad_cts3_encrypt(const struct ccmode_cbc *cbc, cccbc_ctx *ctx, cccbc_iv *iv, 47 size_t ccpad_pkcs7_decrypt(const struct ccmode_cbc *cbc, cccbc_ctx *ctx, cccbc_iv *iv, 51 size_t ccpad_pkcs7_encrypt(const struct ccmode_cbc *cbc, cccbc_ctx *ctx, cccbc_iv *iv,
|
| H A D | ccmode.h | 80 int cccbc_copy_iv(cccbc_iv *cc_sized_by(len) iv_ctx, const void *cc_sized_by(len) iv, size_t len); 84 int cccbc_set_iv(const struct ccmode_cbc *mode, cccbc_iv *iv_ctx, const void *iv); 86 int cccbc_update(const struct ccmode_cbc *mode, const cccbc_ctx *ctx, cccbc_iv *iv, size_t nblocks,… 92 const void *iv, 103 const void *cc_sized_by(iv_len) iv, 118 …cccfb_ctx *ctx, size_t key_len, const void *cc_sized_by(key_len) key, const void *cc_indexable iv); 125 const void *cc_indexable iv, 141 …ccfb8_ctx *ctx, size_t key_len, const void *cc_sized_by(key_len) key, const void *cc_indexable iv); 148 const void *cc_indexable iv, 168 …ccctr_ctx *ctx, size_t key_len, const void *cc_sized_by(key_len) key, const void *cc_indexable iv); [all …]
|
| H A D | ccmode_impl.h | 74 …int (*CC_SPTR(ccmode_cbc, cbc))(const cccbc_ctx *ctx, cccbc_iv *iv, size_t nblocks, const void *in… 85 …t))(const struct ccmode_cfb *cfb, cccfb_ctx *ctx, size_t key_len, const void *key, const void *iv); 97 …(const struct ccmode_cfb8 *cfb8, cccfb8_ctx *ctx, size_t key_len, const void *key, const void *iv); 110 …))(const struct ccmode_ctr *mode, ccctr_ctx *ctx, size_t key_len, const void *key, const void *iv); 123 …t))(const struct ccmode_ofb *ofb, ccofb_ctx *ctx, size_t key_len, const void *key, const void *iv); 156 int (*CC_SPTR(ccmode_xts, set_tweak))(const ccxts_ctx *ctx, ccxts_tweak *tweak, const void *iv); 177 int (*CC_SPTR(ccmode_gcm, set_iv))(ccgcm_ctx *ctx, size_t iv_nbytes, const void *iv);
|
| /xnu-10063.141.1/bsd/netinet6/ |
| H A D | esp_chachapoly.c | 310 uint64_t iv = 0; in esp_chachapoly_encrypt() local 311 _Static_assert(ESP_CHACHAPOLY_IV_LEN == sizeof(iv), "Bad IV length"); in esp_chachapoly_encrypt() 312 memcpy(&iv, sav->iv, sizeof(iv)); in esp_chachapoly_encrypt() 313 iv++; in esp_chachapoly_encrypt() 314 memcpy(sav->iv, &iv, sizeof(iv)); in esp_chachapoly_encrypt() 317 memcpy(((uint8_t *)nonce) + ESP_CHACHAPOLY_SALT_LEN, &iv, sizeof(iv)); in esp_chachapoly_encrypt() 318 m_copyback(m, ivoff, ivlen, sav->iv); in esp_chachapoly_encrypt() 560 uint64_t iv = os_atomic_inc(sav->iv, relaxed); in esp_chachapoly_encrypt_data() local 561 _Static_assert(ESP_CHACHAPOLY_IV_LEN == sizeof(iv), "Bad IV length"); in esp_chachapoly_encrypt_data() 572 memcpy(((uint8_t *)nonce) + ESP_CHACHAPOLY_SALT_LEN, &iv, sizeof(iv)); in esp_chachapoly_encrypt_data() [all …]
|
| H A D | esp_core.c | 447 __unused struct newesp *esp_hdr, __unused uint8_t *iv, in esp_null_decrypt_data() argument 745 u_int8_t iv[MAXIVLEN] __attribute__((aligned(4))), *ivp; in esp_cbc_decrypt() local 754 if (ivlen != sav->ivlen || ivlen > sizeof(iv)) { in esp_cbc_decrypt() 765 if (blocklen > sizeof(iv)) { in esp_cbc_decrypt() 798 m_copydata(m, (int)ivoff, ivlen, (caddr_t) iv); in esp_cbc_decrypt() 804 bcopy(&iv[0], &iv[4], 4); in esp_cbc_decrypt() 805 iv[4] ^= 0xff; in esp_cbc_decrypt() 806 iv[5] ^= 0xff; in esp_cbc_decrypt() 807 iv[6] ^= 0xff; in esp_cbc_decrypt() 808 iv[7] ^= 0xff; in esp_cbc_decrypt() [all …]
|
| H A D | esp_rijndael.c | 159 u_int8_t iv[AES_BLOCKLEN] __attribute__((aligned(4))), *dptr; in esp_cbc_decrypt_aes() local 199 m_copydata(m, (int)ivoff, ivlen, (caddr_t) iv); in esp_cbc_decrypt_aes() 319 aes_decrypt_cbc(sp, iv, len >> 4, dptr + dn, in esp_cbc_decrypt_aes() 332 memcpy(iv, sp + len - AES_BLOCKLEN, AES_BLOCKLEN); in esp_cbc_decrypt_aes() 354 cc_clear(sizeof(iv), iv); in esp_cbc_decrypt_aes() 400 m_copyback(m, (int)ivoff, ivlen, sav->iv); in esp_cbc_encrypt_aes() 401 ivp = (u_int8_t *) sav->iv; in esp_cbc_encrypt_aes() 606 memcpy(out_iv, sav->iv, out_ivlen); in esp_aes_cbc_encrypt_data() 607 ivp = (uint8_t *)sav->iv; in esp_aes_cbc_encrypt_data() 630 size_t input_data_len, struct newesp *esp_hdr, uint8_t *iv, in esp_aes_cbc_decrypt_data() argument [all …]
|
| H A D | esp_output.c | 980 uint8_t *iv = NULL; in esp_kpipe_output() local 1084 iv = dbaddr + iphlen + sizeof(struct newesp); in esp_kpipe_output() 1223 esp, iv, ivlen, dst_payload, plen + extendsiz)) != 0)) { in esp_kpipe_output()
|
| H A D | esp_input.c | 1739 uint8_t *iv = NULL; in esp_kpipe_input() local 1925 iv = sbaddr + iphlen + sizeof(struct newesp); in esp_kpipe_input() 1998 encrypted_payload_len, esp, iv, ivlen, dst_payload, in esp_kpipe_input()
|
| /xnu-10063.141.1/bsd/nfs/gss/ |
| H A D | ccrypto.c | 82 cccbc_iv *iv, size_t nbytes, const void *in, void *out) in ccpad_cts3_decrypt() argument 85 return (*g_crypto_funcs->ccpad_cts3_decrypt_fn)(cbc, cbc_key, iv, nbytes, in, out); in ccpad_cts3_decrypt() 92 cccbc_iv *iv, size_t nbytes, const void *in, void *out) in ccpad_cts3_encrypt() argument 95 return (*g_crypto_funcs->ccpad_cts3_encrypt_fn)(cbc, cbc_key, iv, nbytes, in, out); in ccpad_cts3_encrypt()
|
| H A D | gss_krb5_mech.c | 81 cccbc_iv *iv; member 560 wctx->iv = kalloc_data(wctx->ccmode->block_size, Z_WAITOK | Z_ZERO); in do_crypt_init() 561 cccbc_set_iv(wctx->ccmode, wctx->iv, NULL); in do_crypt_init() 572 cccbc_update(wctx->ccmode, wctx->crypt_ctx, wctx->iv, nblocks, data, data); in do_crypt() 805 do_ccpad(ccmode, wctx.crypt_ctx, wctx.iv, cts_len, cts_pad, cts_pad); in krb5_crypt_mbuf() 809 kfree_data(wctx.iv, wctx.ccmode->block_size); in krb5_crypt_mbuf() 944 cccbc_iv_decl(blocksize, iv); in krb5_key_derivation() 958 cccbc_set_iv(ctx->enc_mode, iv, NULL); in krb5_key_derivation() 959 cccbc_update(ctx->enc_mode, enc_ctx, iv, 1, block, block); in krb5_key_derivation() 1846 cccbc_iv_decl(blocksize, iv); in gss_krb5_3des_token_put() [all …]
|
| /xnu-10063.141.1/osfmk/ipc/ |
| H A D | ipc_voucher.c | 78 static void iv_dealloc(ipc_voucher_t iv, bool unhash); 92 iv_reference(ipc_voucher_t iv) in iv_reference() argument 94 os_ref_retain_raw(&iv->iv_refs, &iv_refgrp); in iv_reference() 98 iv_try_reference(ipc_voucher_t iv) in iv_try_reference() argument 100 return os_ref_retain_try_raw(&iv->iv_refs, &iv_refgrp); in iv_try_reference() 104 iv_release(ipc_voucher_t iv) in iv_release() argument 106 if (os_ref_release_raw(&iv->iv_refs, &iv_refgrp) == 0) { in iv_release() 107 iv_dealloc(iv, TRUE); in iv_release() 193 ipc_voucher_t iv; in iv_alloc() local 195 iv = zalloc_id_smr(ZONE_ID_IPC_VOUCHERS, Z_WAITOK_ZERO_NOFAIL); in iv_alloc() [all …]
|
| /xnu-10063.141.1/libkern/crypto/ |
| H A D | corecrypto_aesxts.c | 76 const uint8_t *iv, // this can be considered the sector IV for this use in xts_encrypt() argument 86 int rc = xtsenc->set_tweak(xts->enc, tweak, iv); in xts_encrypt() 98 …const uint8_t *iv, // this can be considered the sector IV for this use in xts_decrypt() argument 108 int rc = xtsdec->set_tweak(xts->dec, tweak, iv); in xts_decrypt()
|
| /xnu-10063.141.1/libkern/libkern/crypto/ |
| H A D | register_crypto.h | 70 const void *iv); 71 typedef int (*ccgcm_inc_iv_fn_t)(const struct ccmode_gcm *mode, ccgcm_ctx *ctx, void *iv); 99 cccbc_iv *iv, size_t nbytes, const void *in, void *out);
|
| /xnu-10063.141.1/osfmk/vm/ |
| H A D | vm_compressor_backing_store.c | 287 uint8_t *iv; in swap_crypt_initialize() local 305 iv = (uint8_t *)ivnum; in swap_crypt_initialize() 313 rc = xts_encrypt(refptr, size, encptr, iv, &xts_modectx); in swap_crypt_initialize() 326 rc = xts_decrypt(encptr, size, decptr, iv, &xts_modectx); in swap_crypt_initialize() 337 rc = xts_encrypt(decptr, size, decptr, iv, &xts_modectx); in swap_crypt_initialize() 341 rc = xts_decrypt(decptr, size, decptr, iv, &xts_modectx); in swap_crypt_initialize() 359 uint8_t *iv; in vm_swap_encrypt() local 376 iv = (uint8_t *)ivnum; in vm_swap_encrypt() 378 rc = xts_encrypt(ptr, size, ptr, iv, &xts_modectx); in vm_swap_encrypt() 392 uint8_t *iv; in vm_swap_decrypt() local [all …]
|
| /xnu-10063.141.1/tests/ktrace/ |
| H A D | kperf_tests.c | 497 struct instval *iv = viv; in cpu_oversample_log() 498 T_LOG("\t%llu timer latency %d: %llu", iv->iv_instant_ns, i, in cpu_oversample_log() 499 iv->iv_val); in cpu_oversample_log() 506 struct instval *iv = viv; in cpu_oversample_log() 507 T_LOG("\t%llu fire latency %d: %llu", iv->iv_instant_ns, i, iv->iv_val); in cpu_oversample_log()
|
| /xnu-10063.141.1/bsd/netkey/ |
| H A D | keydb.h | 95 caddr_t iv; /* Initialization Vector */ member
|
| H A D | key_debug.c | 634 if (sav->iv != NULL) { 636 ipsec_hexdump(sav->iv, sav->ivlen ? sav->ivlen : 8);
|
| H A D | key.c | 4189 if (sav->iv != NULL) { in key_reset_sav() 4190 kfree_data(sav->iv, sav->ivlen); in key_reset_sav() 4191 sav->iv = NULL; in key_reset_sav() 4560 sav->iv = (caddr_t) kalloc_data(sav->ivlen, Z_NOWAIT); in key_setsaval() 4561 if (sav->iv == 0) { in key_setsaval() 4563 sav->iv = (caddr_t) kalloc_data(sav->ivlen, Z_WAITOK); in key_setsaval() 4565 if (sav->iv == 0) { in key_setsaval() 4573 key_randomfill(sav->iv, sav->ivlen); in key_setsaval() 9976 if (!sav->iv) { in key_sa_stir_iv() 9979 key_randomfill(sav->iv, sav->ivlen); in key_sa_stir_iv()
|
| /xnu-10063.141.1/tools/lldbmacros/ |
| H A D | README.md | 16 iv. Submitting changes in lldbmacros [MUST READ] 365 iv. Submitting changes in lldbmacros
|