frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ed25519-CLI – command-line interface for the Ed25519 signature system (2024)

https://lib25519.cr.yp.to/ed25519-cli.html
96•INGELRII•1w ago

Comments

alexjurkiewicz•1d ago
(2024)

My favourite part of these tools is the zany use of numbered file descriptors. `keypair` outputs the public key on fd 5 and secret key on fd 9. But signing reads the secret key on fd 8, while verification reads the public key on fd 4! Why aren't they the same?? I have to read the manpage every time.

Retr0id•1d ago
I'm curious, what do you actually use it for?

I'd have otherwise guessed that this tool mainly exists just to test lib25519. Personally I'd only ever want a library, or some higher-level tool. A CLI tool that just does raw signing feels like a weird (and footgun-shaped) middle ground.

XorNot•1d ago
It's why no one has succeeded in replacing GPG: you need a lot of systems to work in order to have an actual viable one, the ability to spit out signatures from keys is required but not sufficient.
adastra22•23h ago
GPG is pervasive for the same reason git is pervasive: network effects. There are plenty of better alternatives.
XorNot•22h ago
Such as? I need an alternative which supports commutative trust relationships of some sort which are revocable.
C4K3•21h ago
Keybase or any of the tools inspired by keybase (foks.pub etc)
tptacek•1d ago
This mostly exists to test lib25519 and ostensibly to build systems with shell scripts (though: few people would do that). It is a weird and footgun-shaped middle ground.
Fnoord•1d ago
> I'm curious, what do you actually use it for?

FTA:

> These tools allow lib25519 to be easily used from shell scripts.

I've never used ed25519-cli, but not having to use a library is nice for someone who isn't a programmer.

tptacek•1d ago
The Venn diagram of "not a programmer" and "can safely use Ed25519" is two non-overlapping circles.
alexjurkiewicz•23h ago
Simply combine this tool with `openssl enc` and your shell script is as secure as any shell script could be
kfreds•22h ago
I don't consider myself a programmer and I can use Ed25519 safely. I do however understand computing fairly well.
Retr0id•16h ago
I consider myself a programmer and ed25519-understander, but the idea of using it directly within a shell script terrifies me.
PunchyHamster•19h ago
"this app needs me to generate a key and point to it in config" is plenty of overlap
Retr0id•15h ago
If you just want a raw ed25519 private key then `head -c32 /dev/urandom` does the job. But usually you want a DER/PEM wrapper or similar, which the openssl cli tools handle nicely.
loeg•1d ago
Someone writing shell scripts is a programmer, for better or worse.
jedahan•1d ago
I was wondering the same thing. My best guess is that is to guard against operator misuse. Like usb-a only plugging in one way. Anything that is secret will never accidentally print to stdout. String interpolation in bash with `—option $empty` might be safer than `8<$empty`. Have to explore more but yeah, this is a new pattern for me as well.
yellowapple•21h ago
Another possible factor driving the decision to use numbered file descriptors: the logic to validate that a file exists (or can exist) at a given path, is readable/writable, etc. gets punted to the shell instead of being something the program itself has to worry about.
gnull•21h ago
Those descriptors like 5 could be mapped to anything, including descriptor 1, stdout.
chuckadams•1d ago
What a strange convention. I'm partial to minisign, which works on plain old files.
tptacek•1d ago
This little CLI is not meaningfully an alternative for signify/minify. Here's a good piece on signify from its author (who also comments here):

https://www.openbsd.org/papers/bsdcan-signify.html

gnull•21h ago
That's such a user-hostile design decision. I can't fathom what justifies it (other than kinky taste).

Makes your commands unreadable without a manual, leaves a lot of room for errors that are quietly ignored. And forces you into using a shell that comes with its own set of gotchas, bash is not known to be a particularly good tool for security.

And to those who stay this adds flexibility: it doesn't. Those file descriptors are available under/dev/fd on linux, with named options you can do --pk /dev/fd/5. Or make a named pipe.

PunchyHamster•19h ago
it being option can be nice if you don't want your keys touching disk and need to pass it over to other apps.

it being default is insanity

minitech•19h ago
> Those file descriptors are available under/dev/fd on linux, with named options you can do --pk /dev/fd/5.

If you have a procfs mounted at /proc and the open syscall to use on it, sure (and even then, it’s wasteful and adds unnecessary failure paths). Even argument parsing is yet more code to audit.

I think the design is pretty good as-is.

pseudohadamard•20h ago
It's djb's web site so it's a djb design. With great genius comes great different thinking.
alfiedotwtf•19h ago
I’m guessing it’s to support the test framework it’s built with?
PunchyHamster•19h ago
support is fine. Being default is crazy
why-o-why•1d ago
Why not zoidbe... I mean, why not open ssh? It's literally a CLI that does every crypto operation with every primitive (except some PQC)?
tptacek•1d ago
If you mean the OpenSSL CLI, it's hard to think of a more footgun-y cryptographic tool than the one that:

* defaults to unauthenticated encryption

* buries its one authenticated mode

* requires explicit command-line nonces

* defaults to an MD5 KDF

You could probably keep going for another 10 bullets. Never use the OpenSSL CLI for anything other than TLS stuff.

quotemstr•1d ago
Yeah, the OpenSSL CLI sucks. So what's to be done?

Sure, we can build a 25519-specific tool with a less footgun-y interface. Fine, whatever, for that one use case.

Or we can build an alternative OpenSSL CLI that explodes OpenSSL and its numerous useful features in a general way and helps fix lots of use cases.

tptacek•1d ago
Nothing is to be done. Just don't use the OpenSSL CLI. It's a deeply cursed concept for a tool!
quotemstr•1d ago
A command like cryptography swiss army knife useful though. If not openssl, then what?
tptacek•1d ago
It's useful as a toy and a learning tool, but for nothing else. For those two things, OpenSSL is fine as it is.
coppsilgold•1d ago
You can use ssh-keygen for signing and verifying signatures.

You can also use age[1] to encrypt payloads targeting ssh public keys. And decrypt using ssh private keys.

[1] <https://github.com/FiloSottile/age>

why-o-why•23h ago
Are you confusing the open openSSL library with the CLI? Absolutely none of this is true when used as a signing tool on the CLI. Seems like you just needed to rant, rather than answer my question. Which is fine: I do it to, but I was legit asking a question that you ignored and you seem to know about openSSL?
esseph•1d ago
> feels like a weird (and footgun-shaped) middle ground.

hmm

> It is a weird and footgun-shaped middle ground.

Oh? HMMMMM :|

mrbluecoat•1d ago
Sounds like the perfect place to embed credential stealing malware. Good thing they publish their code on an independent third-party public code sharing platform. Oh wait...
perching_aix•22h ago
Short of suspecting a malicious tarball, I really can't think of a reason why "publish[ing] their code on an independent third-party public code sharing platform" would be a selling point. You're getting the source code straight from the horse's mouth this way.
WiSaGaN•23h ago
I can't find the source. Anyone can point to it?
minitech•17h ago
The Download link in the header (https://lib25519.cr.yp.to/download.html).
PunchyHamster•19h ago
> It writes the public key to file descriptor 5, and then writes the secret key to file descriptor 9.

Is the project trying to compete with GPG for worst interface ? Magic numbers BAD, especially in something that will mostly be used in scripts

Show HN: Terminal UI for AWS

https://github.com/huseyinbabal/taws
209•huseyinbabal•7h ago•97 comments

Why does a least squares fit appear to have a bias when applied to simple data?

https://stats.stackexchange.com/questions/674129/why-does-a-linear-least-squares-fit-appear-to-ha...
169•azeemba•7h ago•46 comments

Lessons from 14 Years at Google

https://addyosmani.com/blog/21-lessons/
902•cdrnsf•12h ago•417 comments

During Helene, I just wanted a plain text website

https://sparkbox.com/foundry/helene_and_mobile_web_performance
33•CqtGLRGcukpy•1h ago•23 comments

The unbearable joy of sitting alone in a café

https://candost.blog/the-unbearable-joy-of-sitting-alone-in-a-cafe/
472•mooreds•13h ago•287 comments

The Showa Hundred Year Problem

https://www.dampfkraft.com/showa-100.html
24•polm23•5d ago•5 comments

Street Fighter II, the World Warrier (2021)

https://fabiensanglard.net/sf2_warrier/
329•birdculture•13h ago•56 comments

Linear Address Spaces: Unsafe at any speed (2022)

https://queue.acm.org/detail.cfm?id=3534854
125•nithssh•4d ago•86 comments

The year of the 3D printed miniature and other lies we tell ourselves

https://matduggan.com/the-year-of-the-3d-printed-miniature-and-other-lies-we-tell-ourselves/
111•sagacity•6d ago•75 comments

Ripple, a puzzle game about 2nd and 3rd order effects

https://ripplegame.app/
90•mooreds•9h ago•24 comments

I charged $18k for a Static HTML Page (2019)

https://idiallo.com/blog/18000-dollars-static-web-page
182•caminanteblanco•2d ago•45 comments

Millennium Challenge: A corrupted military exercise and its legacy (2015)

https://warontherocks.com/2015/11/millennium-challenge-the-real-story-of-a-corrupted-military-exe...
25•lifeisstillgood•4h ago•20 comments

Eurostar AI vulnerability: When a chatbot goes off the rails

https://www.pentestpartners.com/security-blog/eurostar-ai-vulnerability-when-a-chatbot-goes-off-t...
101•speckx•6h ago•29 comments

Six Harmless Bugs Lead to Remote Code Execution

https://mehmetince.net/the-story-of-a-perfect-exploit-chain-six-bugs-that-looked-harmless-until-t...
30•ozirus•3d ago•1 comments

Show HN: An interactive guide to how browsers work

https://howbrowserswork.com/
184•krasun•12h ago•29 comments

Web development is fun again

https://ma.ttias.be/web-development-is-fun-again/
311•Mojah•12h ago•395 comments

Agentic Patterns

https://github.com/nibzard/awesome-agentic-patterns
84•PretzelFisch•8h ago•9 comments

The baffling purple honey found only in North Carolina

https://www.bbc.com/travel/article/20250417-the-baffling-purple-honey-found-only-in-north-carolina
11•rmason•4d ago•1 comments

The great shift of English prose

https://www.worksinprogress.news/p/english-prose-has-become-much-easier
37•dsubburam•4d ago•26 comments

Moiré Explorer

https://play.ertdfgcvb.xyz/#/src/demos/moire_explorer
136•Luc•14h ago•17 comments

Show HN: Hover – IDE style hover documentation on any webpage

https://github.com/Sampsoon/hover
41•sampsonj•9h ago•18 comments

Show HN: An LLM-Powered PCB Schematic Checker (Major Update)

https://traceformer.io/
34•wafflesfreak•6h ago•15 comments

Anti-aging injection regrows knee cartilage and prevents arthritis

https://scitechdaily.com/anti-aging-injection-regrows-knee-cartilage-and-prevents-arthritis/
216•nis0s•12h ago•78 comments

Bison return to Illinois' Kane County after 200 years

https://phys.org/news/2025-12-bison-illinois-kane-county-years.html
127•bikenaga•5d ago•39 comments

FreeBSD Home NAS, part 3: WireGuard VPN, routing, and Linux peers

https://rtfm.co.ua/en/freebsd-home-nas-part-3-wireguard-vpn-linux-peer-and-routing/
148•todsacerdoti•15h ago•8 comments

Trellis AI (YC W24) is hiring engineers to build AI agents for healthcare access

https://www.ycombinator.com/companies/trellis-ai/jobs/ngvfeaq-member-of-technical-staff-full-time
1•macklinkachorn•10h ago

Using Hinge as a Command and Control Server

https://mattwie.se/hinge-command-control-c2
95•mattwiese•13h ago•46 comments

How I archived 10 years of memories using Spotify

https://notes.xdavidhu.me/notes/how-i-archived-10-years-of-memories-using-spotify
89•xdavidhu•12h ago•40 comments

Claude Code On-the-Go

https://granda.org/en/2026/01/02/claude-code-on-the-go/
232•todsacerdoti•7h ago•162 comments

Stop Forwarding Errors, Start Designing Them

https://fast.github.io/blog/stop-forwarding-errors-start-designing-them/
81•andylokandy•8h ago•47 comments