frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Go Cryptography State of the Union

https://words.filippo.io/2025-state/
29•ingve•1h ago

Comments

edoceo•31m ago
I'm curious about how GC languages handle crypto. Is it a risk that decrypted stuff or keys and things may be left in memory (heap?) before the next GC cycle?
Thaxll•25m ago
If you have access to the local machine no language will save you.
edoceo•19m ago
To oversimplifiy, it's like the same-ish risk level as JS or PHP or Ruby? (assuming the underlying algorithm is good)
OhMeadhbh•9m ago
Sure. But there are several graduations of threat between "zero access" and "complete access." On the intarwebs, every request is from a potential attacker. Attackers are known for violating RFC3514, so it is frequently useful to build a trust model and use existing access control mechanism to deny "sensitive" data (or control functions) to protocol participants who cannot verify their identity and/or access permission.

These models can get complex quickly, but are nevertheless important to evaluate a system's specified behaviour.

No system is perfect and your mileage may vary.

OhMeadhbh•17m ago
What we did with Java (J/SAFE) was to add explicit methods to zero out sensitive info. It was a bit of a PITA because Java's never had consistent semantics about when final(ize,ly) methods were called. Later we added code to track which objects were allocated, but no longer needed, which also wasn't much fun.

Back in the Oak days Sun asked us (I was at RSADSI at the time) to review the language spec for security implications. Our big request was to add the "secure" storage specifier for data. The idea being a variable, const, whatever that was marked "secure" would be guaranteed not to be swapped out to disk (or one of a number of other system specific behaviors). But it was hard to find a concrete behavior that would work for all platforms they were targeting (mostly smaller systems at the time.)

My coworker Bob Baldwin had an existing relationship with Bill Joy and James Gosling (I'm assuming as part of the MIT mafia) so he led the meetings. Joy's response (or maybe Goslings, can't remember anymore) was "Language extension requests should be made on a kidney. Preferably a human kidney. Preferably yours. That way you'll think long and hard about it and you sure as hell won't submit 2."

alphazard•12m ago
It can be, another risk it that a secret value is left on the stack, and is never overwritten because the stack doesn't get to that memory address again, so it's never overwritten or zerod.

Go really just needs a few `crypto.Secret` values of various sizes, or maybe a generic type that could wrap arrays. Then the runtime can handle all the best practices, like a single place in memory, and aggressive zeroing of any copies, etc.

FiloSottile•2m ago
You might find this proposal and the upcoming runtime/secret package interesting.

https://github.com/golang/go/issues/21865

OhMeadhbh•29m ago
I'm more of a C person than a Go person, but I am unbelievably happy that someone in that community is using the word "cryptography" to mean cryptography and not Bitcoin.
jsheard•23m ago
Wasn't it just the shorthand "crypto" that got co-opted by the Shitcoin Industrial Complex? I think "cryptography" still means what it always meant regardless of who you ask.
OhMeadhbh•6m ago
That's mostly the case, but I've seen job postings for "cryptography experts" that are, as best I can tell, looking for block chain hucksters. But I'm unlikely to work for Microsoft, so I just ignore them.
OhMeadhbh•4m ago
Downvoted for mentioning that people confuse cryptography with Bitcoin? Good thing I didn't mention I think we're in an AI bubble. Or that I prefer emacs to vi.
alphazard•21m ago
I don't know why the standard library crypto packages insist on passing around `[]byte` for things like a seed value, or why we can't just pass in a seed value to a single unambiguous constructor when generating asymmetric keys. Or how the constructor for a key pair could possibly return an error, when the algorithm is supposed to be deterministic.

It all just seems a bit sloppy. Asking for a seed value like `[32]byte` could at least communicate to me that the level of security is at most 256 bits. And removing all dependencies on rand would make it obvious where the entropy must be coming from (the seed parameter). Cloudflare's CIRCL[0] library does a bit better, but shares some of the same problems.

[0] https://github.com/cloudflare/circl

FiloSottile•2m ago
> I don't know why the standard library crypto packages insist on passing around `[]byte` for things like a seed value

These are actually very deliberate choices, based on maybe unintuitive experience.

We use []byte instead of e.g. [32]byte because generally you start with a []byte that's coming from somewhere: the network, a file format, a KDF.

Then you have two options to get a [32]byte: cast or copy. They both have bad failure modes. If you do a ([32]byte)(foo) cast, you risk a panic if the file/packet/whatever is not the size you expected (e.g. because it's actually attacker controlled). If you do a copy(seed, foo) it's WAY WORSE, because you risk copying only 5 bytes and leaving the rest to zero and not noticing.

Instead, we decided to move the length check into the library everywhere we take bytes, so at worst you get an error, which presumably you know how to handle.

> why we can't just pass in a seed value to a single unambiguous constructor when generating asymmetric keys

I am not sure what you are referring to here. For e.g. ML-KEM, you pass the seed to NewDecapsulationKey768 and you get an opaque *DecapsulationKey768 to pass around. We've been moving everything we can to that.

> Or how the constructor for a key pair could possibly return an error, when the algorithm is supposed to be deterministic.

Depends. If it takes a []byte, we want to return an error to force handling of incorrect lengths. If the key is not a seed (which is only an option for private keys), it can also be invalid, deterministic or not. (This is why I like seeds. https://words.filippo.io/ml-kem-seeds/)

> removing all dependencies on rand would make it obvious where the entropy must be coming from (the seed parameter)

Another place where experience taught us otherwise. Algorithms that take a well-specified seed should indeed just take that (like NewDecapsulationKey768 does!), but where the spec annoyingly takes "randomness from the sky" (https://words.filippo.io/avoid-the-randomness-from-the-sky/) in an unspecified way, taking a io.Reader gave folks the wrong impression that they could use that for deterministic key generation, which then breaks as soon as we change the internals.

There is only one place to get entropy from in a Go program, anyway: crypto/rand. Anything else is a testing need, and it can be handled with test affordances like the upcoming crypto/mlkem/mlkemtest or testing/cryptotest.SetGlobalRandom.

Agoda Indonesia Hubungi 08154054505

https://sites.google.com/view/layanan-agoda-whatsapp-agoda/?authuser=1
1•reisrenzo•2m ago•1 comments

I asked Gemini 3 what was the smartest thing it could think of

https://fraboniface.com/blog/gemini-3-on-degrowth/
1•fraboniface•2m ago•0 comments

Call Center Agoda Jabodetabek

1•reisrenzo•3m ago•0 comments

Show HN: Simple Data Collection Firmware for Arudino Opta

https://github.com/outputindustries/busroot-dau
1•tmbkr•3m ago•0 comments

NTSB Preliminary Report – Ups Boeing MD-11F Crash [pdf]

https://www.ntsb.gov/Documents/Prelimiary%20Report%20DCA26MA024.pdf
1•gregsadetsky•4m ago•0 comments

Show HN: A browser-based IDE with multi-agent terminal execution (no install)

https://forge.synvara.ai/
1•NickFORGE•4m ago•0 comments

Disgruntled IT employee causes Houston company $862K cyber chaos

https://www.msn.com/en-us/technology/cybersecurity/disgruntled-it-employee-causes-houston-company...
2•speckx•5m ago•0 comments

The Lions Operating System

https://lionsos.org
2•plunderer•5m ago•0 comments

Nvidia earnings: more questions than answers on the state of the AI bubble

https://justdario.com/2025/11/nvidia-earnings-more-questions-than-answers-on-the-state-of-the-ai-...
1•petethomas•6m ago•0 comments

Voters lose when maps get redrawn before every election instead of once a decade

https://theconversation.com/voters-lose-when-maps-get-redrawn-before-every-election-instead-of-on...
1•PaulHoule•6m ago•0 comments

Assetto Corsa Rally

https://store.steampowered.com/app/3917090/Assetto_Corsa_Rally/
1•doener•8m ago•0 comments

Show HN: We've created a list of community projects

https://github.com/hmpl-language/projects
1•aanthonymax•9m ago•0 comments

Amazon Details Iran's Cyber Kinetic Attacks Linking Spying to Physical Strikes

https://www.securityweek.com/amazon-details-irans-cyber-enabled-kinetic-attacks-linking-digital-s...
1•Bender•9m ago•1 comments

Recent 7-Zip Vulnerability Exploited in Attacks

https://www.securityweek.com/recent-7-zip-vulnerability-exploited-in-attacks/
1•Bender•10m ago•0 comments

A second Fortinet FortiWeb zero-day spurs 7-day CISA KEV deadline

https://www.scworld.com/news/a-second-fortinet-fortiweb-zero-day-spurs-7-day-cisa-kev-deadline
2•Bender•11m ago•0 comments

Microsoft makes Zork open-source

https://opensource.microsoft.com/blog/2025/11/20/preserving-code-that-shaped-generations-zork-i-i...
13•tabletcorry•11m ago•3 comments

The Long Game

https://pluralistic.net/2025/11/20/if-you-wanted-to-get-there/
1•hn_acker•11m ago•0 comments

Organizational Superintelligence

https://leeroo.com/blogs/e647d7e7-8b86-4132-89bb-90d9d22f03ac
1•zmy999•11m ago•0 comments

Chat Wars: Microsoft vs. AOL (2014)

https://www.nplusonemag.com/issue-19/essays/chat-wars/
1•llimos•13m ago•0 comments

Nano Banana 2 – New 4K-Level AI Image Model Just Dropped

https://gempix2.us/
1•bingbing123•17m ago•1 comments

Real-time interactive quantum superfluid simulation

https://georgestagg.github.io/webgl_gpe/
1•picturesnottxt•18m ago•0 comments

The Pentagon Can't Trust GPS Anymore. Is Quantum Physics the Answer?

https://www.wsj.com/tech/the-pentagon-cant-trust-gps-anymore-is-quantum-physics-the-answer-d7b2d4e6
2•bookofjoe•18m ago•1 comments

Early experiments in accelerating science with GPT-5

https://openai.com/index/accelerating-science-gpt-5/
1•tabletcorry•20m ago•0 comments

I gave a real use-after-free crash in GDB to AI coding agents

https://undo.io/resources/ai-debug-gdb-crash-experiment-results/
1•barisione•20m ago•0 comments

Implementing Codemode in Go

https://kmosc.vercel.app/blog/implementing-codemode-go-utcp.html
1•juanviera23•20m ago•0 comments

Re: Why Do You Need Big Tech for Your SSG?

https://ldstephens.net/blog/re-why-do-you-need-big-tech-for-your-ssg-kev-quirk/
1•speckx•22m ago•0 comments

Gary Mani Mounfield of the Stone Roses and Primal Scream Dead at 63

https://www.manchestereveningnews.co.uk/news/greater-manchester-news/gary-mani-dead-stone-roses-3...
2•jjgreen•24m ago•0 comments

OpenAI enables group chats in ChatGPT

https://openai.com/index/group-chats-in-chatgpt/
2•s1mon•24m ago•1 comments

Android Developer Verification Article on Consumer Rights Wiki

https://consumerrights.wiki/index.php?title=Android_Developer_Verification
1•goplayoutside•24m ago•0 comments

Parallel Extract API

https://parallel.ai/blog/introducing-parallel-extract
3•lukaslevert•25m ago•0 comments