aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/handbook/chapters/installation.texi8
-rw-r--r--doc/handbook/gnunet.texi5
-rw-r--r--src/curl/curl.c2
-rw-r--r--src/util/crypto_ecc.c60
-rw-r--r--src/util/perf_crypto_asymmetric.c2
5 files changed, 59 insertions, 18 deletions
diff --git a/doc/handbook/chapters/installation.texi b/doc/handbook/chapters/installation.texi
index 9cd2b1bcc..a907a1046 100644
--- a/doc/handbook/chapters/installation.texi
+++ b/doc/handbook/chapters/installation.texi
@@ -28,13 +28,13 @@ link to the project websites.
28The mandatory libraries and applications are 28The mandatory libraries and applications are
29@itemize @bullet 29@itemize @bullet
30@item libtool 30@item libtool
31@item autoconf @geq{}2.59 31@item autoconf 2.59 or above
32@item automake @geq{}1.11.1 32@item automake 1.11.1 or above
33@item pkg-config 33@item pkg-config
34@item libgcrypt @geq{}1.6 34@item libgcrypt 1.6 or above
35@item libextractor 35@item libextractor
36@item libidn 36@item libidn
37@item libmicrohttpd @geq{}0.9.52 37@item libmicrohttpd 0.9.52 or above
38@item libnss 38@item libnss
39@item libunistring 39@item libunistring
40@item gettext 40@item gettext
diff --git a/doc/handbook/gnunet.texi b/doc/handbook/gnunet.texi
index 07d18435b..a479d2059 100644
--- a/doc/handbook/gnunet.texi
+++ b/doc/handbook/gnunet.texi
@@ -5,11 +5,6 @@
5@settitle GNUnet Reference Manual 5@settitle GNUnet Reference Manual
6@c @exampleindent 2 6@c @exampleindent 2
7 7
8@c macros for backwards compatibility
9@macro geq{}
10>=
11@end macro
12
13@c Set Versions which might be used in more than one place: 8@c Set Versions which might be used in more than one place:
14@set GNUFTP-URL https://ftp.gnu.org/gnu/gnunet 9@set GNUFTP-URL https://ftp.gnu.org/gnu/gnunet
15@set PYPI-URL https://pypi.python.org/packages/source 10@set PYPI-URL https://pypi.python.org/packages/source
diff --git a/src/curl/curl.c b/src/curl/curl.c
index 3443525e3..e413d1cf5 100644
--- a/src/curl/curl.c
+++ b/src/curl/curl.c
@@ -426,6 +426,7 @@ download_get_result (struct GNUNET_CURL_DownloadBuffer *db,
426 return json; 426 return json;
427} 427}
428 428
429
429/** 430/**
430 * Add custom request header. 431 * Add custom request header.
431 * 432 *
@@ -445,6 +446,7 @@ GNUNET_CURL_append_header (struct GNUNET_CURL_Context *ctx,
445 return GNUNET_OK; 446 return GNUNET_OK;
446} 447}
447 448
449
448/** 450/**
449 * Run the main event loop for the Taler interaction. 451 * Run the main event loop for the Taler interaction.
450 * 452 *
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index ac7662a10..a720d6c2b 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -789,19 +789,40 @@ GNUNET_CRYPTO_cmp_peer_identity (const struct GNUNET_PeerIdentity *first,
789static gcry_sexp_t 789static gcry_sexp_t
790data_to_eddsa_value (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose) 790data_to_eddsa_value (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose)
791{ 791{
792 struct GNUNET_HashCode hc;
793 gcry_sexp_t data; 792 gcry_sexp_t data;
794 int rc; 793 int rc;
795 794
795#if 1
796 struct GNUNET_HashCode hc;
797
798 GNUNET_CRYPTO_hash (purpose,
799 ntohl (purpose->size),
800 &hc);
801 if (0 != (rc = gcry_sexp_build (&data, NULL,
802 "(data(flags eddsa)(hash-algo %s)(value %b))",
803 "sha512",
804 (int)sizeof (hc),
805 &hc)))
806 {
807 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR,
808 "gcry_sexp_build",
809 rc);
810 return NULL;
811 }
812#else
796 GNUNET_CRYPTO_hash (purpose, ntohl (purpose->size), &hc); 813 GNUNET_CRYPTO_hash (purpose, ntohl (purpose->size), &hc);
797 if (0 != (rc = gcry_sexp_build (&data, NULL, 814 if (0 != (rc = gcry_sexp_build (&data, NULL,
798 "(data(flags eddsa)(hash-algo %s)(value %b))", 815 "(data(flags eddsa)(hash-algo %s)(value %b))",
799 "sha512", 816 "sha512",
800 (int)sizeof (hc), &hc))) 817 ntohl (purpose->size),
818 purpose)))
801 { 819 {
802 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc); 820 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR,
821 "gcry_sexp_build",
822 rc);
803 return NULL; 823 return NULL;
804 } 824 }
825#endif
805 return data; 826 return data;
806} 827}
807 828
@@ -816,19 +837,38 @@ data_to_eddsa_value (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose)
816static gcry_sexp_t 837static gcry_sexp_t
817data_to_ecdsa_value (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose) 838data_to_ecdsa_value (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose)
818{ 839{
819 struct GNUNET_HashCode hc;
820 gcry_sexp_t data; 840 gcry_sexp_t data;
821 int rc; 841 int rc;
822 842
823 GNUNET_CRYPTO_hash (purpose, ntohl (purpose->size), &hc); 843#if 1
844 struct GNUNET_HashCode hc;
845
846 GNUNET_CRYPTO_hash (purpose,
847 ntohl (purpose->size),
848 &hc);
824 if (0 != (rc = gcry_sexp_build (&data, NULL, 849 if (0 != (rc = gcry_sexp_build (&data, NULL,
825 "(data(flags rfc6979)(hash %s %b))", 850 "(data(flags rfc6979)(hash %s %b))",
826 "sha512", 851 "sha512",
827 (int)sizeof (hc), &hc))) 852 (int)sizeof (hc), &hc)))
828 { 853 {
829 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR, "gcry_sexp_build", rc); 854 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR,
855 "gcry_sexp_build",
856 rc);
857 return NULL;
858 }
859#else
860 if (0 != (rc = gcry_sexp_build (&data, NULL,
861 "(data(flags rfc6979)(hash %s %b))",
862 "sha512",
863 ntohl (purpose->size),
864 purpose)))
865 {
866 LOG_GCRY (GNUNET_ERROR_TYPE_ERROR,
867 "gcry_sexp_build",
868 rc);
830 return NULL; 869 return NULL;
831 } 870 }
871#endif
832 return data; 872 return data;
833} 873}
834 874
@@ -877,8 +917,12 @@ GNUNET_CRYPTO_ecdsa_sign (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv,
877 return GNUNET_SYSERR; 917 return GNUNET_SYSERR;
878 } 918 }
879 gcry_sexp_release (sig_sexp); 919 gcry_sexp_release (sig_sexp);
880 GNUNET_CRYPTO_mpi_print_unsigned (sig->r, sizeof (sig->r), rs[0]); 920 GNUNET_CRYPTO_mpi_print_unsigned (sig->r,
881 GNUNET_CRYPTO_mpi_print_unsigned (sig->s, sizeof (sig->s), rs[1]); 921 sizeof (sig->r),
922 rs[0]);
923 GNUNET_CRYPTO_mpi_print_unsigned (sig->s,
924 sizeof (sig->s),
925 rs[1]);
882 gcry_mpi_release (rs[0]); 926 gcry_mpi_release (rs[0]);
883 gcry_mpi_release (rs[1]); 927 gcry_mpi_release (rs[1]);
884 928
diff --git a/src/util/perf_crypto_asymmetric.c b/src/util/perf_crypto_asymmetric.c
index b2b9f5692..a2cb3a6ce 100644
--- a/src/util/perf_crypto_asymmetric.c
+++ b/src/util/perf_crypto_asymmetric.c
@@ -29,7 +29,7 @@
29 29
30static struct GNUNET_TIME_Absolute start; 30static struct GNUNET_TIME_Absolute start;
31 31
32#define l 50 32#define l 500
33 33
34struct TestSig 34struct TestSig
35{ 35{