Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namecoin integration #31

Closed
thesoftwarejedi opened this issue Jan 24, 2015 · 21 comments
Closed

Namecoin integration #31

thesoftwarejedi opened this issue Jan 24, 2015 · 21 comments

Comments

@thesoftwarejedi
Copy link
Contributor

Namecoin should be used for publishing sites, which would allow namecoin lookups to the the public key address of a zeronet site. This completely decentralizes the technology that handles name lookups.
I propose zeronet public addresses should go in a value field "zn" or "0net" within a domain name registered with namecoin. More info here: https://wiki.namecoin.info/index.php?title=Domain_Name_Specification#Value_field

@mchelen
Copy link

mchelen commented Jan 25, 2015

👍

@HelloZeroNet
Copy link
Owner

We need a cross-platform, pure-python dns query lib, so we can use http://www.opennicproject.org/ servers.

@sull
Copy link

sull commented Jan 31, 2015

@HelloZeroNet
Copy link
Owner

I have chosen this format, to allow subdomains (@ means zeronetwork.bit without subdomain)

    "zeronet": {
        "blog": "1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8", 
        "@": "1EU1tbG9oC1A8jz2ouVwGZyQ5asrNsE4Vr", 
        "talk": "1TaLk3zM7ZRskJvrh3ZNCDVGXvkJusPKQ"
    }, 

But I haven't found any reliable way to resolve this information without installing namecoind.

Using NS TXT record and http://www.opennicproject.org/ could be a workaround:

import DNS
DNS.DiscoverNameServers()

r = DNS.DnsRequest("zeronet.zeronetwork.bit", qtype="TXT", server=['192.71.247.247', '75.127.14.107'], timeout=300)
res = r.req()
res.show() 
[...]
zeronet.zeronetwork.bit    1109    TXT     ['@:1EU1tbG9oC1A8jz2ouVwGZyQ5asrNsE4Vr,blog:1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8,talk:1TaLk3zM7ZRskJvrh3ZNCDVGXvkJusPKQ']
[...]

@HelloZeroNet
Copy link
Owner

Found this one, it could work (but single point of failure): https://dnschain.info/bit/d/zeronetwork
edit:
found alternative servers:

@HelloZeroNet
Copy link
Owner

a new dnschain server:
https://api.dnschain.net/v1/namecoin/key/zeronetwork.bit

There is an another option to resolve bit domain:

Create a special, dns resolver site that holds all registered zeronet domains in a json file, so everyone has the dns database on localhost.

Pros:

  • Its allows fast and secure dns resolving
  • Does not depends on any central server
  • Nobody can see what domains are you resolving
  • Later it could work well with anonymity networks (tor, i2p)

Cons:

  • It needs a bot that update the database from namecoin transactions
  • If the private key of the site is compromised then its possible to modify dns records

@HelloZeroNet
Copy link
Owner

another alternative:
http://namecha.in/name/d/zeronetwork

@HelloZeroNet
Copy link
Owner

I have done a plugin using 2 dnschain servers, but i'm not satisfied by the result:

  • It takes 1-5 sec to resolve the domain using the 2 servers, by increasing the dns caching time its possible to workaround the problem, but not a real solution for offline/slow connections
  • Trusting in 2 servers result not secure enough and I could not find other servers that allows to resolve namecoin json informations

So I decided to take the alternative, dns resolver site approach. Its developing well, need some more days to finish it.

@HelloZeroNet
Copy link
Owner

Status report: i think everything is working now, if no other bugs found i will publish it tomorrow

@HelloZeroNet
Copy link
Owner

Added Zeroname plugin: b122f47
The experimental dnschain plugin also supplied (disabled by default)
Later, if lightweight namecoin client is released it will be also supported.

@thesoftwarejedi
Copy link
Contributor Author

Has this been documented anywhere?

"zeronet": {
    "blog": "1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8", 
    "@": "1EU1tbG9oC1A8jz2ouVwGZyQ5asrNsE4Vr", 
    "talk": "1TaLk3zM7ZRskJvrh3ZNCDVGXvkJusPKQ"
}

@HelloZeroNet
Copy link
Owner

The "" key means the primary domain, any other than that is a subdomain.

Also added this information to http://127.0.0.1:43110/1Name2NXVi1RDPDgf5617UoW7xA6YrhM9F "HOW TO ADD A DOMAIN?" section

@thesoftwarejedi
Copy link
Contributor Author

The "d/" prefix is intended to be .bit domains on the clearnet within the current DNS architecture - something that we shouldn't be concerned about at all. I'm thinking that using the "d/" prefix is not the optimal solution, and perhaps a new "z/" prefix should be used instead.

Perhaps "z/zeronet" would contain:
{ "addr":
{ "": "1EU1tbG9oC1A8jz2ouVwGZyQ5asrNsE4Vr",
"blog": "1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8"
}
"name": "ZeroNet Home",
.....
}

Then the url via browser extension or such, would be:
"zero://zeronet" or "zero://blog.zeronet"
or
"http://zeronet.zero" or "http://blog.zeronet.zero"

Perhaps this is total pie-in-the-sky given that tools for treating namecoin as clearnet DNS are already available so we just hijack the "d/" prefix. That said, shouldn't we at the least swap out the ".bit" for ".zero"?

Where is a good place to have this discussion? I also intend on running namecoind local, and would like to plug it into that directly.

@HelloZeroNet
Copy link
Owner

yeah you probably right a custom prefix could be better solution, but i think we can have both: z/ prefix for .zero d/ prefix for .bit.
This allows to use your exitsing domains in zeronet and if someone wants to access your site without zeronet installed (and he able to resolve .bit domains) you can redirect him to a description about zeronet.

Update: I have asked about it in #namecoin and they said there was similar request from i2p and tor, but they rejected it and advised to use d/. Reasons:

  • (1) it is useful to be able to verify that the IPv4 and ZeroNet versions of a name are owned by the same person; d/ makes that easy
  • (2) if a new namespace is introduced, users will have to defensively grab their names at that namespace to prevent squatters from getting them
  • (3) as an extension of (1), some users want their software to be able to choose which resolver to use (e.g. IPv4, Tor, ZeroNet) based on which ones are supported by their browser config; using a single namespace makes that easy

but changing .bit to .zero still sound like a good idea

@phelix
Copy link

phelix commented Jul 9, 2015

Hi! It would probably be better to stick to .bit: https://forum.namecoin.info/viewtopic.php?f=5&t=1069

@purplesyringa
Copy link
Contributor

What do you expect 'add[ing] pgp to your website' to do?

@purplesyringa
Copy link
Contributor

You can use encryption already using the CryptMessage plugin. You don't need PGP for that. Check ZeroMail for example.

@purplesyringa
Copy link
Contributor

Sending me to GitHub makes no sense I said I need something to put on my website so users of this particular website can use it

That GitHub repository contains sample code for the feature you were asking about, you dumbass.

And I need to activate a password mnemonic For lost passwords as well

Then you need to implement the password-to-private-key conversion yourself or use a library that provides such a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants
@sull @mchelen @phelix @shortcutme @thesoftwarejedi @HelloZeroNet @purplesyringa and others