Commit graph

10 commits

Author SHA1 Message Date
Sudhi Herle
945046a815 v2 of sigtool with some changes:
- aead nonce construction is efficient (replace last 8 bytes of salt
  with encoded block# and chunk-size
- increase aead nonce size to 32 bytes
- refactor errors into a separate file
- update "build" to latest version
- updated README.
2021-05-15 19:35:54 -07:00
Sudhi Herle
e22fae05f7 Better handling of sender verification
* 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
2020-03-23 10:44:40 -07:00
Sudhi Herle
00542dec02 Major breaking changes: Reworked file encryption scheme
* 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
2020-03-20 17:40:52 -07:00
Sudhi Herle
8ed3bff6db Cleaned up chunk header encoding during encrypt/decrypt.
* encrypted chunk header now encodes _only_ plain text length
* the AEAD tag length is implicitly added when reading/writing
* added better sanity checks for short blocks during decrypt
* io.ReadAtLeast() reports ErrUnexpectedEOF for less than a full chunk;
  use this signal correctly
* major version bump to denote header incompatibility
2020-01-29 16:47:14 +05:30
Sudhi Herle
f32525a864 THIS IS A BREAKING CHANGE! Private Keys generated by previous versions won't work with this version.
* 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
2020-01-08 09:17:54 -08:00
Sudhi Herle
f82c1336ac sigtool now supports openssh ed25519 public and private keys.
* Added support to read openssh public keys and encrypted private keys
* reworked private key handling
* made password the default; generating keys without password
  requires explicit "--no-password"
2019-11-05 21:42:25 +01:00
Sudhi Herle
817aa7fd6a Added tests for encrypt/decrypt routines. Updated minor version# 2019-10-22 10:06:49 -07:00
Sudhi Herle
a27044154a Working version with enc/dec of all key types.
* Updated README
* fix non-ephemeral key wrap/unwrap
* fix out of bounds error in decrypt
2019-10-18 15:42:08 -07:00
Sudhi Herle
21445ba1a1 First working version of encrypt/decrypt
* use protobuf for encryption-header
* use fixed size file-header (42 bytes) before the encryption-header
* add encryption/decryption contexts
* teach MakePrivateKey() to fixup its internal public key bits
2019-10-17 14:29:01 -07:00
Sudhi Herle
15477d6197 Moved go-sign from external repo to this repo; updated README; added Makefile 2018-10-18 17:10:29 +09:00