Hi Mike, To publish records in the GNU Name System, all you need to do is create the respective GNS Record Set and put it into your namestore. (See gnunet_namestore_service.h). Then, the "zonemaster" service will automatically pick them up, sign them, and put them into the DHT.
GNS records are integrity-protected by the ECC signature, so there is no need for you to worry about sha512 or anything like that. Also, all of that happens within GNS/zonemaster/DHT/gnsrecord, so your application does not have to deal with it. What you should do is write a libgnsrecord-plugin to convert your record type's data form/to a binary format, but that's mostly so that the command-line tools can be used to display/manipulate the records. Also, instead of a construction like: > _ircd._dht.<some hash of nick/chan>.<whatever domain would be appropriate> you should avoid having the crypto and other technical things show up in names. Instead, "_ircd" should just be implied by the record type that will be used by the application, and "_dht" is a technical detail that doesn't matter to the user. You don't need to hash the nick or chan, so just use it directly: nick.channelname.domain-that-introduced-you.gnu Happy hacking! Christian On 03/22/2017 08:41 PM, Mike Mestnik wrote: > Hello, > I've made a number of assumptions that I'd like to get some feedback > about, but mainly I'm lost as to how nodes discover each other at the > application level. I believe my main issue can be solved by > publishing gns records, but I'm totally in the dark as to how to > construct and put these. > > Firstly I wonder if DHT contents can be tamper resistant, if not > proof, by using sha512 of the data as the key. > https://github.com/cheako/gnunetircd/blob/old-master/src/dht.c#L44 > > Then I wonder if I've correctly built and designed the DHT contents. > https://github.com/cheako/gnunetircd/blob/old-master/src/dht.c#L73 > https://github.com/cheako/gnunetircd/blob/old-master/src/dht.h#L33 > > Given that, I believe what's left is to publish the key as the nick in > gns. Here is what I'm thinking about for names. > _ircd._dht.<some hash of nick/chan>.<whatever domain would be appropriate> > > If done this way I believe a single gns type can be used for all > hashcode records. The nick and channel names in irc have few > restrictions, they can contain almost *any symbol. If I'm > understanding the RFC correctly even 8bit chars are allowable. Our > only saving grace is that they are **limited, per RFC, to a length of > 9. > > * https://tools.ietf.org/html/rfc1459#section-2.2 > ** Some networks allow longer names. > > Thanks! > > _______________________________________________ > GNUnet-developers mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/gnunet-developers >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ GNUnet-developers mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnunet-developers
