/dragonfly/crypto/libressl/crypto/modes/ |
H A D | ccm128.c | 66 memset(ctx->nonce.c,0,sizeof(ctx->nonce.c)); in CRYPTO_ccm128_init() 98 memcpy(&ctx->nonce.c[1],nonce,14-L); in CRYPTO_ccm128_setiv() 188 ctx->nonce.c[i]=0; in CRYPTO_ccm128_encrypt() 192 ctx->nonce.c[15]=1; in CRYPTO_ccm128_encrypt() 234 ctx->nonce.c[i]=0; in CRYPTO_ccm128_encrypt() 262 ctx->nonce.c[i]=0; in CRYPTO_ccm128_decrypt() 266 ctx->nonce.c[15]=1; in CRYPTO_ccm128_decrypt() 300 ctx->nonce.c[i]=0; in CRYPTO_ccm128_decrypt() 342 ctx->nonce.c[i]=0; in CRYPTO_ccm128_encrypt_ccm64() 346 ctx->nonce.c[15]=1; in CRYPTO_ccm128_encrypt_ccm64() [all …]
|
/dragonfly/crypto/libressl/crypto/evp/ |
H A D | e_chacha20poly1305.c | 146 ctr = (uint64_t)((uint32_t)(nonce[0]) | (uint32_t)(nonce[1]) << 8 | in aead_chacha20_poly1305_seal() 147 (uint32_t)(nonce[2]) << 16 | (uint32_t)(nonce[3]) << 24) << 32; in aead_chacha20_poly1305_seal() 148 iv = nonce + CHACHA20_CONSTANT_LEN; in aead_chacha20_poly1305_seal() 183 const unsigned char *iv = nonce; in aead_chacha20_poly1305_open() 205 ctr = (uint64_t)((uint32_t)(nonce[0]) | (uint32_t)(nonce[1]) << 8 | in aead_chacha20_poly1305_open() 206 (uint32_t)(nonce[2]) << 16 | (uint32_t)(nonce[3]) << 24) << 32; in aead_chacha20_poly1305_open() 258 subkey, nonce + 16, 0); in aead_xchacha20_poly1305_seal() 313 subkey, nonce + 16, 0); in aead_xchacha20_poly1305_open() 411 if (!CBB_init_fixed(&cbb, cpx->nonce, sizeof(cpx->nonce))) in chacha20_poly1305_init() 578 if (arg != sizeof(cpx->nonce)) in chacha20_poly1305_ctrl() [all …]
|
H A D | evp_aead.c | 107 size_t max_out_len, const unsigned char *nonce, size_t nonce_len, in EVP_AEAD_CTX_seal() argument 124 if (ctx->aead->seal(ctx, out, out_len, max_out_len, nonce, nonce_len, in EVP_AEAD_CTX_seal() 139 size_t max_out_len, const unsigned char *nonce, size_t nonce_len, in EVP_AEAD_CTX_open() argument 148 if (ctx->aead->open(ctx, out, out_len, max_out_len, nonce, nonce_len, in EVP_AEAD_CTX_open()
|
/dragonfly/contrib/libarchive/libarchive/ |
H A D | archive_cryptor.c | 171 memset(ctx->nonce, 0, sizeof(ctx->nonce)); in aes_ctr_init() 196 memset(ctx->nonce, 0, sizeof(ctx->nonce)); in aes_ctr_release() 309 memset(ctx->nonce, 0, sizeof(ctx->nonce)); in aes_ctr_init() 341 memset(ctx->nonce, 0, sizeof(ctx->nonce)); in aes_ctr_init() 358 ctx->nonce); in aes_ctr_encrypt_counter() 363 ctx->nonce); in aes_ctr_encrypt_counter() 368 ctx->nonce); in aes_ctr_encrypt_counter() 402 memset(ctx->nonce, 0, sizeof(ctx->nonce)); in aes_ctr_init() 428 memset(ctx->nonce, 0, sizeof(ctx->nonce)); in aes_ctr_release() 479 uint8_t *const nonce = ctx->nonce; in aes_ctr_increase_counter() local [all …]
|
H A D | archive_cryptor_private.h | 60 uint8_t nonce[AES_BLOCK_SIZE]; member 80 uint8_t nonce[AES_BLOCK_SIZE]; member 97 uint8_t nonce[AES_BLOCK_SIZE]; member 121 uint8_t nonce[AES_BLOCK_SIZE]; member 136 uint8_t nonce[AES_BLOCK_SIZE]; member
|
/dragonfly/sys/crypto/ |
H A D | chachapoly.c | 65 memcpy(counter64 + 4, nonce, 4); in _chacha20poly1305_init() 66 memcpy(nonce64, nonce + 4, 8); in _chacha20poly1305_init() 207 const uint8_t nonce[CHACHA20POLY1305_NONCE_SIZE], in chacha20poly1305_encrypt() 213 _chacha20poly1305_init(&ctx, true, nonce, key); in chacha20poly1305_encrypt() 236 _chacha20poly1305_init(&ctx, false, nonce, key); in chacha20poly1305_decrypt() 265 hchacha20(derived_key, nonce, key); in xchacha20poly1305_encrypt() 269 memcpy(derived_nonce + 4, nonce + 16, 8); in xchacha20poly1305_encrypt() 287 hchacha20(derived_key, nonce, key); in xchacha20poly1305_decrypt() 290 memcpy(derived_nonce + 4, nonce + 16, 8); in xchacha20poly1305_decrypt() 374 _chacha20poly1305_init(&ctx, true, nonce, key); in chacha20poly1305_encrypt_mbuf() [all …]
|
/dragonfly/contrib/wpa_supplicant/src/crypto/ |
H A D | aes-ccm.c | 28 static void aes_ccm_auth_start(void *aes, size_t M, size_t L, const u8 *nonce, in aes_ccm_auth_start() argument 40 os_memcpy(&b[1], nonce, 15 - L); in aes_ccm_auth_start() 84 static void aes_ccm_encr_start(size_t L, const u8 *nonce, u8 *a) in aes_ccm_encr_start() argument 88 os_memcpy(&a[1], nonce, 15 - L); in aes_ccm_encr_start() 148 int aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, in aes_ccm_ae() argument 163 aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, plain_len, x); in aes_ccm_ae() 167 aes_ccm_encr_start(L, nonce, a); in aes_ccm_ae() 178 int aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce, in aes_ccm_ad() argument 195 aes_ccm_encr_start(L, nonce, a); in aes_ccm_ad() 201 aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, crypt_len, x); in aes_ccm_ad()
|
H A D | aes_wrap.h | 36 int __must_check aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, 38 int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, 41 const u8 *nonce, size_t nonce_len, 45 const u8 *nonce, size_t nonce_len, 65 int __must_check aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, 68 int __must_check aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce,
|
H A D | aes-ctr.c | 25 int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, in aes_ctr_encrypt() argument 37 os_memcpy(counter, nonce, AES_BLOCK_SIZE); in aes_ctr_encrypt() 67 int aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, in aes_128_ctr_encrypt() argument 70 return aes_ctr_encrypt(key, 16, nonce, data, data_len); in aes_128_ctr_encrypt()
|
H A D | aes-eax.c | 28 int aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len, in aes_128_eax_encrypt() argument 53 os_memcpy(buf + 16, nonce, nonce_len); in aes_128_eax_encrypt() 92 int aes_128_eax_decrypt(const u8 *key, const u8 *nonce, size_t nonce_len, in aes_128_eax_decrypt() argument 117 os_memcpy(buf + 16, nonce, nonce_len); in aes_128_eax_decrypt()
|
/dragonfly/crypto/libressl/crypto/ts/ |
H A D | ts_req_utils.c | 162 TS_REQ_set_nonce(TS_REQ *a, const ASN1_INTEGER *nonce) in TS_REQ_set_nonce() argument 166 if (a->nonce == nonce) in TS_REQ_set_nonce() 168 new_nonce = ASN1_INTEGER_dup(nonce); in TS_REQ_set_nonce() 173 ASN1_INTEGER_free(a->nonce); in TS_REQ_set_nonce() 174 a->nonce = new_nonce; in TS_REQ_set_nonce() 181 return a->nonce; in TS_REQ_get_nonce()
|
H A D | ts_req_print.c | 73 const ASN1_INTEGER *nonce; in TS_REQ_print_bio() local 91 nonce = TS_REQ_get_nonce(a); in TS_REQ_print_bio() 92 if (nonce == NULL) in TS_REQ_print_bio() 95 TS_ASN1_INTEGER_print_bio(bio, nonce); in TS_REQ_print_bio()
|
H A D | ts_verify_ctx.c | 110 ASN1_INTEGER_free(ctx->nonce); in TS_VERIFY_CTX_cleanup() 189 const ASN1_INTEGER *nonce; in TS_REQ_to_TS_VERIFY_CTX() local 218 if ((nonce = TS_REQ_get_nonce(req)) != NULL) { in TS_REQ_to_TS_VERIFY_CTX() 219 if (!(ret->nonce = ASN1_INTEGER_dup(nonce))) in TS_REQ_to_TS_VERIFY_CTX()
|
H A D | ts_rsp_utils.c | 355 TS_TST_INFO_set_nonce(TS_TST_INFO *a, const ASN1_INTEGER *nonce) in TS_TST_INFO_set_nonce() argument 359 if (a->nonce == nonce) in TS_TST_INFO_set_nonce() 361 new_nonce = ASN1_INTEGER_dup(nonce); in TS_TST_INFO_set_nonce() 366 ASN1_INTEGER_free(a->nonce); in TS_TST_INFO_set_nonce() 367 a->nonce = new_nonce; in TS_TST_INFO_set_nonce() 374 return a->nonce; in TS_TST_INFO_get_nonce()
|
H A D | ts_rsp_print.c | 205 const ASN1_INTEGER *nonce; in TS_TST_INFO_print_bio() local 253 nonce = TS_TST_INFO_get_nonce(a); in TS_TST_INFO_print_bio() 254 if (nonce == NULL) in TS_TST_INFO_print_bio() 257 TS_ASN1_INTEGER_print_bio(bio, nonce); in TS_TST_INFO_print_bio()
|
H A D | ts_local.h | 91 ASN1_INTEGER *nonce; /* OPTIONAL */ member 137 ASN1_INTEGER *nonce; member 289 ASN1_INTEGER *nonce; member
|
/dragonfly/contrib/wpa_supplicant/src/eap_peer/ |
H A D | eap_psk.c | 184 u8 *buf, *rpchannel, nonce[16], *decrypted; in eap_psk_process_3() local 258 os_memset(nonce, 0, 12); in eap_psk_process_3() 259 os_memcpy(nonce + 12, pchannel, 4); in eap_psk_process_3() 270 nonce, sizeof(nonce)); in eap_psk_process_3() 282 if (aes_128_eax_decrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_3() 327 inc_byte_array(nonce, sizeof(nonce)); in eap_psk_process_3() 328 os_memcpy(rpchannel, nonce + 12, 4); in eap_psk_process_3() 346 if (aes_128_eax_encrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_3()
|
/dragonfly/contrib/wpa_supplicant/src/eap_server/ |
H A D | eap_server_psk.c | 94 u8 *buf, *pchannel, nonce[16]; in eap_psk_build_3() local 133 os_memset(nonce, 0, sizeof(nonce)); in eap_psk_build_3() 135 os_memcpy(pchannel, nonce + 12, 4); in eap_psk_build_3() 140 if (aes_128_eax_encrypt(data->tek, nonce, sizeof(nonce), in eap_psk_build_3() 333 u8 *decrypted, nonce[16]; in eap_psk_process_4() local 365 os_memset(nonce, 0, 12); in eap_psk_process_4() 366 os_memcpy(nonce + 12, pos, 4); in eap_psk_process_4() 377 if (aes_128_eax_decrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_4()
|
/dragonfly/crypto/openssh/ |
H A D | umac.h | 68 int umac_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8]); 79 u_char nonce[8]); 122 int umac128_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8]);
|
H A D | umac.c | 231 memset(pc->nonce, 0, sizeof(pc->nonce)); in pdf_init() 232 aes_encryption(pc->nonce, pc->cache, pc->prf_key); in pdf_init() 255 int ndx = nonce[7] & LOW_BIT_MASK; in pdf_gen_xor() 257 *(UINT32 *)t.tmp_nonce_lo = ((const UINT32 *)nonce)[1]; in pdf_gen_xor() 261 (((const UINT32 *)nonce)[0] != ((UINT32 *)pc->nonce)[0]) ) in pdf_gen_xor() 263 ((UINT32 *)pc->nonce)[0] = ((const UINT32 *)nonce)[0]; in pdf_gen_xor() 264 ((UINT32 *)pc->nonce)[1] = ((UINT32 *)t.tmp_nonce_lo)[0]; in pdf_gen_xor() 265 aes_encryption(pc->nonce, pc->cache, pc->prf_key); in pdf_gen_xor() 1247 pdf_gen_xor(&ctx->pdf, (const UINT8 *)nonce, (UINT8 *)tag); in umac_final() 1268 u_char nonce[8]) [all …]
|
H A D | mac.c | 173 u_char nonce[8]; in mac_compute() local 189 POKE_U64(nonce, seqno); in mac_compute() 191 umac_final(mac->umac_ctx, u.m, nonce); in mac_compute() 194 put_u64(nonce, seqno); in mac_compute() 196 umac128_final(mac->umac_ctx, u.m, nonce); in mac_compute()
|
/dragonfly/crypto/libressl/ssl/ |
H A D | tls13_record_layer.c | 30 struct tls13_secret nonce; member 46 tls13_secret_cleanup(&rp->nonce); in tls13_record_protection_clear() 216 tls13_record_layer_update_nonce(struct tls13_secret *nonce, in tls13_record_layer_update_nonce() argument 221 if (nonce->len != iv->len) in tls13_record_layer_update_nonce() 229 for (i = nonce->len - 1, j = TLS13_RECORD_SEQ_NUM_LEN - 1; i >= 0; i--, j--) in tls13_record_layer_update_nonce() 230 nonce->data[i] = iv->data[i] ^ (j >= 0 ? seq_num[j] : 0); in tls13_record_layer_update_nonce() 474 if (!tls13_secret_init(&rp->nonce, EVP_AEAD_nonce_length(aead))) in tls13_record_layer_set_traffic_key() 568 if (!tls13_record_layer_update_nonce(&rl->read->nonce, &rl->read->iv, in tls13_record_layer_open_record_protected() 574 rl->read->nonce.data, rl->read->nonce.len, in tls13_record_layer_open_record_protected() 741 if (!tls13_record_layer_update_nonce(&rl->write->nonce, in tls13_record_layer_seal_record_protected() [all …]
|
/dragonfly/crypto/libressl/crypto/x509/ |
H A D | x509_ocsp.c | 77 static int i2r_ocsp_crlid(const X509V3_EXT_METHOD *method, void *nonce, 79 static int i2r_ocsp_acutoff(const X509V3_EXT_METHOD *method, void *nonce, 88 static int i2r_ocsp_nonce(const X509V3_EXT_METHOD *method, void *nonce, 329 i2r_ocsp_nonce(const X509V3_EXT_METHOD *method, void *nonce, BIO *out, in i2r_ocsp_nonce() argument 334 if (i2a_ASN1_STRING(out, nonce, V_ASN1_OCTET_STRING) <= 0) in i2r_ocsp_nonce()
|
/dragonfly/sys/net/wg/selftest/ |
H A D | cookie.c | 220 uint8_t nonce[COOKIE_NONCE_SIZE]; in cookie_mac_test() local 280 cookie_checker_create_payload(checker, &cm, nonce, cookie, in cookie_mac_test() 286 if (cookie_maker_consume_payload(maker, nonce, cookie) in cookie_mac_test() 293 if (cookie_maker_consume_payload(maker, nonce, cookie) != 0) in cookie_mac_test() 297 if (cookie_maker_consume_payload(maker, nonce, cookie) != ETIMEDOUT) in cookie_mac_test()
|
/dragonfly/sys/dev/drm/radeon/ |
H A D | vce_v1_0.c | 46 uint32_t nonce[4]; member 191 data[0] = sign->val[i].nonce[0]; in vce_v1_0_load_fw() 192 data[1] = sign->val[i].nonce[1]; in vce_v1_0_load_fw() 193 data[2] = sign->val[i].nonce[2]; in vce_v1_0_load_fw() 194 data[3] = sign->val[i].nonce[3]; in vce_v1_0_load_fw()
|