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

DHT Records: signatures #525

Closed
jbenet opened this issue Jan 9, 2015 · 10 comments
Closed

DHT Records: signatures #525

jbenet opened this issue Jan 9, 2015 · 10 comments
Labels
topic/dht Topic dht topic/ipns Topic ipns

Comments

@jbenet
Copy link
Member

jbenet commented Jan 9, 2015

Currently, DHT provider records are not signed, meaning anyone can sign someone else up for providing an object. That shouldn't happen: dht provide records must be signed, and only used if sig verify succeeds.

The {Get/Put}Value records we use (IPNS) already have their own notion of validity.

@whyrusleeping
Copy link
Member

I dont know how i feel about this. I agree its needed for the security aspect, but signing every single provider would get really expensive. And we are already worried about CPU consumption. Id say leave this issue open, but not worry about it for a little while.

@btc btc self-assigned this Jan 10, 2015
@btc btc added the status/in-progress In progress label Jan 10, 2015
@btc
Copy link
Contributor

btc commented Jan 10, 2015

I was curious about the cost of Sign/Verify. If I made a mistake with the computation, let me know.

2406924 ns/op is 2.4 ms/op

BenchmarkSign1B             1000           2406924 ns/op
BenchmarkSign10B            1000           2360527 ns/op
BenchmarkSign100B           1000           2354136 ns/op
BenchmarkSign1000B           500           2361775 ns/op
BenchmarkSign10000B          500           2415993 ns/op
BenchmarkSign100000B         500           2718051 ns/op
BenchmarkVerify1B          30000             52117 ns/op
BenchmarkVerify10B         30000             50968 ns/op
BenchmarkVerify100B        30000             51037 ns/op
BenchmarkVerify1000B       30000             56768 ns/op
BenchmarkVerify10000B      10000            105744 ns/op
BenchmarkVerify100000B      2000            628530 ns/op

see #528

@whyrusleeping
Copy link
Member

hrm... i wonder how 2.4 ms will impact the time it takes to add a larger file

@btc
Copy link
Contributor

btc commented Jan 10, 2015

hrm... i wonder how 2.4 ms will impact the time it takes to add a larger file

At steady state, with an average block size of 256KB, the 2.4ms operation caps sustained throughput at 102 MB/s. (Burst rate not affected)

@whyrusleeping
Copy link
Member

okay, 102MB/s isnt terrible for now. We will have to look for different solutions in the future (should be fairly easy to parallelize)

@jbenet jbenet added topic/dht Topic dht topic/ipns Topic ipns labels Mar 28, 2015
@jbenet jbenet unassigned btc Mar 30, 2015
@daviddias daviddias removed the icebox label Jan 2, 2016
@daviddias
Copy link
Member

This is now included on the Record Spec https://github.com/ipfs/specs/tree/master/records

@Kubuxu
Copy link
Member

Kubuxu commented Mar 17, 2016

I don't think it should be closed as it concerns whole DHT not only IPNS/RS.
See ipfs/specs#73

About the issue: I don't know if it feasible with RSA, keys and signatures are big and slow.
Using ed25519+curve25519 (ed for signing and curve for encryption) would give much better size and performance

@Winterhuman
Copy link
Contributor

Winterhuman commented Apr 26, 2022

@whyrusleeping @daviddias This issue is closed, but, peer records and provider records don't seem to be signed; libp2p/go-libp2p-kad-dht#558 and libp2p/go-libp2p-kad-dht#559 are still open. Should this issue be reopened or has this been superseded by another issue?

@Winterhuman
Copy link
Contributor

@Kubuxu Could this issue be reopened?

@Jorropo
Copy link
Contributor

Jorropo commented Sep 10, 2022

@Winterhuman we have other issues describing the problems, they are linked to this one. It doesn't need to be reoppened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/dht Topic dht topic/ipns Topic ipns
Projects
None yet
Development

No branches or pull requests

7 participants