search for: salt_size

Displaying 3 results from an estimated 3 matches for "salt_size".

Did you mean: part_size
2007 Feb 24
1
Bigcrypt password patch
...pt.h" +#include <string.h> +#include <stdlib.h> + +/* + * Max cleartext password length in segments of 8 characters this + * function can deal with (16 segments of 8 chars= max 128 character + * password). + */ + +#define MAX_PASS_LEN 16 +#define SEGMENT_SIZE 8 +#define SALT_SIZE 2 +#define KEYBUF_SIZE ((MAX_PASS_LEN*SEGMENT_SIZE)+SALT_SIZE) +#define ESEGMENT_SIZE 11 +#define CBUF_SIZE ((MAX_PASS_LEN*ESEGMENT_SIZE)+SALT_SIZE+1) @@ -19,3 +64,74 @@ char *mycrypt(const char *key, const cha { - return crypt(key, salt); + char *dec_c2_cryp...
2012 Oct 02
2
[PATCH] Add SCRAM-SHA-1 password scheme
...st char *snonce; const char *client_first_message_bare; const char *client_final_message_without_proof; buffer_t *proof; + + /* stored */ + buffer_t *stored_key; + buffer_t *server_key; }; -static void Hi(const unsigned 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,...
2012 Sep 04
2
[PATCH] Generalize HMAC implementation
...ot;base64.h" #include "buffer.h" -#include "hmac-sha1.h" +#include "hmac.h" +#include "sha1.h" #include "randgen.h" #include "safe-memset.h" #include "str.h" @@ -44,23 +45,23 @@ const unsigned char *salt, size_t salt_size, unsigned int i, unsigned char result[SHA1_RESULTLEN]) { - struct hmac_sha1_context ctx; + struct hmac_context ctx; 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); - hm...