HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
stouset
secrets
Rust2017–2017
stouset / secrets

secrets

Secure storage for cryptographic secrets in Rust

2Distinct people
2Mentions
0Explicit recommenders
254GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Secure storage for cryptographic secrets in Rust

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by 6-hour interval2 dated mentions

Observed mentions: 2017-04-22 20:15:49 UTC to 2017-04-28 04:09:22 UTC.

012017-04-22 18:00:00 UTC to 2017-04-23 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsApr 22, 18:002017-04-23 00:00:00 UTC to 2017-04-23 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-23 06:00:00 UTC to 2017-04-23 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-23 12:00:00 UTC to 2017-04-23 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-23 18:00:00 UTC to 2017-04-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-24 00:00:00 UTC to 2017-04-24 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-24 06:00:00 UTC to 2017-04-24 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-24 12:00:00 UTC to 2017-04-24 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-24 18:00:00 UTC to 2017-04-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-25 00:00:00 UTC to 2017-04-25 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-25 06:00:00 UTC to 2017-04-25 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsApr 25, 06:002017-04-25 12:00:00 UTC to 2017-04-25 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-25 18:00:00 UTC to 2017-04-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-26 00:00:00 UTC to 2017-04-26 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-26 06:00:00 UTC to 2017-04-26 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-26 12:00:00 UTC to 2017-04-26 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-26 18:00:00 UTC to 2017-04-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-27 00:00:00 UTC to 2017-04-27 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-27 06:00:00 UTC to 2017-04-27 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-27 12:00:00 UTC to 2017-04-27 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-27 18:00:00 UTC to 2017-04-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-28 00:00:00 UTC to 2017-04-28 06:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsApr 28, 00:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Apr 22, 18:002017-04-22 18:00:00 UTC2017-04-23 00:00:00 UTC101
Apr 23, 00:002017-04-23 00:00:00 UTC2017-04-23 06:00:00 UTC000
Apr 23, 06:002017-04-23 06:00:00 UTC2017-04-23 12:00:00 UTC000
Apr 23, 12:002017-04-23 12:00:00 UTC2017-04-23 18:00:00 UTC000
Apr 23, 18:002017-04-23 18:00:00 UTC2017-04-24 00:00:00 UTC000
Apr 24, 00:002017-04-24 00:00:00 UTC2017-04-24 06:00:00 UTC000
Apr 24, 06:002017-04-24 06:00:00 UTC2017-04-24 12:00:00 UTC000
Apr 24, 12:002017-04-24 12:00:00 UTC2017-04-24 18:00:00 UTC000
Apr 24, 18:002017-04-24 18:00:00 UTC2017-04-25 00:00:00 UTC000
Apr 25, 00:002017-04-25 00:00:00 UTC2017-04-25 06:00:00 UTC000
Apr 25, 06:002017-04-25 06:00:00 UTC2017-04-25 12:00:00 UTC000
Apr 25, 12:002017-04-25 12:00:00 UTC2017-04-25 18:00:00 UTC000
Apr 25, 18:002017-04-25 18:00:00 UTC2017-04-26 00:00:00 UTC000
Apr 26, 00:002017-04-26 00:00:00 UTC2017-04-26 06:00:00 UTC000
Apr 26, 06:002017-04-26 06:00:00 UTC2017-04-26 12:00:00 UTC000
Apr 26, 12:002017-04-26 12:00:00 UTC2017-04-26 18:00:00 UTC000
Apr 26, 18:002017-04-26 18:00:00 UTC2017-04-27 00:00:00 UTC000
Apr 27, 00:002017-04-27 00:00:00 UTC2017-04-27 06:00:00 UTC000
Apr 27, 06:002017-04-27 06:00:00 UTC2017-04-27 12:00:00 UTC000
Apr 27, 12:002017-04-27 12:00:00 UTC2017-04-27 18:00:00 UTC000
Apr 27, 18:002017-04-27 18:00:00 UTC2017-04-28 00:00:00 UTC000
Apr 28, 00:002017-04-28 00:00:00 UTC2017-04-28 06:00:00 UTC101

What Hacker News says

2 sources
> You could use LLVM to compile any language to LLVM IR, and then to machine code using a backend. Does that mean every language has the same properties as Rust? Nope, it's largely depend on the language design. > If Node/Java/Go use GC (or VMs), then aren't they more safe than Rust? Yes and No, memory allocation is one of the issue in GC. Go is generally more safe on networking but not security where Rust can manage it securely. This is a good read on Java vs Rust: https://llogiq.github.io/2016/02/28/java-rust.html https://news.ycombinator.com/item?id=14173716 https://github.com/stouset/secrets/tree/stack-secrets In fact, we don't have to bother much with GC because it's depend on programmers and job availability. GC was created based on the idea that manage memory is hard for large scale project. It work well for Azul Systems,
Read the rest
and they have recently advertised for LLVM engineer to bring more performance where JVM could not.
In Rust 1.17
Author of `go.secrets` here (it's defunct, btw). Memguard, at first glance, will not actually do anything. Why? Because go's garbage collector can and will move and copy memory as it sees fit. `mlock` on a go-managed buffer just prevents the original memory location from being swapped out to disk, but does nothing to the copies that the go runtime will periodically create. This is why I used libsodium (I also implemented this same concept, much more maturely for Rust[1]). If you want this approach to work, you have to manage the memory yourself. In the Rust version, I also use Rust's ownership rules to automatically `mprotect` with `PROT_NONE` when it's not in use, `PROT_READ` when it's being borrowed immutably, and `PROT_WRITE` when it's being borrowed mutably, all with static compilation guarantees. Plus libsodium creates guard pages be
Read the rest
fore and after the allocation (ensuring no underflows or overflows either into or out of the allocated memory space), and also places a canary before the allocated region that panics when the memory is freed if the canary has been modified. It's far, far more than a simple `mlock`. I have a rewrite half-in-progress[2] that handles stack-allocated secrets with fewer guarantees (`mlock` and zero-on-free) but that's more appropriate for short-lived stack secrets. [1]: https://github.com/stouset/secrets [2]: https://github.com/stouset/secrets/tree/stack-secrets
In Show HN: Securely Handle Encryption Keys in Go

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.