aboutsummaryrefslogtreecommitdiffstats
path: root/g10/pubkey-enc.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-04-07 18:16:10 +0000
committerWerner Koch <[email protected]>1998-04-07 18:16:10 +0000
commit86f261dbc50544d73e4b9ae71fcbc2c6df5b9612 (patch)
treed3ba75484a73e1fe891f7ff862ab1f3722cb126c /g10/pubkey-enc.c
parentcast5 does now work (diff)
downloadgnupg-86f261dbc50544d73e4b9ae71fcbc2c6df5b9612.tar.gz
gnupg-86f261dbc50544d73e4b9ae71fcbc2c6df5b9612.zip
cipher reorganisiert
Diffstat (limited to 'g10/pubkey-enc.c')
-rw-r--r--g10/pubkey-enc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c
index f19af2189..7fd3101bd 100644
--- a/g10/pubkey-enc.c
+++ b/g10/pubkey-enc.c
@@ -100,6 +100,8 @@ get_session_key( PKT_pubkey_enc *k, DEK *dek )
*
* 0 2 RND(n bytes) 0 A DEK(k bytes) CSUM(2 bytes)
*
+ * (mpi_get_buffer already removed the leading zero).
+ *
* RND are non-zero randow bytes.
* A is the cipher algorithm
* DEK is the encryption key (session key) with length k
@@ -107,8 +109,7 @@ get_session_key( PKT_pubkey_enc *k, DEK *dek )
*/
if( DBG_CIPHER )
log_hexdump("DEK frame:", frame, nframe );
- for(n=0; n < nframe && !frame[n]; n++ ) /* skip leading zeroes */
- ;
+ n=0;
if( n + 7 > nframe )
{ rc = G10ERR_WRONG_SECKEY; goto leave; }
if( frame[n] == 1 && frame[nframe-1] == 2 ) {