[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28311 - in gnunet/src: gns namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28311 - in gnunet/src: gns namestore |
Date: |
Wed, 24 Jul 2013 16:50:36 +0200 |
Author: wachs
Date: 2013-07-24 16:50:36 +0200 (Wed, 24 Jul 2013)
New Revision: 28311
Modified:
gnunet/src/gns/gns_common.c
gnunet/src/gns/gnunet-service-gns.c
gnunet/src/namestore/gnunet-service-namestore.c
Log:
RFC new gns publishing
Modified: gnunet/src/gns/gns_common.c
===================================================================
--- gnunet/src/gns/gns_common.c 2013-07-24 14:41:46 UTC (rev 28310)
+++ gnunet/src/gns/gns_common.c 2013-07-24 14:50:36 UTC (rev 28311)
@@ -44,6 +44,10 @@
struct GNUNET_HashCode name_hash_double;
struct GNUNET_HashCode zone_hash_double;
+ /* TODO 3) AB: New publishing
+ * Create new key V = H(H(i,Q) * Q)
+ */
+
GNUNET_CRYPTO_short_hash (name,
strlen (name),
&name_hash);
Modified: gnunet/src/gns/gnunet-service-gns.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns.c 2013-07-24 14:41:46 UTC (rev 28310)
+++ gnunet/src/gns/gnunet-service-gns.c 2013-07-24 14:50:36 UTC (rev 28311)
@@ -462,6 +462,17 @@
return;
}
+ /* TODO 2) AB: New publishing
+ *
+ * - Use new signature S_d
+ * - Obtain new derived public key V = H(H(i,Q) * Q)
+ * - Obtain HKDF(i,Q)
+ * - Compute encrypte record block E with HKDF(i,Q) (rd, rd_count)
+ * - Create block B = |V,E,S_d|
+ * - Compute new DHT key H(V) in TODO 3)
+ *
+ * -> Put (H(V), B)
+ */
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Putting records for `%s' into the DHT\n", name);
rd_payload_length = GNUNET_NAMESTORE_records_get_size (rd_count, rd);
@@ -491,7 +502,7 @@
NULL);
return;
}
-
+ /* TODO AB: Here records are put in the DHT: modify dht_key to H(key) =
H(H(name,zone) * zone) */
GNUNET_GNS_get_key_for_record (name, &zhash, &dht_key);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"putting %u records from zone %s for `%s' under key: %s with size
%u and timeout %s\n",
Modified: gnunet/src/namestore/gnunet-service-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-service-namestore.c 2013-07-24 14:41:46 UTC
(rev 28310)
+++ gnunet/src/namestore/gnunet-service-namestore.c 2013-07-24 14:50:36 UTC
(rev 28311)
@@ -1639,11 +1639,33 @@
if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get (zonekeys,
&long_hash)))
{
expire = get_block_expiration_time (rd_count_filtered, rd_filtered);
+
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Creating signature for `%s' in zone `%s' with %u records and
expiration %llu\n",
name, GNUNET_NAMESTORE_short_h2s(&zone_hash),
rd_count_filtered,
(unsigned long long) expire.abs_value);
+ /* TODO 1) AB: New publishing
+ * - Create HDKF(Q,i)
+ * - Encrypt record block R with HKDF: HDKF(Q,i) == E(R)
+ * - Create block |e,E(R)|
+ * - Create d: h * x mod n == hash (name, zone) * c->privkey mod n
+ * - Create ECC signature S_d (e, E_HKDF(Q,i))
+ *
+ * Return: zone_key , expire, name, rd_count_filtered, new signature S_d
+ *
+ * Q: zone's public key
+ * x: zone's private key
+ * i: name
+ * d: derived secret
+ *
+ * - how do I get n:
+ * Extract from private key s_expression
+ * Question
+ * - how do I multiply h * x?
+ */
+
new_signature = GNUNET_NAMESTORE_create_signature (cc->privkey, expire,
name,
rd_filtered,
rd_count_filtered);
GNUNET_assert (NULL != new_signature);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28311 - in gnunet/src: gns namestore,
gnunet <=