Commit Graph

232 Commits

Author SHA1 Message Date
Filippo Valsorda
189041b668 age: move package from filippo.io/age/age to filippo.io/age 🤦‍♂️ v1.0.0-beta4 2020-06-27 22:06:32 -04:00
Filippo Valsorda
e609359651 age,agessh,armor: unleash public API 💥🦑 v1.0.0-beta3 2020-06-27 21:08:42 -04:00
Filippo Valsorda
33355dcc1c internal/age: unexport NewX25519Recipient and NewX25519Identity 2020-06-27 21:03:35 -04:00
Filippo Valsorda
9a08b7e66f internal/age,internal/armor: add examples 2020-06-27 21:03:09 -04:00
Filippo Valsorda
9b83d948f5 internal/age: surface format.Recipient as type Stanza 2020-06-27 19:44:26 -04:00
Filippo Valsorda
c9a35c0727 internal/agessh: move EncryptedSSHIdentity out of cmd/age 2020-05-19 02:07:27 -04:00
Filippo Valsorda
7d608d1219 .github/workflows: add rage interop tests trigger (#125) 2020-05-18 20:44:50 -04:00
Filippo Valsorda
6782356e45 internal/age: add some docs and polish API 2020-05-18 02:53:37 -04:00
Filippo Valsorda
085466567a internal/format: fix a nasty bufio.Reader nesting bug 2020-05-18 02:28:31 -04:00
Filippo Valsorda
292c3aaeea internal/agessh: new package
Move the SSH recipient types out of the main package to declutter the
godoc. This also allows us to drop the x/crypto/ssh build dependency
entirely from the age package import tree.
2020-05-18 01:20:08 -04:00
Filippo Valsorda
b32ea4c1f6 cmd/age: add a TODO about not dumping decrypted binary to the terminal 2020-05-18 00:21:41 -04:00
Filippo Valsorda
c7c7f1870f internal/armor: new package 2020-05-18 00:12:36 -04:00
Filippo Valsorda
a7c4274d23 internal/age: remove EncryptWithArmor and armor support in Decrypt
The caller can take care of the armor. For consistency move the
responsibility to close the armor to the caller, and make the stream
Writer not propagate Close.

This also will also allow us to spin the armor implementation out into
its won package that imports format, without getting an import loop from
format.Parse magically invoking armor decoding.

Less magic in the API, more magic in the CLI.
2020-05-18 00:11:21 -04:00
Filippo Valsorda
7088a73234 internal/age: unexport SSHFingerprint 2020-05-18 00:05:25 -04:00
Filippo Valsorda
f0f8092d60 internal/format: update fuzzing target
Fixes #96
2020-03-25 02:23:37 -04:00
Filippo Valsorda
f28f85d87b internal/format: require recipients and arguments not to be empty
Also updated the spec to clarify that arbitrary strings can't be empty.
2020-03-25 02:22:58 -04:00
Filippo Valsorda
f54bb8daab internal/format: don't generate and reject empty lines in recipient bodies
Detected by https://github.com/str4d/rage/runs/532262359 and by go-fuzz.
2020-03-25 02:22:58 -04:00
Ross Kinsey
35e582514d go.mod: update x/crypto for aes256-cbc support (#111, golang/go#37939) 2020-03-24 01:57:18 -04:00
Filippo Valsorda
111d0fe1f4 go.mod: update x/crypto to bring in fix for golang/go#36609
Updates #78
2020-02-20 11:13:44 -05:00
Filippo Valsorda
9fdb125641 go.mod: switch to upstream golang.org/x/crypto
Fixes #99
2020-02-04 14:14:08 -05:00
Mike Sampson
a798d4ef31 README: add Arch Linux AUR instructions (#76)
Co-authored-by: Filippo Valsorda <1225294+FiloSottile@users.noreply.github.com>
2020-01-10 16:27:00 -05:00
Li-Wen Hsu
68da6c5f50 README: add FreeBSD installation instruction (#79)
Co-authored-by: Filippo Valsorda <1225294+FiloSottile@users.noreply.github.com>
2020-01-10 16:21:19 -05:00
Anand Sharma
2419b5da58 README: fix a typo in the SSH Keys section (#85)
Co-authored-by: Filippo Valsorda <1225294+FiloSottile@users.noreply.github.com>
2020-01-10 16:19:42 -05:00
Filippo Valsorda
4e84199130 .github: update spec-feedback.md 2020-01-08 14:24:02 -05:00
Filippo Valsorda
f9f6d7ca50 .github: add specification feedback issue template 2020-01-08 14:22:08 -05:00
Filippo Valsorda
e43cf8b4a2 cmd/age: improve incorrect passphrase error message
Fixes #41
2019-12-31 14:20:39 +01:00
Filippo Valsorda
7935150f35 internal/age: improve empty passphrase error message
Fixes #62
2019-12-31 14:20:39 +01:00
Ed Maste
1110c3b6e1 .cirrus.yml: enable Cirrus CI for FreeBSD CI (#58) 2019-12-31 00:23:34 +01:00
Joe Shaw
1223fbe6da HomebrewFormula: update to beta2 (#60) 2019-12-31 00:14:01 +01:00
Filippo Valsorda
b194267aaa README: add more usage examples 2019-12-30 02:24:38 +01:00
Filippo Valsorda
3807646596 internal/age: don't log binary data in tests
Fixes #32
2019-12-30 01:43:42 +01:00
Filippo Valsorda
dd887fdc87 cmd/age: confirm encryption passphrase
Fixes #39
2019-12-30 00:41:53 +01:00
Filippo Valsorda
0da94651f3 HomebrewFormula: drop GOPATH and set -trimpath 2019-12-30 00:26:55 +01:00
Filippo Valsorda
80c6b4edd9 cmd/age: offer to autogenerate a secure passphrase
As suggested by @tqbf: https://twitter.com/tqbf/status/1210715916381511680
2019-12-30 00:23:22 +01:00
Christian Stefanescu
b3fc5d19ea README: mention Linux for Homebrew installation (#45)
Since Homebrew now works on linux (https://docs.brew.sh/Homebrew-on-Linux), you can use the same installation steps for Linux as you would for macOS. I tested this on Ubuntu 19.10.
2019-12-29 14:47:01 +01:00
Filippo Valsorda
c02443e4d0 README: fix build from source instructions 2019-12-28 03:43:26 +01:00
Chris Palmer
a5773f28a3 README: update the installation and build instructions (#31)
Co-authored-by: Filippo Valsorda <1225294+FiloSottile@users.noreply.github.com>
2019-12-28 02:44:44 +01:00
Filippo Valsorda
63301d18b4 internal/age: add a comment about the fixed AEAD nonce 2019-12-28 02:43:51 +01:00
Chris Palmer
d6fe1cf5c8 cmd/age: provide a --output option (#28)
For consistency across all options.
2019-12-28 02:33:26 +01:00
Barend
18edf29a75 README: fix typo (#26) 2019-12-28 00:28:49 +01:00
Filippo Valsorda
1bf22e2163 cmd/age-keygen: print the public key to standard error v1.0.0-beta2 2019-12-27 23:49:09 +01:00
Filippo Valsorda
3d73da544d cmd/age: add -help and README 2019-12-27 23:48:29 +01:00
Filippo Valsorda
c185781433 HomebrewFormula: add Homebrew formula 2019-12-27 18:37:48 +01:00
Filippo Valsorda
bbab440e19 internal/age: add a label to the scrypt salt
This way every recipient is labeled with the version.

-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNjcnlwdCBSbmw2ellyQ1VFK25rVkwx
TkF0SklnIDE4CjlZL2RKb2FOcjFrM0MwSVZqS1BzMUFLeVF5Y1RaMEwvQlRLMWwv
Q0xJbEEKLS0tIEJ1STZCbFh5Vjdsam5nSEFGTVZUY1BxcVVIek04ZUVrOGR4L3ph
NkYzS28KucY25ejFefMDMtKvsAEofDQLsYF41NPrSPITpoxuVWMMZ1ldm+lDh09q
RzCIZAhLN8jaqdeVdCEutqiniJ/9qv4=
-----END AGE ENCRYPTED FILE-----

Password: lies
v1.0.0-beta1
2019-12-27 17:13:20 +01:00
Filippo Valsorda
158b2ce899 all: switch labels and intro to age-encryption.org/v1 2019-12-27 17:13:20 +01:00
Filippo Valsorda
c434eee6e8 internal/format: switch armor to PEM
It's with a heavy heart that I admit using the ASCII header as part of
the armor was clever, and you know what we think about being clever
around here.

Still, PEM is so lax, we target a subset without headers, and without
garbage before and after the markers.

-----BEGIN AGE ENCRYPTED FILE-----
VGhpcyBpcyBhIGZpbGUgZW5jcnlwdGVkIHdpdGggYWdlLXRvb2wuY29tLCB2ZXJz
aW9uIDEKLT4gWDI1NTE5IGozWWtNTWtaVGNDc0tKVGtMN29aam9NT2FUaGpBTVdU
Y1k5ZHVNdWJhUlkKb0F5d2N4ZW1lSTM1SkZiWHIxcHRFWW0rMjNzK3RuOTg1OHpN
L0ZkVzNCTQotLS0gQWZqdXFFaXNhbmYxbGpPRVZsSS9QM0wyM0RrTHRWWElsQnFu
ejFmRW4zdwq1FMc+yjVJBDuBUZSPMi0nCAtELIObQOHHQlQnvhk6BCITceOD5DbN
S7b6oumB8i/hEJvTtsOLgTBofzqzB90iAQ==
-----END AGE ENCRYPTED FILE-----

AGE-SECRET-KEY-1Y77J4M9R7GEKMZHR6YFDLDWV74VK2YQV4C7SR2H7SSVVJ05HQS4Q7NNMS3
2019-12-27 17:13:20 +01:00
Filippo Valsorda
b142e0fd01 internal/format: switch to 64 columns of standard Base64
Now that we don't use Base64 in keys, let's just go back to the standard
alphabet. Still in the spirit of reducing weirdness, use the PEM column
count, so we can also reuse the lineWriter for the PEM armor.

See https://groups.google.com/d/msg/age-dev/UAjkvLoCr9I/l4Q1h3OPAgAJ.
2019-12-27 17:13:20 +01:00
Filippo Valsorda
9a84e437b1 all: switch key format to Bech32
Use the BIP173 format, which is whole-word selectable, markup safe, and
case insensitive.

AGE-SECRET-KEY-1FPSHVEFQXYSX5MMFDE6ZCGRTV4JHQGRFWSS8WETVDSSX76TVV4JQU272CR

See https://groups.google.com/d/msg/age-dev/UAjkvLoCr9I/l4Q1h3OPAgAJ.

All bech32 Go packages have funky APIs, internal types, or case
handling, so include a heavily refactored version of the reference
implementation, and the tests from github.com/btcsuite/btcutil/bech32.
2019-12-27 17:13:20 +01:00
Filippo Valsorda
8c600131ec cmd/age: print age-tool.com/report link on errors 2019-12-07 01:19:02 -05:00
Filippo Valsorda
0369d9b7fb cmd/age-keygen: detect world-readable output file 2019-12-07 00:59:41 -05:00