gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r24582 - in gnunet/src: include util


From: gnunet
Subject: [GNUnet-SVN] r24582 - in gnunet/src: include util
Date: Sun, 28 Oct 2012 18:02:19 +0100

Author: grothoff
Date: 2012-10-28 18:02:19 +0100 (Sun, 28 Oct 2012)
New Revision: 24582

Modified:
   gnunet/src/include/gnunet_crypto_lib.h
   gnunet/src/util/Makefile.am
   gnunet/src/util/crypto_ecc.c
Log:
-ecc signing working

Modified: gnunet/src/include/gnunet_crypto_lib.h
===================================================================
--- gnunet/src/include/gnunet_crypto_lib.h      2012-10-28 16:52:43 UTC (rev 
24581)
+++ gnunet/src/include/gnunet_crypto_lib.h      2012-10-28 17:02:19 UTC (rev 
24582)
@@ -91,16 +91,15 @@
 /**
  * Length of a hash value
  */
-#define GNUNET_CRYPTO_HASH_LENGTH 512/8
+#define GNUNET_CRYPTO_HASH_LENGTH (512/8)
 
 /**
- * FIXME: what is an acceptable value here?
- * Note: round to multiple of 8 minus 2.
+ * Maximum length of an ECC signature.
+ * Note: round up to multiple of 8 minus 2 for alignment.
  */
-#define GNUNET_CRYPTO_ECC_SIGNATURE_DATA_ENCODING_LENGTH 138
+#define GNUNET_CRYPTO_ECC_SIGNATURE_DATA_ENCODING_LENGTH 190
 
 /**
- * FIXME: what is an acceptable value here?
  * Maximum length of the public key (q-point, Q = dP) when encoded.
  */
 #define GNUNET_CRYPTO_ECC_MAX_PUBLIC_KEY_LENGTH 140

Modified: gnunet/src/util/Makefile.am
===================================================================
--- gnunet/src/util/Makefile.am 2012-10-28 16:52:43 UTC (rev 24581)
+++ gnunet/src/util/Makefile.am 2012-10-28 17:02:19 UTC (rev 24582)
@@ -211,6 +211,7 @@
  test_crypto_aes \
  test_crypto_aes_weak \
  test_crypto_crc \
+ test_crypto_ecc \
  test_crypto_hash \
  test_crypto_hkdf \
  test_crypto_ksk \

Modified: gnunet/src/util/crypto_ecc.c
===================================================================
--- gnunet/src/util/crypto_ecc.c        2012-10-28 16:52:43 UTC (rev 24581)
+++ gnunet/src/util/crypto_ecc.c        2012-10-28 17:02:19 UTC (rev 24582)
@@ -942,7 +942,7 @@
   gcry_sexp_t data;
 
   GNUNET_CRYPTO_short_hash (purpose, ntohl (purpose->size), &hc);
-#define FORMATSTRING "(4:data(32:01234567890123456789012345678901))"
+#define FORMATSTRING 
"(4:data(5:flags3:raw)(5:value32:01234567890123456789012345678901))"
 #define FORMATSTRING2 
"(4:data(4:hash6:sha25632:01234567890123456789012345678901))"
   bufSize = strlen (FORMATSTRING) + 1;
   {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]