search for: hash_method_sha1

Displaying 4 results from an estimated 4 matches for "hash_method_sha1".

2012 Oct 02
2
[PATCH] Add SCRAM-SHA-1 password scheme
...ned char *str, size_t str_size, - const unsigned char *salt, size_t salt_size, unsigned int i, - unsigned char result[SHA1_RESULTLEN]) -{ - struct hmac_context ctx; - unsigned char U[SHA1_RESULTLEN]; - unsigned int j, k; - - /* Calculate U1 */ - hmac_init(&ctx, str, str_size, &hash_method_sha1); - hmac_update(&ctx, salt, salt_size); - hmac_update(&ctx, "\0\0\0\1", 4); - hmac_final(&ctx, U); - - memcpy(result, U, SHA1_RESULTLEN); - - /* Calculate U2 to Ui and Hi */ - for (j = 2; j <= i; j++) { - hmac_init(&ctx, str, str_size, &hash_method_sha1); - hmac_u...
2013 Aug 21
1
Bug in dovecot 2.2.5: segfault due to bad alignment
...alignment requirement of 4 due to the hash pointer. In line 171 of auth-token.c, we have following declaration of ctx as a local variable in auth_token_get(): struct hmac_context ctx; This is put on an address with an alignment requirement of 4. In lines 174 and 175 hmac_init is invoked with hash_method_sha1: hmac_init(&ctx, (const unsigned char*)username, strlen(username), &hash_method_sha1); In hmac.c, lines 43 and following, ctx->ctx with an alignment of 4 is passed to meth->init and meth->loop where meth refers to hash_method_sha1: meth->init(ctx->ctx);...
2012 Sep 04
2
[PATCH] Generalize HMAC implementation
...; unsigned char U[SHA1_RESULTLEN]; unsigned int j, k; /* Calculate U1 */ - hmac_sha1_init(&ctx, str, str_size); - hmac_sha1_update(&ctx, salt, salt_size); - hmac_sha1_update(&ctx, "\0\0\0\1", 4); - hmac_sha1_final(&ctx, U); + hmac_init(&ctx, str, str_size, &hash_method_sha1); + hmac_update(&ctx, salt, salt_size); + hmac_update(&ctx, "\0\0\0\1", 4); + hmac_final(&ctx, U); memcpy(result, U, SHA1_RESULTLEN); /* Calculate U2 to Ui and Hi */ for (j = 2; j <= i; j++) { - hmac_sha1_init(&ctx, str, str_size); - hmac_sha1_update(&ct...
2018 Feb 06
0
"make check" test-hash-method bus error (Sparc alignment)
...len=3) at sha1.c:224 input_c = 0x83908 "abc" gaplen = <optimized out> gapstart = <optimized out> off = 0 copysiz = 3 #1 0x00024eb0 in test_hash_methods_fips () at test-hash-method.c:338 n = 0 method = 0xc4e68 <hash_method_sha1> context = 0xffbff724 "gE#\001??\211\230???\020\062Tv????" result = "?9??^kK\r2U??\225`\030\220??\a\t" i = 7 last_method = 0x839d0 "sha1" test_vectors = {{method = 0x838e0 "md4", input = 0x838e8, ilen = 0, roun...