diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-01-21 09:34:09 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-01-21 09:34:09 +0000 |
commit | cbf0ad306298a3c214b2c1ea64ea8f5a66860403 (patch) | |
tree | 1ae31d848812ee49214c0200a438e882bbdf2263 /src | |
parent | eb31587bd824d3a462bf0595f5ce685f66c42d49 (diff) | |
download | gnunet-cbf0ad306298a3c214b2c1ea64ea8f5a66860403.tar.gz gnunet-cbf0ad306298a3c214b2c1ea64ea8f5a66860403.zip |
- header sync
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 4 | ||||
-rw-r--r-- | src/util/crypto_paillier.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index b6e10d1b7..5ccc557fe 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -1346,7 +1346,7 @@ GNUNET_CRYPTO_paillier_create (struct GNUNET_CRYPTO_PaillierPublicKey *public_ke | |||
1346 | */ | 1346 | */ |
1347 | void | 1347 | void |
1348 | GNUNET_CRYPTO_paillier_encrypt (const struct GNUNET_CRYPTO_PaillierPublicKey *public_key, | 1348 | GNUNET_CRYPTO_paillier_encrypt (const struct GNUNET_CRYPTO_PaillierPublicKey *public_key, |
1349 | const struct GNUNET_CRYPTO_PaillierPlaintext *plaintext, | 1349 | const gcry_mpi_t m, |
1350 | struct GNUNET_CRYPTO_PaillierCiphertext *ciphertext); | 1350 | struct GNUNET_CRYPTO_PaillierCiphertext *ciphertext); |
1351 | 1351 | ||
1352 | 1352 | ||
@@ -1362,7 +1362,7 @@ void | |||
1362 | GNUNET_CRYPTO_paillier_decrypt (const struct GNUNET_CRYPTO_PaillierPrivateKey *private_key, | 1362 | GNUNET_CRYPTO_paillier_decrypt (const struct GNUNET_CRYPTO_PaillierPrivateKey *private_key, |
1363 | const struct GNUNET_CRYPTO_PaillierPublicKey *public_key, | 1363 | const struct GNUNET_CRYPTO_PaillierPublicKey *public_key, |
1364 | const struct GNUNET_CRYPTO_PaillierCiphertext *ciphertext, | 1364 | const struct GNUNET_CRYPTO_PaillierCiphertext *ciphertext, |
1365 | struct GNUNET_CRYPTO_PaillierPlaintext *plaintext); | 1365 | gcry_mpi_t m); |
1366 | 1366 | ||
1367 | 1367 | ||
1368 | /** | 1368 | /** |
diff --git a/src/util/crypto_paillier.c b/src/util/crypto_paillier.c index 4ae42e21a..d6cf9b306 100644 --- a/src/util/crypto_paillier.c +++ b/src/util/crypto_paillier.c | |||
@@ -150,7 +150,7 @@ void | |||
150 | GNUNET_CRYPTO_paillier_decrypt (const struct GNUNET_CRYPTO_PaillierPrivateKey *private_key, | 150 | GNUNET_CRYPTO_paillier_decrypt (const struct GNUNET_CRYPTO_PaillierPrivateKey *private_key, |
151 | const struct GNUNET_CRYPTO_PaillierPublicKey *public_key, | 151 | const struct GNUNET_CRYPTO_PaillierPublicKey *public_key, |
152 | const struct GNUNET_CRYPTO_PaillierCiphertext *ciphertext, | 152 | const struct GNUNET_CRYPTO_PaillierCiphertext *ciphertext, |
153 | gcry_mpi_t *m) | 153 | gcry_mpi_t m) |
154 | { | 154 | { |
155 | gcry_mpi_t mu; | 155 | gcry_mpi_t mu; |
156 | gcry_mpi_t lambda; | 156 | gcry_mpi_t lambda; |
@@ -159,8 +159,7 @@ GNUNET_CRYPTO_paillier_decrypt (const struct GNUNET_CRYPTO_PaillierPrivateKey *p | |||
159 | gcry_mpi_t c; | 159 | gcry_mpi_t c; |
160 | 160 | ||
161 | GNUNET_assert (0 != (n_square = gcry_mpi_new (0))); | 161 | GNUNET_assert (0 != (n_square = gcry_mpi_new (0))); |
162 | if (NULL == *m) | 162 | |
163 | GNUNET_assert (0 != (m = gcry_mpi_new (0))); | ||
164 | 163 | ||
165 | GNUNET_CRYPTO_mpi_scan_unsigned (&lambda, private_key->lambda, sizeof private_key->lambda); | 164 | GNUNET_CRYPTO_mpi_scan_unsigned (&lambda, private_key->lambda, sizeof private_key->lambda); |
166 | GNUNET_CRYPTO_mpi_scan_unsigned (&mu, private_key->mu, sizeof private_key->mu); | 165 | GNUNET_CRYPTO_mpi_scan_unsigned (&mu, private_key->mu, sizeof private_key->mu); |