15 ms·
Age is a simple, modern and secure file encryption tool, format, and Go library
- aborsy 2y agoWhen will there be a post quantum version, or a plugin by the same author?
- deleted 2y ago[deleted]
- ashconnor 2y agoRust version: https://github.com/str4d/rage https://github.com/str4d/rage
- rcarmo 2y agoSuch an appropriate name.
- e3bc54b2 2y agoAge (and its rust implementation Rage) combined with agenix[0] and age.el[1] has made my self-hosted deployment and management so, so easy without compromising security. That, when combined with general NixOS conveniences is why I'm able to self-host at all. If not for these, just the anxiety of having to setup new server in case of whatever loss and the associated time/opportunity loss kept me from dong the same for years. Anyway, just want to say that Age is great! P.S. The author also did an analysis of Restic the backup tool [2] which also prompted me to setup nice backup solution for my machines. Pretty cool. [0]: https://github.com/ryantm/agenix https://github.com/ryantm/agenix [1]: https://github.com/anticomputer/age.el https://github.com/anticomputer/age.el [2]: https://words.filippo.io/restic-cryptography/ https://words.filippo.io/restic-cryptography/
- ggpsv 2y agoCan you elaborate on how age (and the downstream packages) has made a difference in your workflows?
- sharperguy 2y agoWith agenix, you can encrypt your secrets, such as API keys, and have them stored in your git repo alongside the system configuration (which in nixos is just a bunch of text files). Then you only need to provision the server with the ed25519 private key corresponding to the pubkey the files were encrypted with, and agenix will automatically decrypt the files on boot and place them in /run/agenix, with the specified access permissions.
- SOLAR_FIELDS 2y agoSo like SOPS, but specific to nix somehow? What is the advantage of the nixy integration here vs the universality of SOPS? Better native integration with NixOS?
- e3bc54b2 2y agoSimilar to sops in a sense that both allow encryption/decryption with SSH keys. In terms of NixOS integration, both are on equal footing. I'm just unfond of yaml is all.
- t0astbread 2y agoTo clarify maybe, NixOS puts all configuration and program files it handles in a world-readable object store on disk. If you want to manage secrets on NixOS securely, you have two choices: - Manage it out of band. That negates all of the benefits of NixOS, at least for those files. (I.e. you would need additional deployment steps, rollback wouldn't work, you would have to stop and migrate system services that depend on those secrets yourself, etc.) - Encrypt it and only decrypt it on activation (which happens when switching to a new config or on boot). agenix and nix-sops (the premier SOPS/NixOS integration) are two libraries that you can include in your config to do that. With this, the world-readable store only contains encrypted secrets. Of course with #2 you still have to manage your private keys (age or whatever SOPS uses) out-of-band but that is significantly less work since those aren't expected to change nearly as much. You can also generally decouple that from your day-to-day deployment workflow.
- zelphirkalt 2y agoServer deployment/management tools like Ansible have their own file encryption and string encryption tools builtin.
- max-privatevoid 2y agoBut then you'd have to use YAML
- zelphirkalt 2y agoI concur, that is an unfortunate side-effect. The only thing you can then do is to treat yaml as a thing that is constantly out to get you. Make all values strings and use things like > or >- to write strings without having to escape quotes, don't rely on any referencing, except for Ansible's templating itself. Do not code in yaml. Or, if you really want to, perhaps you could even write yaml like json, since json should be accepted format for yaml files.
- ElectricalUnion 2y agoIf the thing accepts YAML it often also accepts a equivalent JSON.
- valczir 2y agoyaml is a superset of json, so by definition anything that accepts yaml _must_ accept json
- turboponyy 2y agoMore notably, then you'd have to use Ansible.
- shlant 2y agoany suggestions on a better config management tool?
- 2y ago
- hardwaresofton 2y agoI’ve used git-crypt[0] with great success. It uses git smudge so you never commit secrets if you set it up properly the first time. Unfortunately, it doesn’t support groups. For a solution that scales to teams, check out SOPS[1]. You have to do a little more work to be sure that secrets are ignored in the repo but it works reasonably well and is well known. Transparent support at the editor level (age.el) sounds really nice though. [0] https://github.com/AGWA/git-crypt https://github.com/AGWA/git-crypt [1] https://github.com/getsops/sops https://github.com/getsops/sops
- sidpatil 2y agoYou forgot to include the links.
- mkl 2y agoThese? [0] https://github.com/AGWA/git-crypt https://github.com/AGWA/git-crypt [1] https://github.com/getsops/sops https://github.com/getsops/sops
- hardwaresofton 2y agoYes! Thank you :)
- sharperguy 2y agoI have been using agenix and it is very helpful. I am also looking into writing a system module that makes it easy to generate secrets on the fly. A lot of secrets are just things like, backend and frontend of some service need to be configured with matching keys, but are both running on the same device. In that case you could have a systemd service which just generates a new random key if it doesn't already exist, and then ensure that the dependent services wait for that service to complete. That way you don't have to store anything in git for those at least.
- mattmein 2y agoCheck out agenix-rekey[https://github.com/oddlama/agenix-rekey https://github.com/oddlama/agenix-rekey], it has the ability to set up secret generators.
- deleted 2y ago[deleted]
- lifeisstillgood 2y agoRecommended in here I believe: https://www.latacora.com/blog/2020/03/12/the-soc-starting/ https://www.latacora.com/blog/2020/03/12/the-soc-starting/
- fmajid 2y agoNo, it’s here (scroll all the way to the bottom): https://www.latacora.com/blog/2019/07/16/the-pgp-problem/ https://www.latacora.com/blog/2019/07/16/the-pgp-problem/
- lifeisstillgood 2y agoThank you - my bookmarks are all in my head :-(
- lf-non 2y agoThere is also an official typescript implementation [1] and sops supports it natively [2]. [1] https://github.com/FiloSottile/typage https://github.com/FiloSottile/typage [2] https://github.com/getsops/sops?tab=readme-ov-file#encrypting-using-age https://github.com/getsops/sops?tab=readme-ov-file#encryptin...
- deleted 2y ago[deleted]
- kitd 2y ago> The author pronounces it [aɡe̞] with a hard g, like GIF Lol, or 'git' according to one of my more sensitive colleagues.
- thaumasiotes 2y ago'Git' is a preexisting word; it'd be pretty strange to pronounce it with a soft G. https://en.wiktionary.org/wiki/git#Etymology_1 https://en.wiktionary.org/wiki/git#Etymology_1 https://en.wiktionary.org/wiki/git#Etymology_2 https://en.wiktionary.org/wiki/git#Etymology_2 It'd be like naming your software fukr and then insisting "no no no, the R is pronounced 'are', not 'er'."
- kitd 2y agoGit' is a preexisting word; it'd be pretty strange to pronounce it with a soft G. It certainly was when I heard it.
- gjvc 2y agoI work with a French guy who uses "szheet"
- ljlolel 2y agoOr Coq?
- deleted 2y ago[deleted]
- nvy 2y agoCoq is pronounced exactly how it looks. It's the French word for rooster and for the language, comes from part of the guy's name.
- thaumasiotes 2y ago> It's the French word for rooster It's also the English word for rooster.
- zokier 2y agoAge is good at what it does, but note that afaik you probably should almost always pair it with something like signify[1], because age doesn't have integrity/authenticity verification (by design). [1] https://man.openbsd.org/signify.1 https://man.openbsd.org/signify.1
- Sh4pe 2y agoI always use minisign [1] for this. It is small and self-contained. [1] https://github.com/jedisct1/minisign https://github.com/jedisct1/minisign
- q2dg 2y agoOr Minisign (https://jedisct1.github.io/minisign https://jedisct1.github.io/minisign)
- deleted 2y ago[deleted]
- makeworld 2y agoPretty sure age does have integrity and authenticity due to the use of AEAD.
- zokier 2y agoits complicated: https://words.filippo.io/dispatches/age-authentication/ https://words.filippo.io/dispatches/age-authentication/
- lrvick 2y agoFor someone that never ever needs signing or authentication, including for ones own backups, who never has malware in their threat model, and trusts this specless tool will be maintained forever, maybe this makes sense? Even then openssl or sq can solve the problem in the same number of commands but with sntabdards. Most people are best off going with a modern implementation of the PGP standard, ideally via a smart card to protect you from key exfil via malware. Tools like Keyfork, Sequoia, and/or openpgp-card-tool are almost certainly what you want for most personal signing, encryption, and authentication use cases. You get broad compatibility with many many different tools.
- amluto 2y ago> Even then openssl or sq can solve the problem in the same number of commands but with sntabdards. Using OpenSSL to properly encrypt a file is next to impossible, and if you actually succeed at doing so, you’re very unlikely to be following a defined standard. I’m not familiar with sq. > modern implementation of the PGP standard The PGP standard is an unmitigated disaster.
- e12e 2y ago> I’m not familiar with sq. The reimplantation of PGP as a clean rust implantation with a simple cli (sq) is imnho quite exiting: https://sequoia-pgp.gitlab.io/sq-user-guide/ https://sequoia-pgp.gitlab.io/sq-user-guide/ I do think perhaps it's too little too late - bit in contrast with age it does provide for signing and authentication as well as simple(-ish) key/certificate management.
- dpatterbee 2y ago> trusts this specless tool will be maintained forever As per the third sentence of the readme there indeed is a spec[0]. There is also an alternative implementation in the form of rage[1], as well as numerous others listed on the awesome-age page[2]. [0]: https://github.com/C2SP/C2SP/blob/main/age.md https://github.com/C2SP/C2SP/blob/main/age.md [1]: https://github.com/str4d/rage https://github.com/str4d/rage [2]: https://github.com/FiloSottile/awesome-age https://github.com/FiloSottile/awesome-age
- FiloSottile 2y ago_o/ hi all, age author here! age is the one of my projects that grew most organically into an ecosystem. It's always great to see what people build with it. Happy to answer any questions. Here are some previous discussions 132 points on Feb 26, 2023 | 77 comments | https://news.ycombinator.com/item?id=34936504 https://news.ycombinator.com/item?id=34936504 126 points on Sept 26, 2022 | 54 comments | https://news.ycombinator.com/item?id=32980141 https://news.ycombinator.com/item?id=32980141 113 points on June 11, 2022 | 33 comments | https://news.ycombinator.com/item?id=31705670 https://news.ycombinator.com/item?id=31705670 494 points on Sept 6, 2021 | 88 comments | https://news.ycombinator.com/item?id=28435613 https://news.ycombinator.com/item?id=28435613 466 points on Dec 27, 2019 | 199 comments | https://news.ycombinator.com/item?id=21895671 https://news.ycombinator.com/item?id=21895671 and here some related resources - a list of age ecosystem projects https://github.com/FiloSottile/awesome-age https://github.com/FiloSottile/awesome-age - the format specification https://c2sp.org/age https://c2sp.org/age - the Go library docs https://pkg.go.dev/filippo.io/age https://pkg.go.dev/filippo.io/age - the CLI man page https://filippo.io/age/age.1 https://filippo.io/age/age.1 - the large reusable test suite (which I should write about!) https://c2sp.org/CCTV/age https://c2sp.org/CCTV/age - an interoperable Rust implementation by @str4d https://github.com/str4d/rage https://github.com/str4d/rage - an official TypeScript implementation https://github.com/FiloSottile/typage https://github.com/FiloSottile/typage (based on libsodium.js in the latest version, and on pure-js Noble libraries on main) - a YubiKey plugin by @str4d https://github.com/str4d/age-plugin-yubikey https://github.com/str4d/age-plugin-yubikey - the plugin protocol specification https://c2sp.org/age-plugin https://c2sp.org/age-plugin - a Windows GUI by @spieglt https://github.com/spieglt/winage https://github.com/spieglt/winage - a discussion of the authentication properties of age https://words.filippo.io/dispatches/age-authentication/ https://words.filippo.io/dispatches/age-authentication/ - a discussion of the plugin architecture https://words.filippo.io/dispatches/age-plugins/ https://words.filippo.io/dispatches/age-plugins/ - a discussion of a potential post-quantum plugin https://words.filippo.io/dispatches/post-quantum-age/ https://words.filippo.io/dispatches/post-quantum-age/ - a password-store fork that uses age instead of gpg https://github.com/FiloSottile/passage https://github.com/FiloSottile/passage (see also: how I use it with a YubiKey https://words.filippo.io/dispatches/passage/ https://words.filippo.io/dispatches/passage/)
- 2y ago
- eterps 2y agoAge is a much better experience than PGP/GPG, even though it only has a subset of GPG's features. The option and argument handling is intuitive; it makes sense instantly. It gives a more grounded understanding of what's happening with the encryption process, especially because of the short-form recipient format. Also, setting it up with a Yubikey and Passage (a GNU pass alternative for Age) was a breeze.
- deleted 2y ago[deleted]
- Comma2976 2y ago>$this is a much better experience than $that, even though it only has a subset of $that's features I concur, and: sed 's/even though/because'
- ementally 2y agohttps://www.kryptor.co.uk/ https://www.kryptor.co.uk/ is much more secure than age. From their FAQ [0]: >Kryptor uses strong, fast, and modern cryptographic algorithms, offering post-quantum security. It also addresses security limitations of tools like age and Minisign. >Unlike most tools, Kryptor limits metadata by using an indistinguishable from random encrypted file format. Encrypted files have no identifiable headers and are randomly padded. File names can also be encrypted. And from their Secure section [1]: >Private key encryption for protection at rest, unlike age. [0]: https://www.kryptor.co.uk/faq#why-should-i-use-kryptor-over-the-alternatives https://www.kryptor.co.uk/faq#why-should-i-use-kryptor-over-... [1]: https://www.kryptor.co.uk/#secure https://www.kryptor.co.uk/#secure
- jmprspret 2y agoI'd never heard of this. Looks very very interesting! I'd be keen to know Filippo's (age creator) opinion on this, if he has any.
- aborsy 2y agoIt does not support hardware keys. An Age key can be in a PIV slot of a Yubikey. With a secret manager such as Passage, you will have secure access to secrets.
- FiloSottile 2y agoThanks for sharing, always happy when my projects inspire alternatives addressing different parts of the design space. Here are a few quick comments based on skimming the documentation, let me know if I misinterpreted anything. - signing support This has always been a non-goal for age. It makes the UX significantly more complex, but it's good if different tools have different goals. I can't quite make out from https://www.kryptor.co.uk/specification https://www.kryptor.co.uk/specification if it does proper signcryption, sign-then-encrypt (vulnerable to signature stripping and re-signing), or encrypt-then-sign (vulnerable to decrypt-reencrypt-forward, like OpenPGP). If the latter two, it's a missed opportunity to offer more security than age+minisign can offer and I encourage the author to look into it! - sender authentication I wrote about this. tl;dr age has authentication, but I am not sure what a non-sharp UX around it would be, so I don't advertise it. https://words.filippo.io/dispatches/age-authentication/ https://words.filippo.io/dispatches/age-authentication/ - post-quantum security As https://www.kryptor.co.uk/security-limitations#post-quantum-security https://www.kryptor.co.uk/security-limitations#post-quantum-... acknowledges, "the asymmetric algorithms in Kryptor aren't post-quantum secure". There is support for adding a pre-shared symmetric key, although I did not find the pre-shared key in the usage section, but I would argue that is not asymmetric encryption. In this sense, I would actually argue that Kryptor is just as post-quantum secure as age: age's symmetric encryption (the passphrase mode) is post-quantum (see https://words.filippo.io/dispatches/post-quantum-age/ https://words.filippo.io/dispatches/post-quantum-age/). We don't support adding a pre-shared symmetric key to asymmetric encryption, but if you have a secure channel to establish a pre-shared key, you should just use passphrase mode. age does have a third-party fully post-quantum asymmetric encryption plugin (https://github.com/keisentraut/age-plugin-sntrup761x25519 https://github.com/keisentraut/age-plugin-sntrup761x25519) and I plan to make an ML-KEM one once the standard is out. - key commitment This is a pretty wonky topic. age as a whole is key committing (you can't make a file that decrypts with two age identities as different plaintexts, some academic researchers tried!). Our file key encryption is not (https://github.com/FiloSottile/age/commit/2194f6962c8bb3bca8a55f313d5b9302596b593b https://github.com/FiloSottile/age/commit/2194f6962c8bb3bca8...) which means that if you host an online service that accepts an age file and decrypts it with a passphrase and returns an error if it's incorrect, an attacker can do a bruteforce two passphrases at a time instead of one at a time. Given the online oracle is already unusual as a setting, I am not interested in adding complexity to solve this one. - private key encryption age supports that! https://github.com/FiloSottile/age?tab=readme-ov-file#passphrase-protected-key-files https://github.com/FiloSottile/age?tab=readme-ov-file#passph... It's not the default because most threat models don't need it: if you have FDE, who's an attacker that can read files from your disk but not replace the age binary in $PATH? - indistinguishability from random Not an age goal, actually we very intentionally put "age-encryption.org/v1" in the header so you can run file(1), and specify the type of the recipients to help plugins disambiguate files. The default recipient type doesn't leak any other metadata (i.e. you can't link age files encrypted to the same recipient). - size padding This is a good idea and slated for age v2.
- quectophoton 2y agoThe description claims it's "secure", but nothing pops up in the README when I Ctrl+F `audit`. So maybe take the "secure" claims with a grain of salt.
- klabb3 2y agoMeh. The author of age is very experienced and known specifically for security, crypto and within the implementation language (Go). Audits are only as good as the competence of the auditors and can often turn into checklist rituals. It certainly doesn’t hurt, but audits are not a panacea.
- quectophoton 2y agoAgreed, but IMHO claiming that a crypto library is secure without providing independent verification, is like claiming something is fast without providing benchmarks. (And both are the same in the sense that neither is a panacea.) I'm only bringing up audits because such claim was made, but maybe I should have said "independent verification" instead since it's more general.
- klabb3 2y agoSure, I think we agree in semantics but the wording is difficult. The bar for secure you’re referring to is quite high, a lot of commercial products that brand themselves secure would be much less secure than something like age. These days I think it’s fair to use “secure” in the sense of “made a serious effort to provide certain security properties”. It’s too hard to define, let alone agree, to what secure should mean for everyone.
- tantalor 2y agoSounds like a false analogy. "independent verification" is subjective. Who does the verification, do you trust them, how do you know they didn't screw up. "benchmarks" are objective. A is faster than B, we know because of the way that it is.
- bpicolo 2y ago
- deleted 2y ago[deleted]
- aboardRat4 2y ago[flagged]
- packetlost 2y agognupg is a usability dumpsterfire with tons of footguns everywhere. Very very few people should use gnupg in its current form.
- micklemeal 2y ago[flagged]
- isoprophlex 2y ago[flagged]
- jrflowers 2y agoSo it is pronounced kind of like “egg”, Aygg
- jjice 2y agoIt would be fantastic if Age (or at least something similar) could become standard on Unix machines. I'd love a more Unix-philosophy following tool than GPG/PGP to be around for encryption. That said, I don't think new standard tools for Unix machines are very common. The closest thing I can think of in the last while is `jq`, but it's not "preinstalled on your machine" kind of standard, just "my script might just use it and expect you to have it" kind of standard.
- ReptileMan 2y ago>just "my script might just use it and expect you to have it" That is one path to standardizing something - using it.
- 0cf8612b2e1e 2y agoChicken and egg problem. People use sh/bash because it is everywhere and standard. Requires energy to justify using an objectively superior tool if it is not default installed. I would love if I could count on Just, fish, ripgrep, or any other multitude of tools that improve upon these CLI apis that were invented ad hoc and ossified in the 70s. Paved a lot of cow paths.
- dolmen 2y agoPerl is everywhere, standard (there is a single implementation, with a strong culture of backward compatibility) and an objectively superior tool.
- packetlost 2y agoIsn't POSIX userspace mostly standardized? We should be pretty conservative with what goes into such a standard, but something like age and jq IMO meet that level of utility to justify it.
- jjice 2y agoYeah POSIX standardizes a bunch of tools, mostly the ones you'd expect (cut, cat, file, etc). I agree with the conservative standardization for the most part, but I selfishly would love these more niche tools to be available on a fresh box. Good point though, I just want to be a little lazier in my script writing I guess :) I've always used this site as reference: https://pubs.opengroup.org/onlinepubs/9699919799/ https://pubs.opengroup.org/onlinepubs/9699919799/
- qyckudnefDi5 2y agoI know there are specialized backup tools like restic or borg, but I like to keep things simple. Is using age like this to encrypt my files before uploading them to untrusted cloud storage not ok? tar > age > cloud Some comments mention signing with minisign. Should I be doing that like this: tar > age > minisign > cloud
- tptacek 2y agoUse specialized backup tools! There are cryptographic constructions designed specifically for backup. You will get better backup and better encryption.
- qyckudnefDi5 2y ago"Better backup" aside, as I understand that I'd miss out on deduplication and all the other things backup software can do like keeping track of what it has backed up etc. "Better encryption": Can you explain why age's encryption isn't sufficient if it's recommended for encrypting files? Really want to understand how it's recommended for encrypting and sharing a file over an untrusted channel like email, but not recommended to encrypt a file and upload it to an untrusted server.
- deleted 2y ago[deleted]
- WhyNotHugo 2y agoIf you make a second backup tomorrow, you'll end up with a new (huge) encrypted tar. restic handles deltas when creating a second backup, and writes new files so that tools like rsync or rclone have to do less work to upload the new data. That said, I don't see anything strictly _wrong_ with your approach.
- qyckudnefDi5 2y agoNo deduplication is a tradeoff I'm willing to make for simplicity and less things that can go wrong :)
- glub103011 2y ago[dead]