aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/keygen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index b8398b88a..b45618e90 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -690,7 +690,7 @@ gen_elg(int algo, unsigned nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
sk->is_protected = 0;
sk->protect.algo = 0;
- sk->csum = checksum_mpi_counted_nbits( sk->skey[3] );
+ sk->csum = checksum_mpi( sk->skey[3] );
if( ret_sk ) /* not a subkey: return an unprotected version of the sk */
*ret_sk = copy_secret_key( NULL, sk );
@@ -776,7 +776,7 @@ gen_dsa(unsigned int nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
sk->is_protected = 0;
sk->protect.algo = 0;
- sk->csum = checksum_mpi_counted_nbits( sk->skey[4] );
+ sk->csum = checksum_mpi ( sk->skey[4] );
if( ret_sk ) /* not a subkey: return an unprotected version of the sk */
*ret_sk = copy_secret_key( NULL, sk );
@@ -866,10 +866,10 @@ gen_rsa(int algo, unsigned nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
sk->is_protected = 0;
sk->protect.algo = 0;
- sk->csum = checksum_mpi_counted_nbits( sk->skey[2] );
- sk->csum += checksum_mpi_counted_nbits( sk->skey[3] );
- sk->csum += checksum_mpi_counted_nbits( sk->skey[4] );
- sk->csum += checksum_mpi_counted_nbits( sk->skey[5] );
+ sk->csum = checksum_mpi (sk->skey[2] );
+ sk->csum += checksum_mpi (sk->skey[3] );
+ sk->csum += checksum_mpi (sk->skey[4] );
+ sk->csum += checksum_mpi (sk->skey[5] );
if( ret_sk ) /* not a subkey: return an unprotected version of the sk */
*ret_sk = copy_secret_key( NULL, sk );