Searched refs:secret (Results 1 - 25 of 133) sorted by relevance

123456

/freebsd-current/sys/crypto/
H A Dcurve25519.h38 bool curve25519(uint8_t *public, const uint8_t *secret,
41 const uint8_t *secret);
44 curve25519_clamp_secret(uint8_t *secret) argument
46 secret[0] &= 248;
47 secret[31] &= 127;
48 secret[31] |= 64;
52 curve25519_generate_secret(uint8_t *secret) argument
54 arc4random_buf(secret, CURVE25519_KEY_SIZE);
55 curve25519_clamp_secret(secret);
H A Dcurve25519.c35 curve25519(uint8_t *public, const uint8_t *secret, argument
38 return (crypto_scalarmult_curve25519(public, secret,
43 curve25519_generate_public(uint8_t *public, const uint8_t *secret) argument
45 return (crypto_scalarmult_curve25519_base(public, secret) == 0);
/freebsd-current/contrib/wireguard-tools/
H A Dcurve25519.h16 void curve25519(uint8_t mypublic[static CURVE25519_KEY_SIZE], const uint8_t secret[static CURVE25519_KEY_SIZE], const uint8_t basepoint[static CURVE25519_KEY_SIZE]);
17 void curve25519_generate_public(uint8_t pub[static CURVE25519_KEY_SIZE], const uint8_t secret[static CURVE25519_KEY_SIZE]);
18 static inline void curve25519_clamp_secret(uint8_t secret[static CURVE25519_KEY_SIZE])
20 secret[0] &= 248;
21 secret[31] = (secret[31] & 127) | 64;
H A Dcurve25519.c88 void curve25519_generate_public(uint8_t pub[static CURVE25519_KEY_SIZE], const uint8_t secret[static CURVE25519_KEY_SIZE])
92 curve25519(pub, secret, basepoint);
95 void curve25519(uint8_t mypublic[static CURVE25519_KEY_SIZE], const uint8_t secret[static CURVE25519_KEY_SIZE], const uint8_t basepoint[static CURVE25519_KEY_SIZE])
97 curve25519_generic(mypublic, secret, basepoint);
/freebsd-current/contrib/bearssl/src/ssl/
H A Dprf_sha256.c30 const void *secret, size_t secret_len, const char *label,
35 secret, secret_len, label, seed_num, seed);
29 br_tls12_sha256_prf(void *dst, size_t len, const void *secret, size_t secret_len, const char *label, size_t seed_num, const br_tls_prf_seed_chunk *seed) argument
H A Dprf_sha384.c30 const void *secret, size_t secret_len, const char *label,
35 secret, secret_len, label, seed_num, seed);
29 br_tls12_sha384_prf(void *dst, size_t len, const void *secret, size_t secret_len, const char *label, size_t seed_num, const br_tls_prf_seed_chunk *seed) argument
H A Dprf_md5sha1.c30 const void *secret, size_t secret_len, const char *label,
36 s1 = secret;
29 br_tls10_prf(void *dst, size_t len, const void *secret, size_t secret_len, const char *label, size_t seed_num, const br_tls_prf_seed_chunk *seed) argument
/freebsd-current/contrib/telnet/libtelnet/
H A Dpk.h42 genkeys(char *public, char *secret)
43 common_key(char *secret, char *public, desData *deskey)
46 char secret[HEXKEYBYTES + 1];
55 extern void genkeys(char *public, char *secret);
56 extern void common_key(char *secret, char *public, IdeaData *common,
/freebsd-current/contrib/wpa/src/eap_common/
H A Dchap.c15 int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge, argument
23 addr[1] = secret;
H A Dchap.h14 int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
/freebsd-current/contrib/bearssl/inc/
H A Dbearssl_prf.h52 * The PRF always uses as input three parameters: a "secret" (some
85 * \param secret secret value (key) for this computation.
86 * \param secret_len length of "secret" (in bytes).
89 * \param seed seed chnks for this computation (usually non-secret).
92 const void *secret, size_t secret_len, const char *label,
103 * \param secret secret value (key) for this computation.
104 * \param secret_len length of "secret" (in bytes).
107 * \param seed seed chnks for this computation (usually non-secret)
[all...]
/freebsd-current/contrib/wpa/src/crypto/
H A Dsha256-tlsprf.c17 * @secret: Key for PRF
29 int tls_prf_sha256(const u8 *secret, size_t secret_len, const char *label, argument
48 * A(0) = seed, A(i) = HMAC(secret, A(i-1))
49 * P_hash = HMAC(secret, A(1) + seed) + HMAC(secret, A(2) + seed) + ..
50 * PRF(secret, label, seed) = P_SHA256(secret, label + seed)
53 if (hmac_sha256_vector(secret, secret_len, 2, &addr[1], &len[1], A) < 0)
58 if (hmac_sha256_vector(secret, secret_len, 3, addr, len, P) <
60 hmac_sha256(secret, secret_le
[all...]
H A Dsha384-tlsprf.c17 * @secret: Key for PRF
29 int tls_prf_sha384(const u8 *secret, size_t secret_len, const char *label, argument
48 * A(0) = seed, A(i) = HMAC(secret, A(i-1))
49 * P_hash = HMAC(secret, A(1) + seed) + HMAC(secret, A(2) + seed) + ..
50 * PRF(secret, label, seed) = P_SHA384(secret, label + seed)
53 if (hmac_sha384_vector(secret, secret_len, 2, &addr[1], &len[1], A) < 0)
58 if (hmac_sha384_vector(secret, secret_len, 3, addr, len, P) <
60 hmac_sha384(secret, secret_le
[all...]
H A Dsha384-kdf.c17 * @secret: Key for KDF
32 int hmac_sha384_kdf(const u8 *secret, size_t secret_len, argument
56 if (hmac_sha384_vector(secret, secret_len, 3, &addr[1], &len[1], T) < 0)
77 if (hmac_sha384_vector(secret, secret_len, 4, addr, len, T) < 0)
H A Dsha512-kdf.c17 * @secret: Key for KDF
32 int hmac_sha512_kdf(const u8 *secret, size_t secret_len, argument
56 if (hmac_sha512_vector(secret, secret_len, 3, &addr[1], &len[1], T) < 0)
77 if (hmac_sha512_vector(secret, secret_len, 4, addr, len, T) < 0)
/freebsd-current/lib/librpcsvc/
H A Dxcrypt.c52 * Encrypt a secret key given passwd
53 * The secret key is passed and returned in hex notation.
57 xencrypt(char *secret, char *passwd) argument
65 len = strlen(secret) / 2;
70 hex2bin(len, secret, buf);
79 bin2hex(len, (unsigned char *) buf, secret);
85 * Decrypt secret key using passwd
86 * The secret key is passed and returned in hex notation.
90 xdecrypt(char *secret, char *passwd) argument
98 len = strlen(secret) /
[all...]
/freebsd-current/usr.bin/keylogout/
H A Dkeylogout.c36 * unset the secret key on local machine
48 static char secret[HEXKEYBYTES + 1]; local
60 if (key_setsecret(secret) < 0) {
61 fprintf(stderr, "Could not unset your secret key.\n");
/freebsd-current/contrib/libfido2/src/
H A Decdh.c21 hkdf_sha256(uint8_t *key, const char *info, const fido_blob_t *secret) argument
28 HKDF(key, SHA256_DIGEST_LENGTH, md, secret->ptr, secret->len, salt,
36 hkdf_sha256(uint8_t *key, char *info, fido_blob_t *secret) argument
46 if (secret->len > INT_MAX || strlen(info) > INT_MAX) {
59 EVP_PKEY_CTX_set1_hkdf_key(ctx, secret->ptr, (int)secret->len) < 1 ||
81 kdf(uint8_t prot, fido_blob_t *key, /* const */ fido_blob_t *secret) argument
88 /* use sha256 on the resulting secret */
91 SHA256(secret
122 fido_blob_t *secret = NULL; local
[all...]
/freebsd-current/contrib/unbound/util/
H A Dedns.h122 * @param secret: the server secret; implicit length of 16 octets.
127 uint8_t* edns_cookie_server_hash(const uint8_t* in, const uint8_t* secret,
144 * @param secret: the server secret; implicit length of 16 octets.
148 void edns_cookie_server_write(uint8_t* buf, const uint8_t* secret, int v4,
155 * @param secret: pointer to the server secret.
156 * @param secret_len: the length of the secret.
165 size_t cookie_len, const uint8_t* secret, size_
[all...]
/freebsd-current/contrib/llvm-project/llvm/lib/Support/
H A Dxxhash.cpp210 const uint8_t *secret, uint64_t seed) {
217 (uint64_t)(endian::read32le(secret) ^ endian::read32le(secret + 4)) +
223 const uint8_t *secret, uint64_t seed) {
228 (endian::read64le(secret + 8) ^ endian::read64le(secret + 16)) - seed;
240 const uint8_t *secret, uint64_t const seed) {
242 (endian::read64le(secret + 24) ^ endian::read64le(secret + 32)) + seed;
244 (endian::read64le(secret
209 XXH3_len_1to3_64b(const uint8_t *input, size_t len, const uint8_t *secret, uint64_t seed) argument
222 XXH3_len_4to8_64b(const uint8_t *input, size_t len, const uint8_t *secret, uint64_t seed) argument
239 XXH3_len_9to16_64b(const uint8_t *input, size_t len, const uint8_t *secret, uint64_t const seed) argument
253 XXH3_len_0to16_64b(const uint8_t *input, size_t len, const uint8_t *secret, uint64_t const seed) argument
265 XXH3_mix16B(const uint8_t *input, uint8_t const *secret, uint64_t seed) argument
278 XXH3_len_17to128_64b(const uint8_t *input, size_t len, const uint8_t *secret, uint64_t const seed) argument
302 XXH3_len_129to240_64b(const uint8_t *input, size_t len, const uint8_t *secret, uint64_t seed) argument
324 XXH3_accumulate_512_scalar(uint64_t *acc, const uint8_t *input, const uint8_t *secret) argument
335 XXH3_accumulate_scalar(uint64_t *acc, const uint8_t *input, const uint8_t *secret, size_t nbStripes) argument
342 XXH3_scrambleAcc(uint64_t *acc, const uint8_t *secret) argument
350 XXH3_mix2Accs(const uint64_t *acc, const uint8_t *secret) argument
364 XXH3_hashLong_64b(const uint8_t *input, size_t len, const uint8_t *secret, size_t secretSize) argument
[all...]
/freebsd-current/usr.bin/chkey/
H A Dchkey.c77 char secret[HEXKEYBYTES + 1]; local
154 genkeys(public, secret, pass);
156 memcpy(crypt1, secret, HEXKEYBYTES);
157 memcpy(crypt1 + HEXKEYBYTES, secret, KEYCHECKSUMSIZE);
165 || memcmp(crypt2, secret, HEXKEYBYTES) != 0)
198 if (write(fd, secret, strlen(secret)) < 0 ||
205 if (key_setsecret(secret) < 0)
206 errx(1, "unable to login with new secret key");
225 setpublicmap(char *name, char *public, char *secret) argument
[all...]
/freebsd-current/contrib/wpa/src/radius/
H A Dradius.h243 int radius_msg_finish(struct radius_msg *msg, const u8 *secret,
245 int radius_msg_finish_srv(struct radius_msg *msg, const u8 *secret,
247 int radius_msg_finish_das_resp(struct radius_msg *msg, const u8 *secret,
250 void radius_msg_finish_acct(struct radius_msg *msg, const u8 *secret,
252 void radius_msg_finish_acct_resp(struct radius_msg *msg, const u8 *secret,
255 int radius_msg_verify_acct_req(struct radius_msg *msg, const u8 *secret,
257 int radius_msg_verify_das_req(struct radius_msg *msg, const u8 *secret,
266 int radius_msg_verify(struct radius_msg *msg, const u8 *secret,
269 int radius_msg_verify_msg_auth(struct radius_msg *msg, const u8 *secret,
276 const u8 *secret, size_
[all...]
/freebsd-current/crypto/openssl/test/recipes/
H A D81-test_cmp_cli.t72 my $secret = "pass:test";
78 "-srv_secret", $secret,
83 "-secret", $secret,
/freebsd-current/sys/contrib/zstd/lib/common/
H A Dxxhash.h774 * default 64-bit variant, using default secret and default seed of 0.
780 * This variant generates a custom secret on the fly
781 * based on default secret altered using the `seed` value.
788 * The bare minimum size for a custom secret.
798 * It's possible to provide any blob of bytes as a "secret" to generate the hash.
801 * However, the quality of the secret impacts the dispersion of the hash algorithm.
802 * Therefore, the secret _must_ look like a bunch of random bytes.
806 * It will generate a proper high entropy secret derived from the blob of bytes.
811 * because, when hashing _small_ inputs, only a portion of the secret is employed.
813 XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSecret(const void* data, size_t len, const void* secret, size_
3468 XXH3_len_1to3_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) argument
3490 XXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) argument
3506 XXH3_len_9to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) argument
3523 XXH3_len_0to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) argument
3559 XXH3_mix16B(const xxh_u8* XXH_RESTRICT input, const xxh_u8* XXH_RESTRICT secret, xxh_u64 seed64) argument
3593 XXH3_len_17to128_64b(const xxh_u8* XXH_RESTRICT input, size_t len, const xxh_u8* XXH_RESTRICT secret, size_t secretSize, XXH64_hash_t seed) argument
3623 XXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len, const xxh_u8* XXH_RESTRICT secret, size_t secretSize, XXH64_hash_t seed) argument
3739 XXH3_accumulate_512_avx512(void* XXH_RESTRICT acc, const void* XXH_RESTRICT input, const void* XXH_RESTRICT secret) argument
3788 XXH3_scrambleAcc_avx512(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) argument
3848 XXH3_accumulate_512_avx2( void* XXH_RESTRICT acc, const void* XXH_RESTRICT input, const void* XXH_RESTRICT secret) argument
3882 XXH3_scrambleAcc_avx2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) argument
3953 XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc, const void* XXH_RESTRICT input, const void* XXH_RESTRICT secret) argument
3988 XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) argument
4073 XXH3_accumulate_512_neon( void* XXH_RESTRICT acc, const void* XXH_RESTRICT input, const void* XXH_RESTRICT secret) argument
4116 XXH3_scrambleAcc_neon(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) argument
4179 XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc, const void* XXH_RESTRICT input, const void* XXH_RESTRICT secret) argument
4215 XXH3_scrambleAcc_vsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) argument
4256 XXH3_scalarRound(void* XXH_RESTRICT acc, void const* XXH_RESTRICT input, void const* XXH_RESTRICT secret, size_t lane) argument
4279 XXH3_accumulate_512_scalar(void* XXH_RESTRICT acc, const void* XXH_RESTRICT input, const void* XXH_RESTRICT secret) argument
4297 XXH3_scalarScrambleRound(void* XXH_RESTRICT acc, void const* XXH_RESTRICT secret, size_t lane) argument
[all...]
/freebsd-current/crypto/openssl/demos/keyexch/
H A Dx25519.c55 unsigned char *secret; /* allocated shared secret buffer */ member in struct:peer_data_st
115 * secret is pointed to by *secret. The caller must free it.
127 local_peer->secret = NULL;
157 /* Determine the secret length. */
164 * We are using X25519, so the secret generated will always be 32 bytes.
174 local_peer->secret = OPENSSL_malloc(local_peer->secret_len);
175 if (local_peer->secret == NULL) {
176 fprintf(stderr, "Could not allocate memory for secret\
[all...]

Completed in 181 milliseconds

123456