gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated (d82d90817 -> 78ad9a334)


From: gnunet
Subject: [gnunet] branch master updated (d82d90817 -> 78ad9a334)
Date: Mon, 10 May 2021 21:51:01 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a change to branch master
in repository gnunet.

    from d82d90817 -added signal handling and proper cleanup to netjail
     new b66096531 CONVERSATION: Fix FTBFS for tests. #6857
     new 96eddc25f UTIL: Fix #6858
     new 78ad9a334 - include h in expanded key as defined in lsd0001

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/conversation/test_conversation_api.c |  8 ++++++--
 src/util/Makefile.am                     |  4 +++-
 src/util/crypto_ecc_gnsrecord.c          | 15 ++++++++++-----
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/src/conversation/test_conversation_api.c 
b/src/conversation/test_conversation_api.c
index c5efecd52..41ef75821 100644
--- a/src/conversation/test_conversation_api.c
+++ b/src/conversation/test_conversation_api.c
@@ -402,7 +402,9 @@ namestore_put_cont (void *cls, int32_t success, const char 
*emsg)
   GNUNET_assert (GNUNET_YES == success);
   GNUNET_assert (NULL == emsg);
   GNUNET_assert (NULL == op);
-  op = GNUNET_IDENTITY_create (id, "caller-ego", NULL, &caller_ego_create_cont,
+  op = GNUNET_IDENTITY_create (id, "caller-ego", NULL,
+                               GNUNET_IDENTITY_TYPE_ECDSA,
+                               &caller_ego_create_cont,
                                NULL);
 }
 
@@ -484,7 +486,9 @@ run (void *cls,
   cfg = c;
   GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, NULL);
   id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL);
-  op = GNUNET_IDENTITY_create (id, "phone-ego", NULL, &phone_ego_create_cont,
+  op = GNUNET_IDENTITY_create (id, "phone-ego", NULL,
+                               GNUNET_IDENTITY_TYPE_ECDSA,
+                               &phone_ego_create_cont,
                                NULL);
   ns = GNUNET_NAMESTORE_connect (cfg);
 }
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 9c1fb01a4..e720112be 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -661,4 +661,6 @@ EXTRA_DIST = \
   test_resolver_api_data.conf \
   test_service_data.conf \
   test_speedup_data.conf \
-  child_management_test.sh
+  child_management_test.sh \
+  test_crypto_vectors.sh \
+  crypto-test-vectors.json
diff --git a/src/util/crypto_ecc_gnsrecord.c b/src/util/crypto_ecc_gnsrecord.c
index a78511105..ce41a4699 100644
--- a/src/util/crypto_ecc_gnsrecord.c
+++ b/src/util/crypto_ecc_gnsrecord.c
@@ -351,12 +351,17 @@ GNUNET_CRYPTO_eddsa_private_key_derive (
   gcry_ctx_release (ctx);
   GNUNET_CRYPTO_mpi_print_unsigned (dc, sizeof(dc), d);
   /**
-   * Note that we copy all of SHA512(d) into the result and
-   * then overwrite the derived private scalar.
-   * This means that we re-use SHA512(d)[32..63]
-   * FIXME: Do we want to derive this part as well??
+   * We hash the derived "h" parameter with the
+   * other half of the expanded private key. This ensures
+   * that for signature generation, the "R" is derived from
+   * the same derivation path as "h" and is not reused.
    */
-  memcpy (result->s, sk, sizeof (sk));
+  crypto_hash_sha256_state hs;
+  crypto_hash_sha256_init (&hs);
+  crypto_hash_sha256_update (&hs, sk + 32, 32);
+  crypto_hash_sha256_update (&hs, (unsigned char*) &hc, sizeof (hc));
+  crypto_hash_sha256_final (&hs, result->s + 32);
+  //memcpy (result->s, sk, sizeof (sk));
   /* Convert to little endian for libsodium */
   for (size_t i = 0; i < 32; i++)
     result->s[i] = dc[31 - i];

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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