Go-ipfs: Allow option to use ed25519

Created on 22 Jan 2017  Â·  8Comments  Â·  Source: ipfs/go-ipfs

The current version of IPFS hardcodes the crypto to RSA. Would be cool to have to the option to use ed25519 for identities.

kinenhancement neeanalysis

Most helpful comment

Figured a way to do this from one node:

ipfs diag net | awk '{print $2}' | uniq  | xargs -I {} ipfs id {} | grep AgentVersion | sort | uniq -c | sort -rn

returns 130k nodes (the size of the overall network at most within this order-of-magnitude), with stat of a subset (16341) of them

  12986     "AgentVersion": "go-libp2p/3.3.4",
    761     "AgentVersion": "go-libp2p/0.1.0",
    397     "AgentVersion": "go-ipfs/0.4.5-dev/a90c508",
    391     "AgentVersion": "go-ipfs/0.4.5-pre2/416f025",
    338     "AgentVersion": "go-ipfs/0.4.5-dev/",
    320     "AgentVersion": "go-ipfs/0.4.5-dev/28b0868",
    224     "AgentVersion": "mcnode/1.5 (go-libp2p/4.3.1)",
    220     "AgentVersion": "go-ipfs/0.4.5-pre2/4add5b8a",
    166     "AgentVersion": "go-ipfs/0.4.5-pre2/",
    139     "AgentVersion": "go-ipfs/0.4.5-dev/ed12bc5",
     77     "AgentVersion": "go-ipfs/0.4.5-pre2/4add5b8a9",
     71     "AgentVersion": "go-ipfs/0.4.5-pre2/65e0704",
     68     "AgentVersion": "go-ipfs/0.4.5-dev/bb2ffb58",
     67     "AgentVersion": "go-ipfs/0.4.5-dev/f3c3728",
     61     "AgentVersion": "go-ipfs/0.4.5-dev/ea36c38",
     55     "AgentVersion": "go-ipfs/0.4.5-dev/5052ed46",

79.5% on "go-libp2p/3.3.4", 14.5% on "go-ipfs/0.4.5-*", 4.6% on "go-libp2p/0.1.0", 1.4% on mcnode

All 8 comments

Our crypto is not x25519 ready, I don't know what is the currentl plan of fixing that.

As far as I can tell, libp2p already supports ed25519. What more needs to be done to be x25519 ready?

Crypto protocol that supports it, currently we are using go-libp2p-secio which doesn't.

and migration path.

The secio protocol will handle ed25519 just fine. The real reason we havent enabled it yet is because if you use an ed25519 key, you would only be able to communicate with other peers that have the code that supports it. We're waiting until an acceptable number of peers roll out to a supported version before we give users the option to do that.

That said, for open bazaar, since youre not interoping with the existing ipfs network, you shouldnt have any problem enabling users to use ed25519 keys (since everyone in the open bazaar network should then be running that code).

We're waiting until an acceptable number of peers roll out to a supported version before we give users the option to do that.

How should "acceptable number" be defined -- majority (>50%) or supermajority (>66%)?

The distribution of the versions being used in the wild could possibly be figured out the same way as the geographical distributions of ipfs nodes (I wasn't able to find the author of this code to repurpose the script).

Figured a way to do this from one node:

ipfs diag net | awk '{print $2}' | uniq  | xargs -I {} ipfs id {} | grep AgentVersion | sort | uniq -c | sort -rn

returns 130k nodes (the size of the overall network at most within this order-of-magnitude), with stat of a subset (16341) of them

  12986     "AgentVersion": "go-libp2p/3.3.4",
    761     "AgentVersion": "go-libp2p/0.1.0",
    397     "AgentVersion": "go-ipfs/0.4.5-dev/a90c508",
    391     "AgentVersion": "go-ipfs/0.4.5-pre2/416f025",
    338     "AgentVersion": "go-ipfs/0.4.5-dev/",
    320     "AgentVersion": "go-ipfs/0.4.5-dev/28b0868",
    224     "AgentVersion": "mcnode/1.5 (go-libp2p/4.3.1)",
    220     "AgentVersion": "go-ipfs/0.4.5-pre2/4add5b8a",
    166     "AgentVersion": "go-ipfs/0.4.5-pre2/",
    139     "AgentVersion": "go-ipfs/0.4.5-dev/ed12bc5",
     77     "AgentVersion": "go-ipfs/0.4.5-pre2/4add5b8a9",
     71     "AgentVersion": "go-ipfs/0.4.5-pre2/65e0704",
     68     "AgentVersion": "go-ipfs/0.4.5-dev/bb2ffb58",
     67     "AgentVersion": "go-ipfs/0.4.5-dev/f3c3728",
     61     "AgentVersion": "go-ipfs/0.4.5-dev/ea36c38",
     55     "AgentVersion": "go-ipfs/0.4.5-dev/5052ed46",

79.5% on "go-libp2p/3.3.4", 14.5% on "go-ipfs/0.4.5-*", 4.6% on "go-libp2p/0.1.0", 1.4% on mcnode

Closing as a lot changed since 2017 and ed25519 are here to stay:

  • it is possible to create ed25519 as additional publishing key for IPNS:
    ipfs key gen -t ed25519 (this was supported for a while, tested on go-ipfs 0.5.0)
  • we are switching PeerIDs to ed25519 by default in go-ipfs 0.6 – tracked in https://github.com/ipfs/go-ipfs/issues/6916
Was this page helpful?
0 / 5 - 0 ratings

Related issues

kallisti5 picture kallisti5  Â·  3Comments

daviddias picture daviddias  Â·  3Comments

JesseWeinstein picture JesseWeinstein  Â·  4Comments

jonchoi picture jonchoi  Â·  3Comments

whyrusleeping picture whyrusleeping  Â·  4Comments