/freebsd/crypto/openssl/test/ssl-tests/ |
H A D | 30-extended-master-secret.cnf | 5 test-0 = 0-disable-extended-master-secret-server-sha 6 test-1 = 1-disable-extended-master-secret-client-sha 7 test-2 = 2-disable-extended-master-secret-both-sha 8 test-3 = 3-disable-extended-master-secret-both-resume 9 test-4 = 4-disable-extended-master-secret-server-sha2 10 test-5 = 5-disable-extended-master-secret-client-sha2 11 test-6 = 6-disable-extended-master-secret-both-sha2 14 [0-disable-extended-master-secret-server-sha] 15 ssl_conf = 0-disable-extended-master-secret-server-sha-ssl 17 [0-disable-extended-master-secret-server-sha-ssl] [all …]
|
H A D | 30-extended-master-secret.cnf.in | 20 name => "disable-extended-master-secret-server-sha", 33 name => "disable-extended-master-secret-client-sha", 46 name => "disable-extended-master-secret-both-sha", 60 name => "disable-extended-master-secret-both-resume", 81 name => "disable-extended-master-secret-server-sha2", 94 name => "disable-extended-master-secret-client-sha2", 107 name => "disable-extended-master-secret-both-sha2",
|
/freebsd/contrib/llvm-project/llvm/lib/Support/ |
H A D | xxhash.cpp | 226 const uint8_t *secret, uint64_t seed) { in XXH3_len_1to3_64b() argument 233 (uint64_t)(endian::read32le(secret) ^ endian::read32le(secret + 4)) + in XXH3_len_1to3_64b() 239 const uint8_t *secret, uint64_t seed) { in XXH3_len_4to8_64b() argument 244 (endian::read64le(secret + 8) ^ endian::read64le(secret + 16)) - seed; in XXH3_len_4to8_64b() 256 const uint8_t *secret, uint64_t const seed) { in XXH3_len_9to16_64b() argument 258 (endian::read64le(secret + 24) ^ endian::read64le(secret + 32)) + seed; in XXH3_len_9to16_64b() 260 (endian::read64le(secret + 40) ^ endian::read64le(secret + 48)) - seed; in XXH3_len_9to16_64b() 270 const uint8_t *secret, uint64_t const seed) { in XXH3_len_0to16_64b() argument 272 return XXH3_len_9to16_64b(input, len, secret, seed); in XXH3_len_0to16_64b() 274 return XXH3_len_4to8_64b(input, len, secret, seed); in XXH3_len_0to16_64b() [all …]
|
/freebsd/contrib/libfido2/src/ |
H A D | ecdh.c | 21 hkdf_sha256(uint8_t *key, const char *info, const fido_blob_t *secret) in hkdf_sha256() argument 28 HKDF(key, SHA256_DIGEST_LENGTH, md, secret->ptr, secret->len, salt, in hkdf_sha256() 36 hkdf_sha256(uint8_t *key, char *info, fido_blob_t *secret) in hkdf_sha256() argument 46 if (secret->len > INT_MAX || strlen(info) > INT_MAX) { in hkdf_sha256() 59 EVP_PKEY_CTX_set1_hkdf_key(ctx, secret->ptr, (int)secret->len) < 1 || in hkdf_sha256() 81 kdf(uint8_t prot, fido_blob_t *key, /* const */ fido_blob_t *secret) in kdf() argument 91 SHA256(secret->ptr, secret->len, key->ptr) != key->ptr) { in kdf() 100 hkdf_sha256(key->ptr, hmac_info, secret) < 0 || in kdf() 102 secret) < 0) { in kdf() 122 fido_blob_t *secret = NULL; in do_ecdh() local [all …]
|
H A D | aes256.c | 66 aes256_cbc_fips(const fido_blob_t *secret, const fido_blob_t *in, in aes256_cbc_fips() argument 74 if (secret->len != 64) { in aes256_cbc_fips() 76 secret->len); in aes256_cbc_fips() 94 key.ptr = secret->ptr + 32; in aes256_cbc_fips() 95 key.len = secret->len - 32; in aes256_cbc_fips() 189 aes256_cbc_enc(const fido_dev_t *dev, const fido_blob_t *secret, in aes256_cbc_enc() argument 192 return fido_dev_get_pin_protocol(dev) == 2 ? aes256_cbc_fips(secret, in aes256_cbc_enc() 193 in, out, 1) : aes256_cbc_proto1(secret, in, out, 1); in aes256_cbc_enc() 197 aes256_cbc_dec(const fido_dev_t *dev, const fido_blob_t *secret, in aes256_cbc_dec() argument 200 return fido_dev_get_pin_protocol(dev) == 2 ? aes256_cbc_fips(secret, in aes256_cbc_dec() [all …]
|
/freebsd/sys/crypto/ |
H A D | curve25519.h | 38 bool curve25519(uint8_t *public, const uint8_t *secret, 41 const uint8_t *secret); 44 curve25519_clamp_secret(uint8_t *secret) in curve25519_clamp_secret() argument 46 secret[0] &= 248; in curve25519_clamp_secret() 47 secret[31] &= 127; in curve25519_clamp_secret() 48 secret[31] |= 64; in curve25519_clamp_secret() 52 curve25519_generate_secret(uint8_t *secret) in curve25519_generate_secret() argument 54 arc4random_buf(secret, CURVE25519_KEY_SIZE); in curve25519_generate_secret() 55 curve25519_clamp_secret(secret); in curve25519_generate_secret()
|
H A D | curve25519.c | 35 curve25519(uint8_t *public, const uint8_t *secret, in curve25519() argument 38 return (crypto_scalarmult_curve25519(public, secret, in curve25519() 43 curve25519_generate_public(uint8_t *public, const uint8_t *secret) in curve25519_generate_public() argument 45 return (crypto_scalarmult_curve25519_base(public, secret) == 0); in curve25519_generate_public()
|
/freebsd/sys/contrib/zstd/lib/common/ |
H A D | xxhash.h | 813 XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSecret(const void* data, size_t len, const void* secret… 855 …rorcode XXH3_64bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize… 881 …hash_t XXH3_128bits_withSecret(const void* data, size_t len, const void* secret, size_t secretSize… 898 …orcode XXH3_128bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize… 1197 const void* secret, size_t secretSize, 1202 const void* secret, size_t secretSize, 1207 const void* secret, size_t secretSize, 1212 const void* secret, size_t secretSize, 3468 XXH3_len_1to3_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) in XXH3_len_1to3_64b() argument 3472 XXH_ASSERT(secret != NULL); in XXH3_len_1to3_64b() [all …]
|
/freebsd/contrib/unbound/util/ |
H A D | edns.c | 140 edns_cookie_server_hash(const uint8_t* in, const uint8_t* secret, int v4, in edns_cookie_server_hash() argument 143 v4?siphash(in, 20, secret, hash, 8):siphash(in, 32, secret, hash, 8); in edns_cookie_server_hash() 148 edns_cookie_server_write(uint8_t* buf, const uint8_t* secret, int v4, in edns_cookie_server_write() argument 157 (void)edns_cookie_server_hash(buf, secret, v4, hash); in edns_cookie_server_write() 163 const uint8_t* secret, size_t secret_len, int v4, in edns_cookie_server_validate() argument 185 if(memcmp(edns_cookie_server_hash(hash_input, secret, v4, hash), in edns_cookie_server_validate() 227 char secret[UNBOUND_COOKIE_SECRET_SIZE * 2 + 2/*'\n' and '\0'*/]; in cookie_secret_file_read() local 248 if( fgets(secret, sizeof(secret), f) == NULL ) { break; } in cookie_secret_file_read() 249 secret_len = strlen(secret); in cookie_secret_file_read() 251 log_assert( secret_len <= sizeof(secret) ); in cookie_secret_file_read() [all …]
|
/freebsd/crypto/openssl/demos/keyexch/ |
H A D | x25519.c | 55 unsigned char *secret; /* allocated shared secret buffer */ member 127 local_peer->secret = NULL; in keyexch_x25519_after() 174 local_peer->secret = OPENSSL_malloc(local_peer->secret_len); in keyexch_x25519_after() 175 if (local_peer->secret == NULL) { in keyexch_x25519_after() 181 if (EVP_PKEY_derive(ctx, local_peer->secret, in keyexch_x25519_after() 188 BIO_dump_indent_fp(stdout, local_peer->secret, local_peer->secret_len, 2); in keyexch_x25519_after() 196 OPENSSL_clear_free(local_peer->secret, local_peer->secret_len); in keyexch_x25519_after() 197 local_peer->secret = NULL; in keyexch_x25519_after() 241 if (CRYPTO_memcmp(peer1.secret, peer2.secret, peer1.secret_len) != 0) { in keyexch_x25519() 247 if (use_kat && CRYPTO_memcmp(peer1.secret, expected_result, in keyexch_x25519() [all …]
|
/freebsd/contrib/wireguard-tools/ |
H A D | curve25519.h | 16 void curve25519(uint8_t mypublic[static CURVE25519_KEY_SIZE], const uint8_t secret[static CURVE2551… 17 void curve25519_generate_public(uint8_t pub[static CURVE25519_KEY_SIZE], const uint8_t secret[stati… 18 static inline void curve25519_clamp_secret(uint8_t secret[static CURVE25519_KEY_SIZE]) in curve25519_clamp_secret() 20 secret[0] &= 248; in curve25519_clamp_secret() 21 secret[31] = (secret[31] & 127) | 64; in curve25519_clamp_secret()
|
/freebsd/lib/librpcsvc/ |
H A D | xcrypt.c | 57 xencrypt(char *secret, char *passwd) in xencrypt() argument 65 len = strlen(secret) / 2; in xencrypt() 70 hex2bin(len, secret, buf); in xencrypt() 79 bin2hex(len, (unsigned char *) buf, secret); in xencrypt() 90 xdecrypt(char *secret, char *passwd) in xdecrypt() argument 98 len = strlen(secret) / 2; in xdecrypt() 103 hex2bin(len, secret, buf); in xdecrypt() 112 bin2hex(len, (unsigned char *) buf, secret); in xdecrypt()
|
/freebsd/usr.bin/chkey/ |
H A D | chkey.c | 77 char secret[HEXKEYBYTES + 1]; in main() local 154 genkeys(public, secret, pass); in main() 156 memcpy(crypt1, secret, HEXKEYBYTES); in main() 157 memcpy(crypt1 + HEXKEYBYTES, secret, KEYCHECKSUMSIZE); in main() 165 || memcmp(crypt2, secret, HEXKEYBYTES) != 0) in main() 198 if (write(fd, secret, strlen(secret)) < 0 || in main() 205 if (key_setsecret(secret) < 0) in main() 225 setpublicmap(char *name, char *public, char *secret) in setpublicmap() argument 229 (void)sprintf(pkent,"%s:%s", public, secret); in setpublicmap()
|
/freebsd/contrib/ntp/libntp/ |
H A D | authkeys.c | 28 u_char * secret; /* shared secret */ member 33 size_t secretsize; /* secret octets */ 38 #define symkey_payload secret 101 u_char *cache_secret; /* secret */ 102 size_t cache_secretsize; /* secret length */ 472 * secret must be allocated with a free-compatible allocator. It is 483 u_char * secret, in allocsymkey() argument 501 sk->secret = secret; in allocsymkey() 755 u_char * secret; MD5auth_setkey() local [all...] |
/freebsd/contrib/wpa/src/radius/ |
H A D | radius.h | 272 int radius_msg_finish(struct radius_msg *msg, const u8 *secret, 274 int radius_msg_finish_srv(struct radius_msg *msg, const u8 *secret, 276 int radius_msg_finish_das_resp(struct radius_msg *msg, const u8 *secret, 279 void radius_msg_finish_acct(struct radius_msg *msg, const u8 *secret, 281 void radius_msg_finish_acct_resp(struct radius_msg *msg, const u8 *secret, 284 int radius_msg_verify_acct_req(struct radius_msg *msg, const u8 *secret, 286 int radius_msg_verify_das_req(struct radius_msg *msg, const u8 *secret, 295 int radius_msg_verify(struct radius_msg *msg, const u8 *secret, 298 int radius_msg_verify_msg_auth(struct radius_msg *msg, const u8 *secret, 305 const u8 *secret, size_t secret_len); [all …]
|
H A D | radius.c | 461 int radius_msg_finish(struct radius_msg *msg, const u8 *secret, in radius_msg_finish() argument 464 if (secret) { in radius_msg_finish() 471 if (hmac_md5(secret, secret_len, wpabuf_head(msg->buf), in radius_msg_finish() 486 int radius_msg_finish_srv(struct radius_msg *msg, const u8 *secret, in radius_msg_finish_srv() argument 499 if (hmac_md5(secret, secret_len, wpabuf_head(msg->buf), in radius_msg_finish_srv() 510 addr[3] = secret; in radius_msg_finish_srv() 523 int radius_msg_finish_das_resp(struct radius_msg *msg, const u8 *secret, in radius_msg_finish_das_resp() argument 537 if (hmac_md5(secret, secret_len, wpabuf_head(msg->buf), in radius_msg_finish_das_resp() 544 addr[1] = secret; in radius_msg_finish_das_resp() 558 void radius_msg_finish_acct(struct radius_msg *msg, const u8 *secret, in radius_msg_finish_acct() argument [all …]
|
/freebsd/usr.bin/newkey/ |
H A D | newkey.c | 92 char secret[HEXKEYBYTES + 1]; in main() local 131 genkeys(public, secret, pass); in main() 133 memcpy(crypt1, secret, HEXKEYBYTES); in main() 134 memcpy(crypt1 + HEXKEYBYTES, secret, KEYCHECKSUMSIZE); in main() 141 memcmp(crypt2, secret, HEXKEYBYTES) != 0) in main() 174 setpublicmap(char *name, char *public, char *secret) in setpublicmap() argument 178 (void)sprintf(pkent, "%s:%s", public, secret); in setpublicmap()
|
/freebsd/crypto/openssl/ssl/ |
H A D | tls13_enc.c | 34 int tls13_hkdf_expand(SSL *s, const EVP_MD *md, const unsigned char *secret, in tls13_hkdf_expand() argument 81 (unsigned char *)secret, hashlen); in tls13_hkdf_expand() 110 int tls13_derive_key(SSL *s, const EVP_MD *md, const unsigned char *secret, in tls13_derive_key() argument 119 return tls13_hkdf_expand(s, md, secret, keylabel, sizeof(keylabel) - 1, in tls13_derive_key() 127 int tls13_derive_iv(SSL *s, const EVP_MD *md, const unsigned char *secret, in tls13_derive_iv() argument 136 return tls13_hkdf_expand(s, md, secret, ivlabel, sizeof(ivlabel) - 1, in tls13_derive_iv() 141 const unsigned char *secret, in tls13_derive_finishedkey() argument 150 return tls13_hkdf_expand(s, md, secret, finishedlabel, in tls13_derive_finishedkey() 338 size_t labellen, unsigned char *secret, in derive_secret_key_and_iv() argument 354 secret, hashlen, 1)) { in derive_secret_key_and_iv() [all …]
|
/freebsd/usr.sbin/keyserv/ |
H A D | setkey.c | 148 MINT *secret; in pk_crypt() local 175 secret = mp_xtom(xsecret); in pk_crypt() 177 if ((public == NULL) || (secret == NULL)) in pk_crypt() 181 mp_pow(public, secret, MODULUS, common); in pk_crypt() 184 mp_mfree(secret); in pk_crypt() 202 MINT *secret; in pk_get_conv_key() local 222 secret = mp_xtom(xsecret); in pk_get_conv_key() 224 if ((public == NULL) || (secret == NULL)) in pk_get_conv_key() 228 mp_pow(public, secret, MODULUS, common); in pk_get_conv_key() 231 mp_mfree(secret); in pk_get_conv_key() [all …]
|
/freebsd/crypto/openssl/doc/man7/ |
H A D | EVP_KEYEXCH-DH.pod | 26 If padding is off then the derived shared secret may be smaller than the 27 largest possible secret size. 28 If padding is on then the derived shared secret will have its first bytes 29 filled with zeros where necessary to make the shared secret the same size as 30 the largest possible secret size. 84 To derive a shared secret on the host using the host's key and the peer's public 92 unsigned char *secret = NULL; 107 secret = OPENSSL_zalloc(secret_len); 109 EVP_PKEY_derive(dctx, secret, &secret_len); 111 OPENSSL_clear_free(secret, secret_len); [all …]
|
H A D | EVP_KDF-SS.pod | 10 SSKDF derives a key using input such as a shared secret key (that was generated 58 This parameter set the shared secret that is used for key derivation. 78 This example derives 10 bytes using H(x) = SHA-256, with the secret key "secret" 93 "secret", (size_t)6); 103 This example derives 10 bytes using H(x) = HMAC(SHA-256), with the secret key "secret", 120 "secret", (size_t)6); 132 This example derives 10 bytes using H(x) = KMAC128(x,salt,outlen), with the secret key "secret" 147 "secret", (size_t)6);
|
/freebsd/contrib/bearssl/inc/ |
H A D | bearssl_prf.h | 92 const void *secret, size_t secret_len, const char *label, 110 const void *secret, size_t secret_len, const char *label, 128 const void *secret, size_t secret_len, const char *label, 143 const void *secret, size_t secret_len, const char *label,
|
/freebsd/contrib/wpa/src/crypto/ |
H A D | sha256-tlsprf.c | 29 int tls_prf_sha256(const u8 *secret, size_t secret_len, const char *label, in tls_prf_sha256() argument 53 if (hmac_sha256_vector(secret, secret_len, 2, &addr[1], &len[1], A) < 0) in tls_prf_sha256() 58 if (hmac_sha256_vector(secret, secret_len, 3, addr, len, P) < in tls_prf_sha256() 60 hmac_sha256(secret, secret_len, A, SHA256_MAC_LEN, A) < 0) in tls_prf_sha256()
|
H A D | sha384-tlsprf.c | 29 int tls_prf_sha384(const u8 *secret, size_t secret_len, const char *label, in tls_prf_sha384() argument 53 if (hmac_sha384_vector(secret, secret_len, 2, &addr[1], &len[1], A) < 0) in tls_prf_sha384() 58 if (hmac_sha384_vector(secret, secret_len, 3, addr, len, P) < in tls_prf_sha384() 60 hmac_sha384(secret, secret_len, A, SHA384_MAC_LEN, A) < 0) in tls_prf_sha384()
|
/freebsd/sys/dev/qat/qat_api/common/crypto/sym/key/ |
H A D | lac_sym_key.c | 1150 computeHashKey(CpaFlatBuffer *secret, in computeHashKey() argument 1158 status = qatUtilsHashMD5Full(secret->pData, in computeHashKey() 1160 secret->dataLenInBytes); in computeHashKey() 1163 status = qatUtilsHashSHA1Full(secret->pData, in computeHashKey() 1165 secret->dataLenInBytes); in computeHashKey() 1168 status = qatUtilsHashSHA256Full(secret->pData, in computeHashKey() 1170 secret->dataLenInBytes); in computeHashKey() 1173 status = qatUtilsHashSHA384Full(secret->pData, in computeHashKey() 1175 secret->dataLenInBytes); in computeHashKey() 1178 status = qatUtilsHashSHA512Full(secret->pData, in computeHashKey() [all …]
|