37 Commits

Author SHA1 Message Date
Filippo Valsorda
1b18d6b279 age: update c2sp.org/CCTV/age testkit to include hybrid identities 2025-12-22 19:41:12 +01:00
Filippo Valsorda
ed44098807 all: upgrade dependencies
Closes #610
2025-12-22 19:41:12 +01:00
Filippo Valsorda
96b6476140 armor: reject empty lines in armored data
Caught by the new CCTV test vectors!
2025-12-22 19:41:12 +01:00
Filippo Valsorda
6ece9e45ee tag: use filippo.io/hpke 2025-12-22 19:41:12 +01:00
Filippo Valsorda
e2d30695f2 cmd/age,tag: implement age1tagpq1.../p256mlkem768tag recipients
Test vectors generated from hpkewg/hpke-pq@19adaeb (hpkewg/hpke-pq#28 +
hpkewg/hpke-pq#32) and cfrg/draft-irtf-cfrg-concrete-hybrid-kems@1bbca40
(cfrg/draft-irtf-cfrg-concrete-hybrid-kems#16), plus the following diff:

diff --git a/reference-implementation/src/bin/generate.rs b/reference-implementation/src/bin/generate.rs
index 25e32e5..bc8f209 100644
--- a/reference-implementation/src/bin/generate.rs
+++ b/reference-implementation/src/bin/generate.rs
@@ -26,6 +26,15 @@ fn generate_test_vectors() -> TestVectors {
     // 5. QSF-P384-MLKEM1024 + SHAKE256 + AES-256-GCM
     vectors.push(TestVector:🆕:<QsfP384MlKem1024, Shake256, Aes256Gcm>());
 
+    vectors = TestVectors::new();
+
+    // age1pq - xwing
+    vectors.push(TestVector:🆕:<QsfX25519MlKem768, HkdfSha256, ChaChaPoly>());
+    // age1tag - p256tag
+    vectors.push(TestVector:🆕:<DhkemP256HkdfSha256, HkdfSha256, ChaChaPoly>());
+    // age1tagpq - p256mlkem768tag
+    vectors.push(TestVector:🆕:<QsfP256MlKem768, HkdfSha256, ChaChaPoly>());
+
     vectors
 }
 
diff --git a/reference-implementation/src/test_vectors.rs b/reference-implementation/src/test_vectors.rs
index 24335aa..4134fb5 100644
--- a/reference-implementation/src/test_vectors.rs
+++ b/reference-implementation/src/test_vectors.rs
@@ -369,6 +369,10 @@ impl TestVector {
             (0x0051, 0x0011, 0x0002) => self.v::<QsfP384MlKem1024, Shake256, Aes256Gcm>(),
             (0x0051, 0x0011, 0xffff) => self.v::<QsfP384MlKem1024, Shake256, ExportOnly>(),
 
+            // age pq combinations
+            (0x647a, 0x0001, 0x0003) => self.v::<QsfX25519MlKem768, HkdfSha256, ChaChaPoly>(),
+            (0x0050, 0x0001, 0x0003) => self.v::<QsfP256MlKem768, HkdfSha256, ChaChaPoly>(),
+
             _ => Err(format!(
                 "Unsupported algorithm combination: KEM={:#x}, KDF={:#x}, AEAD={:#x}",
                 self.kem_id, self.kdf_id, self.aead_id
2025-12-22 19:41:12 +01:00
Filippo Valsorda
e9295dd867 cmd/age,tag: implement age1tag1.../p256tag recipients
See C2SP/C2SP#156
2025-12-22 19:41:12 +01:00
Filippo Valsorda
98e7afcbac all: upgrade dependencies 2024-06-16 06:03:13 -04:00
Filippo Valsorda
93055632ad cmd/age: fix FreeBSD tests 2023-08-06 19:39:31 +02:00
Filippo Valsorda
c89f0b932e age,plugin: add RecipientWithLabels 2023-08-05 21:34:47 +02:00
Filippo Valsorda
8e3f74c283 cmd/age: deflake TestScript and update testscript 2023-01-02 13:34:35 +01:00
Berk D. Demir
edf7388f77 age: depend on c2sp.org/CCTV/age for TestVectors
Simplifies importing test data from CCTV without needing to invoke
"go mod download" from TestVectors. Makes life easier for package
builders with no networking, like Nixpkgs.
2022-12-30 18:24:08 -05:00
Filippo Valsorda
5471e05672 Revert "all: temporarily disable testscript tests"
This reverts commit 90a446549a.
2022-12-29 21:53:31 +01:00
Filippo Valsorda
c6dcfa1efc all: temporarily disable testscript tests
They require a replace directive that breaks "go install". Will revert
this after tagging a new latest release.
2022-12-26 15:36:58 -05:00
Filippo Valsorda
a1fabee4c8 all: upgrade dependencies 2022-12-26 15:36:58 -05:00
Filippo Valsorda
084c974f53 all: use better implementation of testscript timeouts 2022-07-28 14:21:43 +02:00
Filippo Valsorda
8a02f4801f cmd/age: improve terminal-related testscripts 2022-07-12 22:26:51 +02:00
Filippo Valsorda
331b242a9c cmd/age: add scrypt testscript 2022-07-03 12:48:48 +02:00
Filippo Valsorda
c50f1ae2e1 cmd/age: replace tests with testscript 2022-06-21 12:41:38 +01:00
Filippo Valsorda
349ed5ed3f cmd/age: clean up the terminal UI 2022-05-24 15:56:22 +02:00
Filippo Valsorda
01b56b117c internal/plugin: complete experimental plugin support 2022-05-24 15:56:22 +02:00
Filippo Valsorda
36b0a4f611 all: update dependencies and module version
This should bring in a faster golang.org/x/crypto/curve25519.
2021-09-05 01:55:46 +02:00
Aaron Bieber
e08055f4e5 all: update x/sys to v0.0.0-20210630005230-0f9fa26af87c (#299)
This allows age to be built on OpenBSD/mips64!
2021-07-14 18:33:55 +02:00
Filippo Valsorda
e63c22e327 Reapply "agessh: use filippo.io/edwards25519 for Ed25519 to Curve25519 conversion"
This reverts commit 629b0dbbc9.
2021-04-22 22:27:35 -04:00
Richard Ulmer
bad2c0d2e0 cmd/age: use golang.org/x/term instead of deprecated package (#205) 2021-04-05 09:22:51 -04:00
Filippo Valsorda
a81357c237 all: update golang.org/x/crypto
Picked the latest version that is packaged in Debian Bullseye.

Fixes #184
2021-03-10 05:38:47 -05:00
Filippo Valsorda
69e2222921 internal/format: drop go-fuzz test case
We were not running it in CI, so it had rotted or was going to rot.
We'll replace it with a native fuzz test once that's ready.
2021-03-10 05:38:47 -05:00
Filippo Valsorda
629b0dbbc9 Revert "agessh: use filippo.io/edwards25519 for Ed25519 to Curve25519 conversion"
The extra dependency makes it harder to package age. Temporarily drop it
to facilitate getting v1.0.0 into distributions.

This reverts commit 53ccaf8b71.
2021-03-10 05:38:47 -05:00
Filippo Valsorda
53ccaf8b71 agessh: use filippo.io/edwards25519 for Ed25519 to Curve25519 conversion 2020-12-04 18:45:52 +01:00
Filippo Valsorda
f0f8092d60 internal/format: update fuzzing target
Fixes #96
2020-03-25 02:23:37 -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
Filippo Valsorda
93ea79628d all: change module name to filippo.io/age
No need to tie ourselves to GitHub.

The redirect is not set up yet, but as long as there is a replace in the
go.mod the tool can't be installed with "go get" anyway.

Not using age-tool.com because A) I don't actually like the domain and
B) it should be about the spec not the specific implementation.
2019-12-07 00:59:41 -05:00
Filippo Valsorda
c624abc0ad cmd/age: add support for encrypted SSH key files 2019-11-24 19:15:53 -05:00
Filippo Valsorda
022002171c internal/age: add ssh-ed25519 recipients 2019-10-07 00:45:59 -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