aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/gnunet-service-namestore.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-07-24 14:50:36 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-07-24 14:50:36 +0000
commita72c5ddb6e05ac67a9fc3763b7e5f9f262b47634 (patch)
treef8877f3817a444390086ed3a8e125d5358ee2eae /src/namestore/gnunet-service-namestore.c
parentf0d6ef9f6ca88b923caa35455bde8101de5f88c6 (diff)
downloadgnunet-a72c5ddb6e05ac67a9fc3763b7e5f9f262b47634.tar.gz
gnunet-a72c5ddb6e05ac67a9fc3763b7e5f9f262b47634.zip
RFC new gns publishing
Diffstat (limited to 'src/namestore/gnunet-service-namestore.c')
-rw-r--r--src/namestore/gnunet-service-namestore.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 24b4dad21..f8663775b 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -1639,11 +1639,33 @@ zone_iteraterate_proc (void *cls,
1639 if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get (zonekeys, &long_hash))) 1639 if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get (zonekeys, &long_hash)))
1640 { 1640 {
1641 expire = get_block_expiration_time (rd_count_filtered, rd_filtered); 1641 expire = get_block_expiration_time (rd_count_filtered, rd_filtered);
1642
1643
1642 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1644 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1643 "Creating signature for `%s' in zone `%s' with %u records and expiration %llu\n", 1645 "Creating signature for `%s' in zone `%s' with %u records and expiration %llu\n",
1644 name, GNUNET_NAMESTORE_short_h2s(&zone_hash), 1646 name, GNUNET_NAMESTORE_short_h2s(&zone_hash),
1645 rd_count_filtered, 1647 rd_count_filtered,
1646 (unsigned long long) expire.abs_value); 1648 (unsigned long long) expire.abs_value);
1649 /* TODO 1) AB: New publishing
1650 * - Create HDKF(Q,i)
1651 * - Encrypt record block R with HKDF: HDKF(Q,i) == E(R)
1652 * - Create block |e,E(R)|
1653 * - Create d: h * x mod n == hash (name, zone) * c->privkey mod n
1654 * - Create ECC signature S_d (e, E_HKDF(Q,i))
1655 *
1656 * Return: zone_key , expire, name, rd_count_filtered, new signature S_d
1657 *
1658 * Q: zone's public key
1659 * x: zone's private key
1660 * i: name
1661 * d: derived secret
1662 *
1663 * - how do I get n:
1664 * Extract from private key s_expression
1665 * Question
1666 * - how do I multiply h * x?
1667 */
1668
1647 new_signature = GNUNET_NAMESTORE_create_signature (cc->privkey, expire, name, 1669 new_signature = GNUNET_NAMESTORE_create_signature (cc->privkey, expire, name,
1648 rd_filtered, rd_count_filtered); 1670 rd_filtered, rd_count_filtered);
1649 GNUNET_assert (NULL != new_signature); 1671 GNUNET_assert (NULL != new_signature);