* Added new SafeFile (io.WriteCloser) class + methods to atomically write a file.
* Teach core lib to use SafeFile for all file I/O
* Teach sigtool to use SafeFile for all file I/O
* Cleaned up the public interfaces of sign/ to be more coherent:
- with uniform APIs for marshaling, unmarshaling, serialization.
- removed KeyPair class/interface and stick to PrivateKey as the primary
interface.
* collected common rand utility functions into rand.go
* Teach sigtool to NOT overwrite existing output files (keys, signatures etc.)
* Teach sigtool to use a new --overwrite option for every command that creates
files (generate, sign, encrypt, decrypt)
* encrypt/decrypt will try to use the input file mode/perm where possible
(unless input is stdin).
* Added more tests
* Sender identity is never shared in the encrypted payload
* Sender signs the data-encryption key via Ed25519 if sender-auth is
desired; else a "signature" of all zeroes is used. In either case, this
signature is encrypted with the same data-encryption key.
* cleaned up stale code and updated tests
* all encryption now uses ephmeral curve25519 keys
* sender can identify themselves by providing a signing key
* sign/verify now uses a string prefix for calculating checksum of the
incoming message + known prefix [prevents us from verifying unknown
blobs]
* encrypt/decrypt key is now expanded with a known prefix _and_ the
header checksum
* protobuf definition changed to include an encrypted sender
identification blob (sender public key)
* moved protobuf files into an internal/pb directory
* general code rearrangement to make it easy to find files
* added extra validation for reading all keys
* bumped version to 1.0.0
* Refactored the private key protection to use standard AEAD
construction.
* Fix sanity check of decrypted block length to stay within verified
bounds
* Cleanup test harness to split into utility file (assert()); cleaned up
names of test functions.
* Fixed scrypt params to not take too long (N=2^19)
* Updated README with these changes
* added encrypt, decrypt commands (empty now)
* use command abbreviation util library
* switched to go1.13 (ed25519 now in stdlib)
* added new code to convert/manage Ed25519 keys to Curve25519
(thanks to FiloSottile/age)