Live data from Hacker News

Croc: Easily and securely send things from one computer to another

github.com

111–120 of 146 posts

Re: Croc: Easily and securely send things from one computer to another

#111
post #77
post #8

A more popular and, I think, carefully analyzed alternative, from which croc was inspired, is Magic Wormhole; a good Golang implementation that compiles down to a single binary is wormhole-william: https://github.com/psanford/wormhole-william/releases I believe croc has some features wormhole doesn't (and some anti-features, like being able to pick curves and hashes). But also just that it's worth knowing that Magic…

An even more popular alternative is Resilio Sync. I still use it because somehow sharing with the tech savvy isn't a big problem, but with the unsavvy is. A GUI and a single string is on the edge of the possible, and I share much more (large, noncode, files) with this group.

It makes sense to compare croc to wormhole because they're the same thing: PAKE-backed file transfer, where nobody has accounts, no central server holds the files, everything works from behind a NAT, all you have to is install the tool and give your counterparty an autogenerated secret password for the file.

Re: Croc: Easily and securely send things from one computer to another

#112
post #70

Earlier quoted context omitted.

I think Wormhole William is great, also has a mobile app. But when I discovered croc, I switched to that, it has been very reliable. From the developer: AFAIK, croc is the only CLI file-transfer tool does all of the following: - allows any two computers to transfer data (using a relay) - provides end-to-end encryption (using PAKE) - enables easy cross-platform transfers (Windows, Linux, Mac) - allows multiple file tr…

Magic Wormhole: * Allows any two computers, NAT'd or otherwise, to transfer data * Invented the PAKE model that croc uses * Is cross-platform and runs on Windows * Allows multiple file transfers (directories) * Does not require a server or port forwarding. The thing croc does on this list that Magic Wormhole doesn't is resumption.

> Does not require a server or port forwarding.

I’m probably missing something, new to magic wormhole, but this seems to contradict the docs on magic wormholes linked by the tool you recommended, wormhole william:

“ The wormhole library requires a “Mailbox Server” (also known as the “Rendezvous Server”): a simple WebSocket-based relay that delivers messages from one client to another. This allows the wormhole codes to omit IP addresses and port numbers.“

https://magic-wormhole.readthedocs.io/en/latest/welcome.html...

Is this a particular library choice vs protocol choice? Wormhole william perhaps allows codes with ip addresses etc?

What makes me wary about these tools is the way many of them seem to bake in a default relay server but aren’t up front about it (i want that discussed in the readme.md, it’s a big deal, even if they can’t read the payload - presumably they can see which two IPs are communicating which should be absolutely disclosed). Like, to me it’s not “magic” to route stuff through a relay server. That’s the whole thing I want “magic” to avoid. (Also it doesn’t seem at all like a “wormhole” - the nomenclature strikes me as insanely grandiose)

Re: Croc: Easily and securely send things from one computer to another

#113

Earlier quoted context omitted.

Magic Wormhole: * Allows any two computers, NAT'd or otherwise, to transfer data * Invented the PAKE model that croc uses * Is cross-platform and runs on Windows * Allows multiple file transfers (directories) * Does not require a server or port forwarding. The thing croc does on this list that Magic Wormhole doesn't is resumption.

> Does not require a server or port forwarding. I’m probably missing something, new to magic wormhole, but this seems to contradict the docs on magic wormholes linked by the tool you recommended, wormhole william: “ The wormhole library requires a “Mailbox Server” (also known as the “Rendezvous Server”): a simple WebSocket-based relay that delivers messages from one client to another. This allows the wormhole codes t…

That's how croc works, too. You can run your own Magic Wormhole relay. These tools all have the same fundamental design.

What's magic-seeming about them is that you can be deep in a prod network, with tightly controlled ACLs and no routable address, and just "wormhole server.log", and then on your dev laptop on your random home wireless type, like, "wormhole receive 32-hazardous-baboon" and poof! you have "server.log". It feels pretty magical, which is why it has the name.

Croc doesn't change any of that. What croc does differently from Wormhole is that it handles resumption, and you can apparently send a globbed list of files rather than just a file or a directory. Resumption is a real feature (I'd like to know more about how the cryptography works, though). The multi-file thing is a UX tweak.

Croc has a bunch of knobs to change cryptography primitives. Those are anti-features.

You can password-authenticate a custom croc relay. I don't know why you'd ever care. Maybe this is an abuse concern? These are all E2EE designs. You don't trust the server in the first place. It's like a STUN/TURN server.

Re: Croc: Easily and securely send things from one computer to another

#114
post #17

So one thing is that this by default uses a specific public relay server to setup the handshake. So there’s a little mitm by default.

magic-wormhole (which croc was inspired by) also uses a public relay server: https://magic-wormhole.readthedocs.io/en/latest/welcome.html... Any tool that wants to reliably connect two clients P2P is going to need something like a TURN server to traverse restrictive NATs. See for instance Tailscale's use of DERP servers: https://tailscale.com/blog/how-tailscale-works/#encrypted-tc...

Yeah, ultimately you're correct

Re: Croc: Easily and securely send things from one computer to another

#115
post #70

Earlier quoted context omitted.

I think Wormhole William is great, also has a mobile app. But when I discovered croc, I switched to that, it has been very reliable. From the developer: AFAIK, croc is the only CLI file-transfer tool does all of the following: - allows any two computers to transfer data (using a relay) - provides end-to-end encryption (using PAKE) - enables easy cross-platform transfers (Windows, Linux, Mac) - allows multiple file tr…

Magic Wormhole: * Allows any two computers, NAT'd or otherwise, to transfer data * Invented the PAKE model that croc uses * Is cross-platform and runs on Windows * Allows multiple file transfers (directories) * Does not require a server or port forwarding. The thing croc does on this list that Magic Wormhole doesn't is resumption.

> Invented the PAKE model that croc uses

Nit: Magic Wormhole pioneered SPAKE2's application in a file transfer utility, but the actual invention of SPAKE2 predates Magic Wormhole.

Re: Croc: Easily and securely send things from one computer to another

#116
post #77

Earlier quoted context omitted.

An even more popular alternative is Resilio Sync. I still use it because somehow sharing with the tech savvy isn't a big problem, but with the unsavvy is. A GUI and a single string is on the edge of the possible, and I share much more (large, noncode, files) with this group.

It makes sense to compare croc to wormhole because they're the same thing: PAKE-backed file transfer, where nobody has accounts, no central server holds the files, everything works from behind a NAT, all you have to is install the tool and give your counterparty an autogenerated secret password for the file.

Apart from Pake, all that applies to Resilio, which I'm pretty sure has a bigger uptake than the rest combined.

Re: Croc: Easily and securely send things from one computer to another

#117
post #61

Earlier quoted context omitted.

Was just dissing KDE connect but it works well in most combinations. Also you can connect a USB cable.

USB cables involve about 5 steps and half my cables don't work because they were not built sturdy enough and got chomped by my office chair, standing desk, or something else. There should be a way to just right click and "send to phone"

I have a hub and an extra cable hidden under my keyboard. When I need to plug in a device for power or thunderbolt transfer it is a two step... 1) grab cable 2) plug in. Konnect is fine for other cases.

Re: Croc: Easily and securely send things from one computer to another

#118
post #29

Which public server does it use by default? I'm surprised the docs don't mention it. More generally, it feels like in 2023 that connecting two computers via a public relay ought to be a solved problem, on the level of, like, DNS. Or maybe it is and I haven't heard?

Where I live ISPs give static IPs with subscription, so, at least sending files from office home is a non-issue. In principle IPv6 should've solved this problem a long time ago... without a need for third parties.

Well static IPs solve the problem if everyone has them. But what about a 'standard relay' system that could, like, obsolete port forwarding by giving any two machines a way to negotiate a connection?

Re: Croc: Easily and securely send things from one computer to another

#119
post #116

Earlier quoted context omitted.

It makes sense to compare croc to wormhole because they're the same thing: PAKE-backed file transfer, where nobody has accounts, no central server holds the files, everything works from behind a NAT, all you have to is install the tool and give your counterparty an autogenerated secret password for the file.

Apart from Pake, all that applies to Resilio, which I'm pretty sure has a bigger uptake than the rest combined.

I mean, Google Drive has more uptake than any of these things. We're comparing PAKE-driven file transfer schemes.

Re: Croc: Easily and securely send things from one computer to another

#120

Tried it with a friend a few weeks ago and unfortunately it failed. It first began transferring the file, then for seemingly no reason I stopped receiving and then after waiting a bit got EOF and the file was not fully transferred. Seems like it is not that reliable in transferring files, or it has requirements, like open ports or so. But then why would it start and then stop trnasferring?

I have used it many times in different scenarios and networks, including firewall and behind NAT. I never had to do anything manually except copying the passphrase. Did you transfer a very large file?

Yes, approximately 3 to 4 GB in size.
Post reply on HN