aboutsummaryrefslogtreecommitdiffstats
path: root/sm/encrypt.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-12-16 11:31:46 +0000
committerWerner Koch <[email protected]>2003-12-16 11:31:46 +0000
commitd0fbe288b2c50d4b5a5bdf2271e964a5328a56a4 (patch)
tree1bf28c248f41aee819b6406ee92a2682391b4eb1 /sm/encrypt.c
parent* seckey-cert.c (protect_secret_key): Use gry_create_nonce for the (diff)
downloadgnupg-d0fbe288b2c50d4b5a5bdf2271e964a5328a56a4.tar.gz
gnupg-d0fbe288b2c50d4b5a5bdf2271e964a5328a56a4.zip
* encrypt.c (init_dek): Use gry_create_nonce for the IV; there is
not need for real strong random here and it even better protect the random bits used for the key.
Diffstat (limited to 'sm/encrypt.c')
-rw-r--r--sm/encrypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sm/encrypt.c b/sm/encrypt.c
index 616949bf4..60752fa07 100644
--- a/sm/encrypt.c
+++ b/sm/encrypt.c
@@ -61,7 +61,7 @@ struct encrypt_cb_parm_s {
-/* initialize the data encryptionkey (session key) */
+/* Initialize the data encryption key (session key). */
static int
init_dek (DEK dek)
{
@@ -112,7 +112,7 @@ init_dek (DEK dek)
return rc;
}
- gcry_randomize (dek->iv, dek->ivlen, GCRY_STRONG_RANDOM);
+ gcry_create_nonce (dek->iv, dek->ivlen);
rc = gcry_cipher_setiv (dek->chd, dek->iv, dek->ivlen);
if (rc)
{