Commit Graph

17 Commits

Author SHA1 Message Date
Filippo Valsorda
085466567a internal/format: fix a nasty bufio.Reader nesting bug 2020-05-18 02:28:31 -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
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
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
884b6f365d internal/age: support parsing armored files 2019-11-24 22:28:57 -05:00
Filippo Valsorda
4c4e446f72 internal/age,internal/format: implement armored file generation 2019-11-24 21:10:57 -05:00
Filippo Valsorda
c624abc0ad cmd/age: add support for encrypted SSH key files 2019-11-24 19:15:53 -05:00
Filippo Valsorda
11fc3e293a internal/format: wrap body at 56 columns 2019-10-13 17:24:21 -04:00
Filippo Valsorda
0940f184fb cmd/age: add a prototype of the command line tool 2019-10-06 23:16:20 -04:00
Filippo Valsorda
37d95cc84a all: remove AEAD marker
As Thomas convinced me, we can always add it back by bumping the
version, but the fewest knobs and joints we start with, the better.
2019-10-06 21:57:26 -04:00
Filippo Valsorda
e9c118cea0 internal: implement STREAM, key exchange, encryption and decryption
Developed live over 6 hours of streaming on Twitch.

https://twitter.com/FiloSottile/status/1180875486911766528
2019-10-06 21:19:04 -04:00
Filippo Valsorda
52dbe9eecf internal/format: implement outer layer parsing and marshaling 2019-10-05 22:45:51 -04:00