diff options
author | Werner Koch <wk@gnupg.org> | 2003-11-04 12:03:33 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2003-11-04 12:03:33 +0000 |
commit | 56daf753b3749534bc180bbf8b9adc018a888885 (patch) | |
tree | 95a91c82a8e6794b340c3b4c5fc157e156193beb | |
parent | 4a65c8046c0570b78e3cd4d4bca568886a936bac (diff) | |
download | libgcrypt-56daf753b3749534bc180bbf8b9adc018a888885.tar.gz |
* cipher.h (_gcry_sha1_has_buffer): New.
* gcrypt.h (gcry_create_nonce): New.
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/cipher.h | 2 | ||||
-rw-r--r-- | src/gcrypt.h | 16 |
3 files changed, 19 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 172ff8ec..33dddd45 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2003-11-04 Werner Koch <wk@gnupg.org> + + * cipher.h (_gcry_sha1_has_buffer): New. + + * gcrypt.h (gcry_create_nonce): New. + 2003-10-31 Werner Koch <wk@gnupg.org> * libgcrypt.vers (_gcry_generate_elg_prime): Removed this symbol; diff --git a/src/cipher.h b/src/cipher.h index 265e4769..fca47bbb 100644 --- a/src/cipher.h +++ b/src/cipher.h @@ -30,6 +30,8 @@ /*-- rmd160.c --*/ void _gcry_rmd160_hash_buffer (char *outbuf, const char *buffer, size_t length); +/*-- sha1.c --*/ +void _gcry_sha1_hash_buffer (char *outbuf, const char *buffer, size_t length); /*-- smallprime.c --*/ extern ushort small_prime_numbers[]; diff --git a/src/gcrypt.h b/src/gcrypt.h index b6911022..7f2f2719 100644 --- a/src/gcrypt.h +++ b/src/gcrypt.h @@ -42,7 +42,7 @@ extern "C" { autoconf (using the AM_PATH_GCRYPT macro) check that this header matches the installed library. Note: Do not edit the next line as configure may fix the string here. */ -#define GCRYPT_VERSION "1.1.44" +#define GCRYPT_VERSION "1.1.90-cvs" /* Internal: We can't use the convenience macros for the multi precision integer functions when building this library. */ @@ -1160,9 +1160,9 @@ gcry_error_t gcry_md_list (int *list, int *list_length); ************************************/ /* The possible values for the random quality. The rule of thumb is - to use WEAK for random number which don't need to be - cryptographically strong, STRONG for session keys and VERY_STRONG - for key material. */ + to use STRONG for session keys and VERY_STRONG for key material. + WEAK is currently an alias for STRONG and should not be used + anymore - use gcry_create_nonce instead. */ typedef enum gcry_random_level { GCRY_WEAK_RANDOM = 0, @@ -1194,11 +1194,17 @@ void *gcry_random_bytes_secure (size_t nbytes, enum gcry_random_level level) _GCRY_GCC_ATTR_MALLOC; -/* Set the big inetger W to a random value of NBITS using a random +/* Set the big integer W to a random value of NBITS using a random generator with quality LEVEL. */ void gcry_mpi_randomize (gcry_mpi_t w, unsigned int nbits, enum gcry_random_level level); + +/* Create an unpredicable nonce of LENGTH bytes in BUFFER. */ +void gcry_create_nonce (unsigned char *buffer, size_t length); + + + /* Prime interface. */ typedef int (*gcry_prime_check_func_t) (void *arg, int mode, |