Commit Graph
369 Commits
Author SHA1 Message Date
Filippo Valsorda b70af41215 cmd/age: don't output binary plaintext to terminal
Closes #626
2025-12-26 23:16:25 +01:00
Filippo Valsorda 420273952a internal/stream: fix DecryptReaderAt concurrency 2025-12-26 22:18:54 +01:00
Filippo Valsorda da2191789a age: add ExampleDecryptReaderAt with zip.NewReader 2025-12-26 21:42:24 +01:00
Filippo Valsorda 2ff5d341f6 age: add DecryptReaderAt 2025-12-26 20:30:27 +01:00
Filippo Valsorda abe371e157 all: run "go fix" 2025-12-25 20:48:28 +01:00
Filippo Valsorda ec92694aad age: add EncryptReader pull-based encryption API
Fixes #644
Fixes #654
Updates #638
2025-12-25 20:48:28 +01:00
Filippo ValsordaandNicolas Dumazet 92ac13f51c plugin: add NewTerminalUI
Closes #611
Closes #591

Co-authored-by: Nicolas Dumazet <nicdumz.commits@gmail.com>
2025-12-24 17:17:50 +01:00
GitHub Actions a62324430d doc: regenerate groff and html man pages 2025-12-24 11:36:31 +00:00
Filippo Valsorda 41167479ce doc: include warning in age-plugin-batchpass(1) 2025-12-24 12:35:15 +01:00
GitHub Actions 4444afb267 doc: regenerate groff and html man pages 2025-12-24 11:28:31 +00:00
Filippo Valsorda db8ed63595 cmd/age-plugin-batchpass: add detailed warning 2025-12-24 12:10:43 +01:00
Filippo Valsorda f1cc23a3f6 cmd: move compatibility plugins to extra/ directory 2025-12-24 02:40:29 +01:00
Filippo Valsorda 50a81fd5a9 cmd/age-plugin-batchpass: plugin for non-interactive passphrase encryption
Fixes #603
Closes #641
Closes #520
Updates #256
Updates #182
Updates #257
Updates #275
Updates #346
Updates #386
Updates #445
Updates #590
Updates #572
2025-12-24 02:27:54 +01:00
Filippo Valsorda 44a4fcc27b age,cmd/age: improve error messages for mixed up identities/recipients
Not sure why ParseRecipients was hiding errors, when ParseIdentities
doesn't.

For #643
2025-12-23 23:26:16 +01:00
Filippo Valsorda 2e0f1efe4d age,cmd/age: detect invalid UTF-8 in identity and recipient files
For #663
2025-12-23 23:06:00 +01:00
Filippo Valsorda a7586b7557 README: remove pkgx installation instructions
See https://github.com/FiloSottile/age/pull/659#issuecomment-3688047267.
2025-12-23 22:46:29 +01:00
Filippo Valsorda de7813b5f6 README: add age-inspect documentation 2025-12-23 22:46:13 +01:00
RishikesavanRameshandGitHub 2f5cf5438c README: add Guix System to installation table (#615) 2025-12-23 22:44:19 +01:00
GitHub Actions 830d84e777 doc: regenerate groff and html man pages 2025-12-23 21:31:56 +00:00
Filippo Valsorda b4cdeef465 cmd/age: accept leading whitespace before armored data
It was already accepted by the API, but the CLI did not handle it while
peeking to detect armored input.
2025-12-23 22:23:41 +01:00
Simone RagusaandFilippo Valsorda 6aae5b48ea cmd/age: fix terminal escape sequences on Windows
If possible, we enable virtual terminal processing, which is necessary
for using terminal escape sequences on instances of the Windows Console.
When enabling virtual terminal processing fails, we completely avoid
using escape sequences to prevent weird characters to be printed to the
console.

Fixes #474
Closes #475

Co-authored-by: Filippo Valsorda <hi@filippo.io>
2025-12-23 22:12:19 +01:00
Filippo Valsorda d36e4ce2c7 cmd/age-inspect: new command
Fixes #56
Closes #501
2025-12-23 21:39:39 +01:00
Filippo Valsorda ca8a69b1b6 age: improve error on empty files
Fixes #416
2025-12-23 15:22:55 +01:00
Filippo Valsorda 38dd222823 age: return better errors from Decrypt for scrypt identities 2025-12-23 14:28:05 +01:00
Filippo Valsorda c17d0b362c age: add NoIdentityMatchError.StanzaTypes field
For https://github.com/FiloSottile/age/issues/56#issuecomment-1962622903.
2025-12-23 13:13:03 +01:00
Filippo Valsorda a36341de15 cmd/age: improve error message when -i is missing 2025-12-23 13:11:49 +01:00
Filippo Valsorda f3b008d1b8 plugin: fix returning in-protocol errors from plugins
Fixes Foxboron/age-plugin-tpm#31
2025-12-23 13:11:49 +01:00
Filippo Valsorda 9795b63263 cmd/age,plugin: add plugin.NotFoundError and CLI hint
Fixes #486
2025-12-23 13:11:49 +01:00
Filippo Valsorda bfae75d93d age,plugin: wrap more errors 2025-12-23 12:34:03 +01:00
Filippo Valsorda 0d5b598cd0 cmd/age: warn about duplicate command-line arguments
Fixes #284
2025-12-22 22:08:21 +01:00
GitHub Actions 50acf91174 doc: regenerate groff and html man pages 2025-12-22 18:42:32 +00:00
Filippo ValsordaandFilippo Valsorda ba67de8a4e tag/internal/age-plugin-tagtest: add plugin for testing tag recipients 2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo Valsorda 7fa810b20a tag: add Recipient.Tag and Bytes methods, and update tag scheme 2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo Valsorda 1b18d6b279 age: update c2sp.org/CCTV/age testkit to include hybrid identities 2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo Valsorda ad7bb569eb cmd/age: fix testscript setup races 2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo Valsorda ed44098807 all: upgrade dependencies
Closes #610
2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo Valsorda 83bab2ae6a plugin: avoid using deprecated math/rand.Read 2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo 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 ValsordaandFilippo Valsorda d7409cdc74 .github/workflows: update and harden GitHub Actions workflows 2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo Valsorda de158f906b cmd/age-plugin-tag,cmd/age-plugin-tagpq: new backward compatibility plugins 2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo Valsorda 78947d862d age: use native identities first in Decrypt 2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo Valsorda c6fcb5300c age,cmd/age,cmd/age-keygen: add post-quantum hybrid keys 2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo Valsorda 6ece9e45ee tag: use filippo.io/hpke 2025-12-22 19:41:12 +01:00
Filippo ValsordaandFilippo 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::new::<QsfP384MlKem1024, Shake256, Aes256Gcm>());
 
+    vectors = TestVectors::new();
+
+    // age1pq - xwing
+    vectors.push(TestVector::new::<QsfX25519MlKem768, HkdfSha256, ChaChaPoly>());
+    // age1tag - p256tag
+    vectors.push(TestVector::new::<DhkemP256HkdfSha256, HkdfSha256, ChaChaPoly>());
+    // age1tagpq - p256mlkem768tag
+    vectors.push(TestVector::new::<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 ValsordaandFilippo Valsorda e9295dd867 cmd/age,tag: implement age1tag1.../p256tag recipients
See C2SP/C2SP#156
2025-12-22 19:41:12 +01:00
Filippo ValsordaandGitHub acab3e5c9f plugin: add framework to implement plugins (#580)
Fixes #485
2025-12-07 20:10:01 +01:00
Filippo Valsorda a8de3de174 age: add ExtractHeader, DecryptHeader, and NewInjectedFileKeyIdentity 2025-12-07 20:01:09 +01:00
Filippo Valsorda ae74b61b59 cmd/age,internal/stream: improve error messages 2025-12-07 20:01:09 +01:00
ThibaultandFilippo Valsorda f882f40aa3 cmd/age: echo terminal input for public plugin prompts 2025-12-07 18:59:13 +01:00
Filippo Valsorda 6d2c4e236c README: move Sigsum instructions to separate file 2025-12-07 16:24:46 +01:00