Home
last modified time | relevance | path

Searched refs:nonce (Results 1 – 25 of 100) sorted by relevance

1234

/NextBSD/crypto/openssl/crypto/modes/
HDccm128.c69 memset(ctx->nonce.c, 0, sizeof(ctx->nonce.c)); in CRYPTO_ccm128_init()
70 ctx->nonce.c[0] = ((u8)(L - 1) & 7) | (u8)(((M - 2) / 2) & 7) << 3; in CRYPTO_ccm128_init()
80 const unsigned char *nonce, size_t nlen, size_t mlen) in CRYPTO_ccm128_setiv() argument
82 unsigned int L = ctx->nonce.c[0] & 7; /* the L parameter */ in CRYPTO_ccm128_setiv()
88 ctx->nonce.c[8] = (u8)(mlen >> (56 % (sizeof(mlen) * 8))); in CRYPTO_ccm128_setiv()
89 ctx->nonce.c[9] = (u8)(mlen >> (48 % (sizeof(mlen) * 8))); in CRYPTO_ccm128_setiv()
90 ctx->nonce.c[10] = (u8)(mlen >> (40 % (sizeof(mlen) * 8))); in CRYPTO_ccm128_setiv()
91 ctx->nonce.c[11] = (u8)(mlen >> (32 % (sizeof(mlen) * 8))); in CRYPTO_ccm128_setiv()
93 ctx->nonce.u[1] = 0; in CRYPTO_ccm128_setiv()
95 ctx->nonce.c[12] = (u8)(mlen >> 24); in CRYPTO_ccm128_setiv()
[all …]
/NextBSD/contrib/wpa/src/crypto/
HDaes-ccm.c28 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()
HDaes_wrap.h36 int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce,
39 const u8 *nonce, size_t nonce_len,
43 const u8 *nonce, size_t nonce_len,
63 int __must_check aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce,
66 int __must_check aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce,
HDaes-eax.c28 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()
HDaes-ctr.c24 int aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, in aes_128_ctr_encrypt() argument
36 os_memcpy(counter, nonce, AES_BLOCK_SIZE); in aes_128_ctr_encrypt()
/NextBSD/crypto/openssl/crypto/ts/
HDts_req_utils.c149 int TS_REQ_set_nonce(TS_REQ *a, const ASN1_INTEGER *nonce) in TS_REQ_set_nonce() argument
153 if (a->nonce == nonce) in TS_REQ_set_nonce()
155 new_nonce = ASN1_INTEGER_dup(nonce); in TS_REQ_set_nonce()
160 ASN1_INTEGER_free(a->nonce); in TS_REQ_set_nonce()
161 a->nonce = new_nonce; in TS_REQ_set_nonce()
167 return a->nonce; in TS_REQ_get_nonce()
HDts_req_print.c73 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()
HDts_verify_ctx.c105 ASN1_INTEGER_free(ctx->nonce); in TS_VERIFY_CTX_cleanup()
119 const ASN1_INTEGER *nonce; in TS_REQ_to_TS_VERIFY_CTX() local
149 if ((nonce = TS_REQ_get_nonce(req)) != NULL) { in TS_REQ_to_TS_VERIFY_CTX()
150 if (!(ret->nonce = ASN1_INTEGER_dup(nonce))) in TS_REQ_to_TS_VERIFY_CTX()
HDts_rsp_utils.c303 int TS_TST_INFO_set_nonce(TS_TST_INFO *a, const ASN1_INTEGER *nonce) in TS_TST_INFO_set_nonce() argument
307 if (a->nonce == nonce) in TS_TST_INFO_set_nonce()
309 new_nonce = ASN1_INTEGER_dup(nonce); in TS_TST_INFO_set_nonce()
314 ASN1_INTEGER_free(a->nonce); in TS_TST_INFO_set_nonce()
315 a->nonce = new_nonce; in TS_TST_INFO_set_nonce()
321 return a->nonce; in TS_TST_INFO_get_nonce()
HDts_rsp_print.c184 const ASN1_INTEGER *nonce; in TS_TST_INFO_print_bio() local
232 nonce = TS_TST_INFO_get_nonce(a); in TS_TST_INFO_print_bio()
233 if (nonce == NULL) in TS_TST_INFO_print_bio()
236 TS_ASN1_INTEGER_print_bio(bio, nonce); in TS_TST_INFO_print_bio()
/NextBSD/crypto/heimdal/lib/asn1/
HDdigest.asn127 nonce UTF8String, -- service nonce/challange
43 serverNonce UTF8String, -- same as "DigestInitReply.nonce"
152 -- A1 = HEX(H(unq(username-value) ":" unq(realm-value) ":" passwd ) ":" unq(nonce-value) ":" unq(cn…
160 -- unq(nonce-value) ":" nc-value ":" unq(cnonce-value) ":" unq(qop-value) ":" HEX(H(A2))))
162 -- request-digest = HEX(KD(HEX(H(A1)), unq(nonce-value) ":" HEX(H(A2))))
167 -- A1 = { SS, ":", unq(nonce-value), ":", unq(cnonce-value) }
168 -- A1 = { SS, ":", unq(nonce-value), ":", unq(cnonce-value), ":", unq(authzid-value) }
175 -- { unq(nonce-value), ":" nc-value, ":",
HDpkinit.asn179 nonce [2] INTEGER (0..4294967295),
120 nonce [1] INTEGER (0..4294967295),
141 nonce [4] INTEGER (-2147483648..2147483647)
168 nonce [0] INTEGER (-2147483648..2147483647),
174 nonce [1] INTEGER (-2147483648..2147483647),
/NextBSD/contrib/subversion/subversion/libsvn_ra_svn/
HDcram.c124 static apr_status_t make_nonce(apr_uint64_t *nonce) in make_nonce() argument
127 return apr_generate_random_bytes((unsigned char *) nonce, sizeof(*nonce)); in make_nonce()
129 *nonce = apr_time_now(); in make_nonce()
139 apr_uint64_t nonce; in svn_ra_svn_cram_server() local
149 status = make_nonce(&nonce); in svn_ra_svn_cram_server()
156 nonce, apr_time_now(), hostbuf); in svn_ra_svn_cram_server()
/NextBSD/crypto/heimdal/kuser/
HDkdigest-commands.in110 long = "server-nonce"
112 argument = "nonce"
118 argument = "nonce"
122 long = "client-nonce"
124 argument = "nonce"
203 long = "server-nonce"
205 argument = "nonce"
211 argument = "nonce"
215 long = "client-nonce"
217 argument = "nonce"
/NextBSD/contrib/wpa/src/eap_peer/
HDeap_psk.c185 u8 *buf, *rpchannel, nonce[16], *decrypted; in eap_psk_process_3() local
259 os_memset(nonce, 0, 12); in eap_psk_process_3()
260 os_memcpy(nonce + 12, pchannel, 4); in eap_psk_process_3()
271 nonce, sizeof(nonce)); in eap_psk_process_3()
284 if (aes_128_eax_decrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_3()
329 inc_byte_array(nonce, sizeof(nonce)); in eap_psk_process_3()
330 os_memcpy(rpchannel, nonce + 12, 4); in eap_psk_process_3()
348 if (aes_128_eax_encrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_3()
/NextBSD/contrib/serf/auth/
HDauth_digest.c46 const char *nonce; member
179 digest_info->nonce, in build_auth_header()
197 digest_info->ha1, digest_info->nonce, in build_auth_header()
205 digest_info->ha1, digest_info->nonce, ha2); in build_auth_header()
242 const char *nonce = NULL; in serf__handle_digest_auth() local
300 nonce = val; in serf__handle_digest_auth()
342 digest_info->nonce = apr_pstrdup(digest_info->pool, nonce); in serf__handle_digest_auth()
545 digest_info->ha1, digest_info->nonce, nc_str, in serf__validate_response_digest_auth()
/NextBSD/contrib/wpa/src/eap_server/
HDeap_server_psk.c94 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()
334 u8 *decrypted, nonce[16]; in eap_psk_process_4() local
366 os_memset(nonce, 0, 12); in eap_psk_process_4()
367 os_memcpy(nonce + 12, pos, 4); in eap_psk_process_4()
379 if (aes_128_eax_decrypt(data->tek, nonce, sizeof(nonce), in eap_psk_process_4()
/NextBSD/crypto/openssl/crypto/x509v3/
HDv3_ocsp.c73 static int i2r_ocsp_crlid(const X509V3_EXT_METHOD *method, void *nonce,
75 static int i2r_ocsp_acutoff(const X509V3_EXT_METHOD *method, void *nonce,
84 static int i2r_ocsp_nonce(const X509V3_EXT_METHOD *method, void *nonce,
262 static int i2r_ocsp_nonce(const X509V3_EXT_METHOD *method, void *nonce, in i2r_ocsp_nonce() argument
267 if (i2a_ASN1_STRING(out, nonce, V_ASN1_OCTET_STRING) <= 0) in i2r_ocsp_nonce()
/NextBSD/crypto/openssh/
HDumac.h68 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]);
HDmac.c178 u_char b[4], nonce[8]; in mac_compute() local
195 put_u64(nonce, seqno); in mac_compute()
197 umac_final(mac->umac_ctx, u.m, nonce); in mac_compute()
200 put_u64(nonce, seqno); in mac_compute()
202 umac128_final(mac->umac_ctx, u.m, nonce); in mac_compute()
HDumac.c227 UINT8 nonce[AES_BLOCK_LEN]; /* The AES input making above cache */ member
239 memset(pc->nonce, 0, sizeof(pc->nonce)); in pdf_init()
240 aes_encryption(pc->nonce, pc->cache, pc->prf_key); in pdf_init()
243 static void pdf_gen_xor(pdf_ctx *pc, const UINT8 nonce[8], UINT8 buf[8]) in pdf_gen_xor()
262 int ndx = nonce[7] & LOW_BIT_MASK; in pdf_gen_xor()
264 *(UINT32 *)t.tmp_nonce_lo = ((const UINT32 *)nonce)[1]; in pdf_gen_xor()
267 if ( (((UINT32 *)t.tmp_nonce_lo)[0] != ((UINT32 *)pc->nonce)[1]) || in pdf_gen_xor()
268 (((const UINT32 *)nonce)[0] != ((UINT32 *)pc->nonce)[0]) ) in pdf_gen_xor()
270 ((UINT32 *)pc->nonce)[0] = ((const UINT32 *)nonce)[0]; in pdf_gen_xor()
271 ((UINT32 *)pc->nonce)[1] = ((UINT32 *)t.tmp_nonce_lo)[0]; in pdf_gen_xor()
[all …]
HDPROTOCOL.chacha20poly13059 a 64 bit nonce and a 64 bit counter into 64 bytes of output. This output
65 using the K_1 key, a nonce consisting of the packet sequence number
75 K_2, the packet sequence number as nonce and a starting block counter of
85 ChaCha20 must never reuse a {key, nonce} for encryption nor may it be
86 used to encrypt more than 2^70 bytes under the same {key, nonce}. The
/NextBSD/crypto/heimdal/lib/krb5/
HDget_in_tkt.c154 unsigned nonce, in init_as_req() argument
209 a->req_body.nonce = nonce; in init_as_req()
390 unsigned nonce; in krb5_get_in_cred() local
395 krb5_generate_random_block (&nonce, sizeof(nonce)); in krb5_get_in_cred()
396 nonce &= 0xffffffff; in krb5_get_in_cred()
409 nonce, in krb5_get_in_cred()
511 nonce, in krb5_get_in_cred()
/NextBSD/contrib/tcpdump/
HDprint-babel.c391 u_short nonce, interval; in babel_print_v2() local
397 nonce = EXTRACT_16BITS(message + 4); in babel_print_v2()
399 ND_PRINT((ndo, "%04x %s", nonce, format_interval(interval))); in babel_print_v2()
405 u_short nonce; in babel_print_v2() local
411 nonce = EXTRACT_16BITS(message + 2); in babel_print_v2()
412 ND_PRINT((ndo, "%04x", nonce)); in babel_print_v2()
/NextBSD/crypto/openssl/apps/
HDts.c616 ASN1_INTEGER *nonce = NULL; in create_nonce() local
628 if (!(nonce = ASN1_INTEGER_new())) in create_nonce()
630 OPENSSL_free(nonce->data); in create_nonce()
632 nonce->length = len - i; in create_nonce()
633 if (!(nonce->data = OPENSSL_malloc(nonce->length + 1))) in create_nonce()
635 memcpy(nonce->data, buf + i, nonce->length); in create_nonce()
637 return nonce; in create_nonce()
640 ASN1_INTEGER_free(nonce); in create_nonce()

1234