Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

implement ed25519 support #5

Merged
merged 5 commits into from
Sep 25, 2016
Merged

implement ed25519 support #5

merged 5 commits into from
Sep 25, 2016

Conversation

whyrusleeping
Copy link
Contributor

No description provided.

@whyrusleeping
Copy link
Contributor Author

cc @lgierth @Kubuxu for review

@whyrusleeping whyrusleeping assigned ghost and Kubuxu Jul 19, 2016
if !ok {
t.Fatal("signature didnt match")
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other basic test case is that signatures of wrong key shouldn't match.

@Kubuxu
Copy link
Member

Kubuxu commented Jul 19, 2016

ed25519 was not vendored into gx.

@Kubuxu
Copy link
Member

Kubuxu commented Jul 19, 2016

It might be too much, but it would be great to create tests for official test vectors of ed25519 so if we change the underlying impl we are sure it will still work: https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-02#section-6

@vyzo
Copy link
Contributor

vyzo commented Sep 6, 2016

Guys, what's the status of this PR and what kind of help do you need?

@whyrusleeping
Copy link
Contributor Author

@vyzo we got distracted after trying to find out how to turn ed25519 keys into curve25519 keys for encrypting things. If you can figure out how that works, that would be pretty helpful

@vyzo
Copy link
Contributor

vyzo commented Sep 6, 2016

Is encryption actually necessary from a protocol point of view?
Or is it something nice to have for completeness?

@vyzo
Copy link
Contributor

vyzo commented Sep 6, 2016

Also, is there any reason for not using the golang.org/crypto/ed25519 package?

@ghost
Copy link

ghost commented Sep 6, 2016

Also, is there any reason for not using the golang.org/crypto/ed25519 package?

Yeah the golang one [1] seems to be the continuation of agl's [2]

[1] https://github.com/golang/crypto/tree/master/ed25519
[2] https://github.com/agl/ed25519

@vyzo
Copy link
Contributor

vyzo commented Sep 6, 2016

Right, the package graduated from agl's personal github to golang.org.

@vyzo
Copy link
Contributor

vyzo commented Sep 6, 2016

So while digging in the agl code, I found this file:
https://github.com/agl/ed25519/blob/master/extra25519/extra25519.go
which provides conversion functions from ed25519 keys to curve25519 keys.

Is this what you were looking for?

Note: sadly the extra25519 subpackage is not included in the golang.org package.

@whyrusleeping
Copy link
Contributor Author

@vyzo No, encryption isnt required as part of the interface. I don't believe we use it anywhere, but it would be a nice to have down the road. We can shrink the interface for now, and when we get to the point where we need it we can finish this stuff

@vyzo
Copy link
Contributor

vyzo commented Sep 7, 2016

@whyrusleeping shrinking the interface for quick merging sounds great, we really want ECC keys!

@parkan
Copy link

parkan commented Sep 23, 2016

Anything we can do to help get this merged in? We're blocked by this and happy to help out

@ghost
Copy link

ghost commented Sep 23, 2016

  • use ed25519 from stdlib
  • it's a bit hard to review this without any indication of what the scope is -- is this supposed to let us do ipfs swarm connect /ip4/1.2.3.4/tcp/4001/ipfs/<ed25519key>? or ed25519 signatures for IPNS?

generally i'm all for it! :) support for ed25519 keys is great because it'll also enable SHS or CryptoAuth transport-level crypto.

@ghost
Copy link

ghost commented Sep 23, 2016

it's a bit hard to review this without any indication of what the scope is -- is this supposed to let us do ipfs swarm connect /ip4/1.2.3.4/tcp/4001/ipfs/<ed25519key>? or ed25519 signatures for IPNS?

lol nevermind, I see what the scope is for now :)

@whyrusleeping
Copy link
Contributor Author

@parkan right now the hard part is the migration path. How do we best ship this in a way that makes sense.

My current thoughts are to ship this into go-ipfs, so that it enables nodes to be able to handle these keys. And then only allow generation of these keys with a special flag on init.

The issue is that if your node is using an ed25519 key, you won't be able to communicate with a node who doesnt know how to handle that key.

@vyzo
Copy link
Contributor

vyzo commented Sep 24, 2016

@whyrusleeping Can't it be merged into libp2p regardless of IPFS migration?

@whyrusleeping
Copy link
Contributor Author

@vyzo Yeap! and we're gonna do that now! (Sorry about the delay, chinese internet is super difficult)

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

Successfully merging this pull request may close these issues.

5 participants