/freebsd-11-stable/contrib/wpa/src/crypto/ |
H A D | md5.c | 19 * @key_len: Length of the key in bytes 26 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, argument 44 if (key_len > 64) { 45 if (md5_vector(1, &key, &key_len, tk)) 48 key_len = 16; 62 os_memcpy(k_pad, key, key_len); 79 os_memcpy(k_pad, key, key_len); 99 * @key_len: Length of the key in bytes 105 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, argument 108 return hmac_md5_vector(key, key_len, [all...] |
H A D | md5.h | 14 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, 16 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len,
|
H A D | sha256.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, argument 43 if (key_len > 64) { 44 if (sha256_vector(1, &key, &key_len, tk) < 0) 47 key_len = 32; 61 os_memcpy(k_pad, key, key_len); 77 os_memcpy(k_pad, key, key_len); 94 * @key_len: Length of the key in bytes 100 int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, argument 103 return hmac_sha256_vector(key, key_len, [all...] |
H A D | sha1.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, argument 44 if (key_len > 64) { 45 if (sha1_vector(1, &key, &key_len, tk)) 48 key_len = 20; 62 os_memcpy(k_pad, key, key_len); 78 os_memcpy(k_pad, key, key_len); 98 * @key_len: Length of the key in bytes 104 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, argument 107 return hmac_sha1_vector(key, key_len, [all...] |
H A D | sha512.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha512_vector(const u8 *key, size_t key_len, size_t num_elem, argument 43 if (key_len > 128) { 44 if (sha512_vector(1, &key, &key_len, tk) < 0) 47 key_len = 64; 61 os_memcpy(k_pad, key, key_len); 77 os_memcpy(k_pad, key, key_len); 94 * @key_len: Length of the key in bytes 100 int hmac_sha512(const u8 *key, size_t key_len, const u8 *data, argument 103 return hmac_sha512_vector(key, key_len, [all...] |
H A D | sha384.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, argument 43 if (key_len > 128) { 44 if (sha384_vector(1, &key, &key_len, tk) < 0) 47 key_len = 48; 61 os_memcpy(k_pad, key, key_len); 77 os_memcpy(k_pad, key, key_len); 94 * @key_len: Length of the key in bytes 100 int hmac_sha384(const u8 *key, size_t key_len, const u8 *data, argument 103 return hmac_sha384_vector(key, key_len, [all...] |
H A D | crypto_internal.c | 35 size_t key_len; member in struct:crypto_hash 40 size_t key_len) 76 if (key_len > sizeof(k_pad)) { 78 MD5Update(&ctx->u.md5, key, key_len); 81 key_len = 16; 83 os_memcpy(ctx->key, key, key_len); 84 ctx->key_len = key_len; 86 os_memcpy(k_pad, key, key_len); 87 if (key_len < sizeo 39 crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, size_t key_len) argument [all...] |
H A D | sha1.h | 14 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, 16 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, 18 int sha1_prf(const u8 *key, size_t key_len, const char *label, 20 int sha1_t_prf(const u8 *key, size_t key_len, const char *label,
|
H A D | sha512.h | 14 int hmac_sha512_vector(const u8 *key, size_t key_len, size_t num_elem, 16 int hmac_sha512(const u8 *key, size_t key_len, const u8 *data, 18 int sha512_prf(const u8 *key, size_t key_len, const char *label, 20 int sha512_prf_bits(const u8 *key, size_t key_len, const char *label,
|
H A D | sha384.h | 14 int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, 16 int hmac_sha384(const u8 *key, size_t key_len, const u8 *data, 18 int sha384_prf(const u8 *key, size_t key_len, const char *label, 20 int sha384_prf_bits(const u8 *key, size_t key_len, const char *label,
|
H A D | aes_siv.h | 12 int aes_siv_encrypt(const u8 *key, size_t key_len, 16 int aes_siv_decrypt(const u8 *key, size_t key_len,
|
H A D | aes-siv.c | 64 static int aes_s2v(const u8 *key, size_t key_len, argument 79 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); 84 ret = omac1_aes_vector(key, key_len, 1, data, data_len, tmp); 89 ret = omac1_aes_vector(key, key_len, 1, &addr[i], &len[i], 104 ret = omac1_aes_vector(key, key_len, 1, data, &len[i], mac); 115 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); 119 int aes_siv_encrypt(const u8 *key, size_t key_len, argument 132 (key_len != 32 && key_len != 48 && key_len ! 162 aes_siv_decrypt(const u8 *key, size_t key_len, const u8 *iv_crypt, size_t iv_c_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *out) argument [all...] |
H A D | sha256-prf.c | 19 * @key_len: Length of the key in bytes 30 int sha256_prf(const u8 *key, size_t key_len, const char *label, argument 33 return sha256_prf_bits(key, key_len, label, data, data_len, buf, 41 * @key_len: Length of the key in bytes 54 int sha256_prf_bits(const u8 *key, size_t key_len, const char *label, argument 81 if (hmac_sha256_vector(key, key_len, 4, addr, len, 86 if (hmac_sha256_vector(key, key_len, 4, addr, len,
|
H A D | sha512-prf.c | 19 * @key_len: Length of the key in bytes 30 int sha512_prf(const u8 *key, size_t key_len, const char *label, argument 33 return sha512_prf_bits(key, key_len, label, data, data_len, buf, 41 * @key_len: Length of the key in bytes 54 int sha512_prf_bits(const u8 *key, size_t key_len, const char *label, argument 81 if (hmac_sha512_vector(key, key_len, 4, addr, len, 86 if (hmac_sha512_vector(key, key_len, 4, addr, len,
|
H A D | sha384-prf.c | 19 * @key_len: Length of the key in bytes 30 int sha384_prf(const u8 *key, size_t key_len, const char *label, argument 33 return sha384_prf_bits(key, key_len, label, data, data_len, buf, 41 * @key_len: Length of the key in bytes 54 int sha384_prf_bits(const u8 *key, size_t key_len, const char *label, argument 81 if (hmac_sha384_vector(key, key_len, 4, addr, len, 86 if (hmac_sha384_vector(key, key_len, 4, addr, len,
|
H A D | sha1-prf.c | 19 * @key_len: Length of the key in bytes 30 int sha1_prf(const u8 *key, size_t key_len, const char *label, argument 51 if (hmac_sha1_vector(key, key_len, 3, addr, len, 56 if (hmac_sha1_vector(key, key_len, 3, addr, len,
|
H A D | sha256.h | 14 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, 16 int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, 18 int sha256_prf(const u8 *key, size_t key_len, const char *label, 20 int sha256_prf_bits(const u8 *key, size_t key_len, const char *label,
|
/freebsd-11-stable/contrib/wpa/src/eap_common/ |
H A D | eap_peap_common.h | 12 int peap_prfplus(int version, const u8 *key, size_t key_len,
|
/freebsd-11-stable/crypto/openssl/crypto/evp/ |
H A D | p_enc.c | 70 int key_len, EVP_PKEY *pubk) 82 RSA_public_encrypt(key_len, key, ek, pubk->pkey.rsa, 69 EVP_PKEY_encrypt_old(unsigned char *ek, const unsigned char *key, int key_len, EVP_PKEY *pubk) argument
|
/freebsd-11-stable/contrib/ntp/sntp/tests/ |
H A D | crypto.c | 40 md5.key_len = 6; 41 memcpy(&md5.key_seq, "md5seq", md5.key_len); 67 sha1.key_len = 7; 68 memcpy(&sha1.key_seq, "sha1seq", sha1.key_len); 100 cmac.key_len = CMAC_LENGTH; 101 memcpy(&cmac.key_seq, "aes-128-cmac-seq", cmac.key_len); 130 md5.key_len = 6; 131 memcpy(&md5.key_seq, "md5key", md5.key_len); 154 sha1.key_len = 7; 155 memcpy(&sha1.key_seq, "sha1key", sha1.key_len); [all...] |
H A D | keyFile.c | 11 bool CompareKeysAlternative(int key_id,int key_len,const char* type,const char* key_seq,struct key actual); 30 if (expected.key_len != actual.key_len) { 31 printf("Expected key_len: %d but was: %d\n", 32 expected.key_len, actual.key_len); 41 if (memcmp(expected.key_seq, actual.key_seq, expected.key_len) != 0) { 52 int key_len, 61 temp.key_len = key_len; 50 CompareKeysAlternative( int key_id, int key_len, const char * type, const char * key_seq, struct key actual ) argument [all...] |
/freebsd-11-stable/contrib/libarchive/libarchive/ |
H A D | archive_cryptor.c | 165 aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len) argument 169 ctx->key_len = key_len; 170 memcpy(ctx->key, key, key_len); 174 ccNoPadding, NULL, key, key_len, NULL, 0, 0, 0, &ctx->ctx); 195 memset(ctx->key, 0, ctx->key_len); 203 aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len) argument 216 switch (key_len) { 257 (PUCHAR)(uintptr_t)key, (ULONG)key_len, 0); 304 aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len) argument 337 aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len) argument 388 aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len) argument 445 aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len) argument [all...] |
/freebsd-11-stable/contrib/wpa/src/wps/ |
H A D | wps_attr_process.c | 169 const u8 *key, size_t key_len) 184 wpa_hexdump_key(MSG_DEBUG, "WPS: Network Key", key, key_len); 185 if (key_len <= sizeof(cred->key)) { 186 os_memcpy(cred->key, key, key_len); 187 cred->key_len = key_len; 213 cred->key_len > 8 && cred->key_len < 64 && 214 cred->key[cred->key_len - 1] == 0) { 219 cred->key, cred->key_len); 168 wps_process_cred_network_key(struct wps_credential *cred, const u8 *key, size_t key_len) argument [all...] |
/freebsd-11-stable/contrib/tcpdump/ |
H A D | signature.c | 51 unsigned int key_len, uint8_t *digest) 60 if (key_len > 64) { 65 MD5_Update(&tctx, key, key_len); 69 key_len = 16; 86 memcpy(k_ipad, key, key_len); 87 memcpy(k_opad, key, key_len); 50 signature_compute_hmac_md5(const uint8_t *text, int text_len, unsigned char *key, unsigned int key_len, uint8_t *digest) argument
|
/freebsd-11-stable/lib/libcrypt/ |
H A D | crypt-sha256.c | 69 size_t salt_len, key_len, cnt, rounds; local 100 key_len = strlen(key); 106 SHA256_Update(&ctx, key, key_len); 118 SHA256_Update(&alt_ctx, key, key_len); 124 SHA256_Update(&alt_ctx, key, key_len); 130 for (cnt = key_len; cnt > 32; cnt -= 32) 136 for (cnt = key_len; cnt > 0; cnt >>= 1) 140 SHA256_Update(&ctx, key, key_len); 149 for (cnt = 0; cnt < key_len; ++cnt) 150 SHA256_Update(&alt_ctx, key, key_len); [all...] |