HNHacker News
TopNewBestAskShowJobs

dennis-tra

968 karma · joined January 27, 2019

Reach out hn@dtrautwein.eu
submissionscomments
dennis-tra··on Show HN: Peer-to-Peer data transfer tool based on libp2p
The Public-Key verification was intended as an additional sanity check and I considered it not secure enough to just rely on it alone - so I added the PAKE step as well.

As lotharrr mentioned other flaws, you may want to check out his suggestion which seems like the way to go for me. This to eliminates this "sanity check" step all together.

dennis-tra··on Show HN: Peer-to-Peer data transfer tool based on libp2p
Thanks for your feedback and the kind words as I have great respect for magic-wormhole as well! I watched your talk at PyCon 2016 several times as I was building pcp.

> [...] it creates a libp2p keypair, uses the first 44 bits of the pubkey as the transfer code, use the first 8 bits plus a rounded timestamp as a DHT channel ID, then.. publishes its libp2p contact information to a DHT slot under the channel ID and waits for the peer to connect?

That summarizes it really well. There are actually three types of records you can store in the DHT of IPFS: Provider, IPNS and Peer records [0]. What pcp stores in the DHT are:

- cid("/pcp/{unixts}/chanID") -> peerID (provider record) - peerID -> multiaddresses (peer record)

where cid stands for the content ID [1] of the given string. So the receiving peer first searches for cid("/pcp/{unixts}/chanID"), finds the peerID and then searches for its associated addresses. These addresses can contain the public address of your home router (if NAT traversal is possible) or relay addresses.

All of this complexity is pretty much hidden away by libp2p, which is amazing!

Regarding your points about using PAKE/Public Key etc: I thought of making it even harder by tying the random code to the identity - but this is indeed flawed. I'll change the logic to your suggestion!

Honestly, thanks for your write-up and the valuable input!

[0] https://docs.ipfs.io/concepts/dht/ [1] https://docs.ipfs.io/concepts/content-addressing/

dennis-tra··on Show HN: Peer-to-Peer data transfer tool based on libp2p
Thanks @wngr!

I really appreciate that this project gets a little attention.

Libp2p provides ways to establish a connection through NATs. For more information I recommend looking up the Identify [0] and Circuit Relay [1] protocols, as well as the NAT Traversal docs [2].

I implemented time based sharding because the DHT entries will remain there for up to 24h. So there is a significant chance for a channel ID collision that would result in connection attempts to peers that are long gone.

This is indeed a bit unergonomic and I haven’t covered edge cases that come with that approach. Open for suggestions :)

Best

[0] https://docs.libp2p.io/concepts/protocols/#identify [1] https://docs.libp2p.io/concepts/protocols/#circuit-relay [2] https://docs.libp2p.io/concepts/nat/

dennis-tra··on Show HN: Peer-to-Peer data transfer tool based on libp2p
Thanks @mapgrep, I fixed the typo based on your comment, but couldn’t reply timely due to the noprocrast setting of HN.
dennis-tra··on IPFS Support in Brave
Chromium 86 safelisted some distributed web schemes for registerProtocolHandler() [0][1]. Among them are also `ipfs` and `ipns`. As my first contribution to go-ipfs I grabbed the corresponding issue and added support for the gateway code [2], which will be released with go-ipfs 0.8.0. This means anyone will be able to call e.g.

navigator.registerProtocolHandler('ipfs', 'https://dweb.link/ipfs/?uri=%s', 'ipfs resolver')

Afterwards opening something like:

ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR

will be redirected to the public gateway configured above and handled accordingly.

You can also configure a different gateway as some have voiced their concern about routing everything through dweb.link.

[0] https://blog.chromium.org/2020/09/chrome-86-improved-focus-h... [1] https://developer.mozilla.org/en-US/docs/Web/API/Navigator/r... [2] https://github.com/ipfs/go-ipfs/pull/7802

dennis-tra··on Show HN: A novel approach to detect image manipulation
Hi huxflux,

Thanks for your comment and I’m glad you liked it. Your remark is true and I was concerned as well. However the HN FAQs state:

> Are reposts ok?

> If a story has not had significant attention in the last year or so, a small number of reposts is ok.

I consider 6 as a “small number” and “significant attention” certainly > 4 upvotes (the most upvotes of a previous post) - YMMV.

dennis-tra··on Show HN: A novel approach to detect image manipulation
Thanks for your comment!

> Sadly the "doesn't survive compression/re-encoding" problem is kind of a show-stopper

Indeed, that’s true - fortunately there are already ways to at least limit the problem. There is some research under the umbrella of “robust JPEG steganography” which aims to persist the covert message among compression. But I don’t know how well this actually works. LSB steganography was just the most straight forward way for me to implement.

Thanks for pointing out the security issue - I certainly wouldn’t have noticed it!

dennis-tra··on Show HN: A novel approach to image manipulation detection
Hi @Gunax,

I just saw your comment and you’re completely right. If someone knew this he/she could alter the image data in a way that this approach wouldn’t work anymore.

Thanks for your comment, I’ll add it to the Limitations section!

dennis-tra··on Show HN: Steganography-Based Image Manipulation Detection
Hi HN,

This idea came to me when I noticed that perceptually identical but slightly different images can’t be proven to Have existed at a certain point in time.

I‘m still in search of a compelling use-case though.

Happy to hear your thoughts :)

dennis-tra··on Staking Claims with Scheduled Tweets
I‘m working for a blockchain-backed secure timestamping service

https://documents.originstamp.com/

Also wrote a CLI:

https://github.com/dennis-tra/originstamp-cli

dennis-tra··on An Interactive HashiCorp Vault Shell
Nice work, I once built a terminal UI for Vault. Did not get any attention at all. Works wonders for me:

https://github.com/hashicorp/vault/pull/6108

← PreviousPage 2 of 2