HomeSort by relevance Sort by last modified time
    Searched refs:hmac (Results 1 - 25 of 40) sorted by null

1 2

  /external/dropbear/libtomcrypt/src/mac/hmac/
hmac_process.c 15 HMAC support, process data, Tom St Denis/Dobes Vandermeer
21 Process data through HMAC
22 @param hmac The hmac state
23 @param in The data to send through HMAC
24 @param inlen The length of the data to HMAC (octets)
27 int hmac_process(hmac_state *hmac, const unsigned char *in, unsigned long inlen)
30 LTC_ARGCHK(hmac != NULL);
32 if ((err = hash_is_valid(hmac->hash)) != CRYPT_OK) {
35 return hash_descriptor[hmac->hash].process(&hmac->md, in, inlen)
    [all...]
hmac_memory.c 15 HMAC support, process a block of memory, Tom St Denis/Dobes Vandermeer
21 HMAC a block of memory to produce the authentication tag
25 @param in The data to HMAC
26 @param inlen The length of the data to HMAC (octets)
36 hmac_state *hmac; local
54 /* nope, so call the hmac functions */
55 /* allocate ram for hmac state */
56 hmac = XMALLOC(sizeof(hmac_state));
57 if (hmac == NULL) {
61 if ((err = hmac_init(hmac, hash, key, keylen)) != CRYPT_OK)
    [all...]
hmac_init.c 15 HMAC support, initialize state, Tom St Denis/Dobes Vandermeer
23 Initialize an HMAC context.
24 @param hmac The HMAC state
30 int hmac_init(hmac_state *hmac, int hash, const unsigned char *key, unsigned long keylen)
37 LTC_ARGCHK(hmac != NULL);
44 hmac->hash = hash;
59 hmac->key = XMALLOC(HMAC_BLOCKSIZE);
60 if (hmac->key == NULL) {
68 if ((err = hash_memory(hash, key, keylen, hmac->key, &z)) != CRYPT_OK)
    [all...]
hmac_done.c 15 HMAC support, terminate stream, Tom St Denis/Dobes Vandermeer
23 Terminate an HMAC session
24 @param hmac The HMAC state
25 @param out [out] The destination of the HMAC authentication tag
26 @param outlen [in/out] The max size and resulting size of the HMAC authentication tag
29 int hmac_done(hmac_state *hmac, unsigned char *out, unsigned long *outlen)
35 LTC_ARGCHK(hmac != NULL);
39 hash = hmac->hash;
60 /* Get the hash of the first HMAC vector plus the data *
    [all...]
hmac_memory_multi.c 16 HMAC support, process multiple blocks of memory, Tom St Denis/Dobes Vandermeer
22 HMAC multiple blocks of memory to produce the authentication tag
28 @param in The data to HMAC
29 @param inlen The length of the data to HMAC (octets)
30 @param ... tuples of (data,len) pairs to HMAC, terminated with a (NULL,x) (x=don't care)
39 hmac_state *hmac; local
50 /* allocate ram for hmac state */
51 hmac = XMALLOC(sizeof(hmac_state));
52 if (hmac == NULL) {
56 if ((err = hmac_init(hmac, hash, key, keylen)) != CRYPT_OK)
    [all...]
hmac_file.c 15 HMAC support, process a file, Tom St Denis/Dobes Vandermeer
21 HMAC a file
23 @param fname The name of the file you wish to HMAC
26 @param out [out] The HMAC authentication tag
37 hmac_state hmac;
52 if ((err = hmac_init(&hmac, hash, key, keylen)) != CRYPT_OK) {
64 if ((err = hmac_process(&hmac, buf, (unsigned long)x)) != CRYPT_OK) {
75 /* get final hmac */
76 if ((err = hmac_done(&hmac, out, outlen)) != CRYPT_OK) {
91 /* $Source: /cvs/libtom/libtomcrypt/src/mac/hmac/hmac_file.c,v $ *
    [all...]
  /external/dropbear/libtomcrypt/src/misc/pkcs5/
pkcs_5_2.c 40 hmac_state *hmac; local
53 hmac = XMALLOC(sizeof(hmac_state));
54 if (hmac == NULL || buf[0] == NULL) {
55 if (hmac != NULL) {
56 XFREE(hmac);
78 if ((err = hmac_init(hmac, hash_idx, password, password_len)) != CRYPT_OK) {
81 if ((err = hmac_process(hmac, salt, salt_len)) != CRYPT_OK) {
84 if ((err = hmac_process(hmac, buf[1], 4)) != CRYPT_OK) {
88 if ((err = hmac_done(hmac, buf[0], &x)) != CRYPT_OK) {
115 zeromem(hmac, sizeof(hmac_state))
    [all...]
  /external/openssl/crypto/hmac/
Makefile 5 DIR= hmac
20 LIBSRC=hmac.c
21 LIBOBJ=hmac.o
25 EXHEADER= hmac.h
77 hmac.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
78 hmac.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
79 hmac.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
80 hmac.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
81 hmac.o: ../../include/openssl/hmac.h ../../include/openssl/lhash.
    [all...]
hmactest.c 1 /* crypto/hmac/hmactest.c */
68 printf("No HMAC support\n");
72 #include <openssl/hmac.h>
145 p=pt(HMAC(EVP_md5(),
152 printf("error calculating HMAC on %d entry'\n",i);
hmac.c 1 /* crypto/hmac/hmac.c */
62 #include <openssl/hmac.h>
160 unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
  /external/wpa_supplicant_6/wpa_supplicant/src/tls/
tlsv1_record.c 143 * extra space in the end for HMAC).
149 * This function fills in the TLS record layer header, adds HMAC, and encrypts
156 struct crypto_hash *hmac; local
176 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret,
178 if (hmac == NULL) {
180 "to initialize HMAC");
183 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
185 crypto_hash_update(hmac, ct_start, pos - ct_start);
190 crypto_hash_finish(hmac, NULL, NULL);
194 if (crypto_hash_finish(hmac, pos, &clen) < 0)
251 struct crypto_hash *hmac; local
    [all...]
  /external/openssl/crypto/pkcs12/
p12_mutl.c 62 #include <openssl/hmac.h>
71 HMAC_CTX hmac; local
95 HMAC_CTX_init(&hmac);
96 HMAC_Init_ex(&hmac, key, EVP_MD_size(md_type), md_type, NULL);
97 HMAC_Update(&hmac, p12->authsafes->d.data->data,
99 HMAC_Final(&hmac, mac, maclen);
100 HMAC_CTX_cleanup(&hmac);
  /external/wpa_supplicant/
tlsv1_common.c 287 * extra space in the end for HMAC).
293 * This function fills in the TLS record layer header, adds HMAC, and encrypts
300 struct crypto_hash *hmac; local
320 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret,
322 if (hmac == NULL) {
324 "to initialize HMAC");
327 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
329 crypto_hash_update(hmac, ct_start, pos - ct_start);
334 crypto_hash_finish(hmac, NULL, NULL);
338 if (crypto_hash_finish(hmac, pos, &clen) < 0)
395 struct crypto_hash *hmac; local
    [all...]
eap_sim_common.c 171 unsigned char hmac[SHA1_MAC_LEN]; local
189 /* HMAC-SHA1-128 */
197 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
199 hmac, EAP_SIM_MAC_LEN);
202 return (os_memcmp(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1;
209 unsigned char hmac[SHA1_MAC_LEN]; local
218 /* HMAC-SHA1-128 */
225 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
226 os_memcpy(mac, hmac, EAP_SIM_MAC_LEN);
crypto_libtomcrypt.c 155 hmac_state hmac; member in union:crypto_hash::__anon6672
181 if (hmac_init(&ctx->u.hmac, find_hash("md5"), key, key_len) !=
186 if (hmac_init(&ctx->u.hmac, find_hash("sha1"), key, key_len) !=
215 ctx->error = hmac_process(&ctx->u.hmac, data, len) != CRYPT_OK;
274 if (hmac_done(&ctx->u.hmac, mac, &clen) != CRYPT_OK) {
  /frameworks/base/media/libdrm/mobile2/include/util/crypto/
DrmCrypto.h 22 #include <openssl/hmac.h>
91 // Hmac-Sha1 crypto for MAC
99 * compute MAC using Hmac-Sha1
110 * get the length of HMAC-SHA1 MAC
113 * the length of HMAC-SHA1 MAC
  /external/dropbear/
packet.c 267 /* check the hmac */
318 hmac_state hmac; local
329 if (hmac_init(&hmac,
334 dropbear_exit("HMAC error");
339 if (hmac_process(&hmac, tempbuf, 4) != CRYPT_OK) {
340 dropbear_exit("HMAC error");
345 if (hmac_process(&hmac, buf_getptr(sourcebuf, len), len) != CRYPT_OK) {
346 dropbear_exit("HMAC error");
350 if (hmac_done(&hmac, tempbuf, &bufsize) != CRYPT_OK) {
351 dropbear_exit("HMAC error")
526 hmac_state hmac; local
    [all...]
  /external/dropbear/libtomcrypt/
Android.mk 31 src/mac/hmac/hmac_done.c src/mac/hmac/hmac_file.c src/mac/hmac/hmac_init.c src/mac/hmac/hmac_memory.c \
32 src/mac/hmac/hmac_memory_multi.c src/mac/hmac/hmac_process.c src/mac/hmac/hmac_test.c \
  /external/wpa_supplicant_6/wpa_supplicant/src/eap_common/
eap_sim_common.c 173 unsigned char hmac[SHA1_MAC_LEN]; local
192 /* HMAC-SHA1-128 */
201 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
203 hmac, EAP_SIM_MAC_LEN);
206 return (os_memcmp(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1;
213 unsigned char hmac[SHA1_MAC_LEN]; local
222 /* HMAC-SHA1-128 */
229 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
230 os_memcpy(mac, hmac, EAP_SIM_MAC_LEN);
249 * T1 = HMAC-SHA-256 (K, S | 0x01
368 unsigned char hmac[SHA256_MAC_LEN]; local
408 unsigned char hmac[SHA256_MAC_LEN]; local
    [all...]
  /external/openssl/ssl/
t1_enc.c 118 #include <openssl/hmac.h>
730 HMAC_CTX hmac; local
765 HMAC_CTX_init(&hmac);
766 HMAC_Init_ex(&hmac,mac_sec,EVP_MD_size(hash),hash,NULL);
775 HMAC_Update(&hmac,dtlsseq,8);
778 HMAC_Update(&hmac,seq,8);
780 HMAC_Update(&hmac,buf,5);
781 HMAC_Update(&hmac,rec->input,rec->length);
782 HMAC_Final(&hmac,md,&md_size);
783 HMAC_CTX_cleanup(&hmac);
    [all...]
Makefile 115 bio_ssl.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
134 d1_both.o: ../include/openssl/fips.h ../include/openssl/hmac.h
156 d1_clnt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
177 d1_enc.o: ../include/openssl/fips.h ../include/openssl/hmac.h
199 d1_lib.o: ../include/openssl/fips.h ../include/openssl/hmac.h
220 d1_meth.o: ../include/openssl/fips.h ../include/openssl/hmac.h
241 d1_pkt.o: ../include/openssl/fips.h ../include/openssl/hmac.h
263 d1_srvr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
283 kssl.o: ../include/openssl/fips.h ../include/openssl/hmac.h
303 s23_clnt.o: ../include/openssl/fips.h ../include/openssl/hmac.
    [all...]
d1_enc.c 122 #include <openssl/hmac.h>
  /external/dropbear/libtomcrypt/src/headers/
tomcrypt_mac.h 9 int hmac_init(hmac_state *hmac, int hash, const unsigned char *key, unsigned long keylen);
10 int hmac_process(hmac_state *hmac, const unsigned char *in, unsigned long inlen);
11 int hmac_done(hmac_state *hmac, unsigned char *out, unsigned long *outlen);
  /external/wpa_supplicant_6/wpa_supplicant/src/crypto/
crypto_libtomcrypt.c 155 hmac_state hmac; member in union:crypto_hash::__anon6838
181 if (hmac_init(&ctx->u.hmac, find_hash("md5"), key, key_len) !=
186 if (hmac_init(&ctx->u.hmac, find_hash("sha1"), key, key_len) !=
215 ctx->error = hmac_process(&ctx->u.hmac, data, len) != CRYPT_OK;
274 if (hmac_done(&ctx->u.hmac, mac, &clen) != CRYPT_OK) {
  /external/openssl/crypto/
Android.mk 263 hmac/hmac.c \

Completed in 497 milliseconds

1 2