From 158b2ce899ab3f857cbc0406f5c3160f532371eb Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Thu, 26 Dec 2019 17:59:20 +0100 Subject: [PATCH] all: switch labels and intro to age-encryption.org/v1 --- README.md | 2 +- cmd/age/age.go | 7 ++----- internal/age/age.go | 2 +- internal/age/ssh.go | 4 ++-- internal/age/x25519.go | 2 +- internal/format/format.go | 2 +- 6 files changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a1cccb6..6a5f573 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -age is meant to be a simple, secure and modern encryption tool with small explicit keys, no config options, and UNIX-style composability. The spec is at [age-tool.com/spec](https://age-tool.com/spec). +age is meant to be a simple, secure and modern encryption tool with small explicit keys, no config options, and UNIX-style composability. The spec is at [age-encryption.org/v1](https://age-encryption.org/v1). This implementation is in progress, and things will keep moving around, so it's not yet a good time to contribute, and it's definitely not a good time to rely on it. diff --git a/cmd/age/age.go b/cmd/age/age.go index 26ecf14..6b4404b 100644 --- a/cmd/age/age.go +++ b/cmd/age/age.go @@ -202,9 +202,6 @@ func decrypt(keys []string, in io.Reader, out io.Writer) { func logFatalf(format string, v ...interface{}) { _log.Printf(format, v...) - _log.Printf("\n") - _log.Printf(" *** Did age not do what you expected? ***") - _log.Printf(" *** Could an error be more useful? ***") - _log.Printf(" *** -> https://age-tool.com/report <- ***") - _log.Fatalf("\n") + _log.Fatalf("[ Did age not do what you expected? Could an error be more useful?" + + " Tell us: https://filippo.io/age/report ]") } diff --git a/internal/age/age.go b/internal/age/age.go index eb3813f..5fc4535 100644 --- a/internal/age/age.go +++ b/internal/age/age.go @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -// Package age implements age-tool.com file encryption. +// Package age implements file encryption according to age-encryption.org/v1. package age import ( diff --git a/internal/age/ssh.go b/internal/age/ssh.go index 123e804..d452de7 100644 --- a/internal/age/ssh.go +++ b/internal/age/ssh.go @@ -31,7 +31,7 @@ func SSHFingerprint(pk ssh.PublicKey) string { return format.EncodeToString(hh[:4]) } -const oaepLabel = "age-tool.com ssh-rsa" +const oaepLabel = "age-encryption.org/v1/ssh-rsa" type SSHRSARecipient struct { sshKey ssh.PublicKey @@ -200,7 +200,7 @@ func ed25519PublicKeyToCurve25519(pk ed25519.PublicKey) []byte { return out } -const ed25519Label = "age-tool.com ssh-ed25519" +const ed25519Label = "age-encryption.org/v1/ssh-ed25519" func (r *SSHEd25519Recipient) Wrap(fileKey []byte) (*format.Recipient, error) { ephemeral := make([]byte, curve25519.ScalarSize) diff --git a/internal/age/x25519.go b/internal/age/x25519.go index c3751b3..e7c7cb4 100644 --- a/internal/age/x25519.go +++ b/internal/age/x25519.go @@ -21,7 +21,7 @@ import ( "golang.org/x/crypto/hkdf" ) -const x25519Label = "age-tool.com X25519" +const x25519Label = "age-encryption.org/v1/X25519" type X25519Recipient struct { theirPublicKey []byte diff --git a/internal/format/format.go b/internal/format/format.go index 00d7def..0aa60cd 100644 --- a/internal/format/format.go +++ b/internal/format/format.go @@ -43,7 +43,7 @@ var EncodeToString = b64.EncodeToString const columnsPerLine = 64 const bytesPerLine = columnsPerLine / 4 * 3 -const intro = "This is a file encrypted with age-tool.com, version 1\n" +const intro = "age-encryption.org/v1\n" var recipientPrefix = []byte("->") var footerPrefix = []byte("---")