Commit graph

66 commits

Author SHA1 Message Date
wussler
d08315adf7
Update CHANGELOG.md 2021-12-21 10:02:39 +01:00
marin thiercelin
6f86adc432
Add keyRing.GetVerifiedSignatureTimestamp()
Add a function to verify a detached signature and access
its creation time.
2021-12-21 10:02:23 +01:00
Aron Wussler
e603011f68 Release version 2.3.1 2021-12-15 11:41:27 +01:00
marin thiercelin
d76ebb94e1
Update the changelog 2021-12-15 11:10:42 +01:00
Aron Wussler
130472d5a5 Release 2.3.0: Update go-crypto, add Key.IsRevoked and fix key.IsExpired 2021-11-15 15:46:42 +01:00
Aron Wussler
a0bc8b1af8 Release 2.2.5 2021-11-11 16:38:43 +01:00
Carlos Quintana
9f25490f61
Lock global gopenpgp fields 2021-10-18 11:40:58 +02:00
Aron Wussler
190a41c146 Release v2.2.4 2021-09-29 16:48:30 +02:00
marin thiercelin
5558d4a177
Fix: use verifyTime in the config time instead of Now()
When decrypting message, we have to use verifyTime in the config
otherwise signatures not valid at verifyTime but valid at Now()
will be seen as valid.
2021-09-23 17:14:19 +02:00
Aron Wussler
64c051f0d9 Generate keys with compression & release 2.2.3 2021-09-21 11:20:36 +02:00
Aron Wussler
af7164439a Release version 2.2.2 2021-08-04 12:15:11 +02:00
Aron Wussler
e0531b779c Add NewKeyFromEntity 2021-08-04 12:04:20 +02:00
Aron Wussler
26dd18cf42 Add documentation for messages 2021-08-03 20:55:03 +02:00
Aron Wussler
eb311a801f Add changelog 2021-07-30 14:54:38 +02:00
Aron Wussler
b50a051c7e Deprecate Key#Check() 2021-07-30 11:20:38 +02:00
Aron Wussler
44016a15c4 Release version 2.2.1 2021-07-27 12:55:10 +02:00
marin thiercelin
77df8cba3d
Fix signature status when verifying unsigned message
Return `SIGNATURE_NOT_SIGNED` instead of `SIGNATURE_NO_VERIFIER` when
verifying a messages with no embedded signatures.
2021-07-16 12:17:18 +02:00
marin thiercelin
f4ccc63c40
Add a helper to verify stream signatures explicitly
Adds the helper `VerifySignatureExplit()` to get an explicit `SignatureVerificationError`
when verifying a `PlainMessageReader`. This is needed for mobile apps, that
can't cast an error to a signature error.
2021-07-16 12:16:33 +02:00
wussler
cba6683c62
Release v2.2.0 (#135) 2021-06-30 17:07:52 +02:00
marinthiercelin
c46ed8ed9e
Add a streaming api to KeyRing and SessionKey (#131)
* barebone streaming functionality

* encryption needs to return a writecloser

* added eof check

* workaround for reader problem with copies

* separate mobile wrappers from main api

* add a clone in the read result to avoid memory corruption

* refactor to reuse code, and fix verification

* have to give the verify key at the start of the decryption

* enfore readAll before signature verification

* streaming api for SessionKey

* add split message stream apis

* name interface params

* fix streaming api so it's supported by go-mobile

* hide internal writeCloser

* fix nil access

* added detached sigs methods

* started unit testing

* unit testing and fixed a bug where key and data packets where inverted

* remove unecessary error wrapping

* figured out closing order and error handling

* add GC calls to mobile writer and reader

* remove debugging values and arrays

* writer with builtin sha256

* unit testing the mobile helpers

* comments and linting

* Typo in error

Co-authored-by: wussler <aron@wussler.it>

* Add GetKeyPacket doc

Co-authored-by: wussler <aron@wussler.it>

* Add rfc reference in comments

Co-authored-by: wussler <aron@wussler.it>

* small improvements

* add compatibility tests with normal methods

* remove unecessary copies in the tests

* update go-crypto to the merged changes commit

* update comments of core internal functions

* remove unused nolint comment

* group message metadata in a struct

* fix comments

* change default values for metadata

* change the mobile reader wrapper to fit the behavior of java

* remove gc calls in the wrappers to avoid performance penalties

* bring back the former Go2MobileReader to be used for ios

* Update crypto/keyring_streaming.go

Co-authored-by: wussler <aron@wussler.it>

* return an error when verifying an embedded sig with no keyring

* Update crypto/sessionkey_streaming.go

Co-authored-by: wussler <aron@wussler.it>

* linter error

* update changelog

* update changelog

Co-authored-by: wussler <aron@wussler.it>
2021-06-30 16:49:30 +02:00
wussler
039f757e93
Remove monotonic clock (#133) 2021-06-16 14:06:07 +02:00
wussler
0e109ca7ce
Release version 2.1.9 (#132) 2021-05-12 10:08:19 +02:00
Daniel Huigens
9126511a96
Update go-crypto (#129)
* Update go-crypto

* Edit changelog

Co-authored-by: Aron Wussler <aron@wussler.it>
2021-04-28 18:33:14 +02:00
Aron Wussler
38a773b9aa Release version 2.1.8 2021-04-27 17:40:13 +02:00
wussler
c19faed5da
Add methods for embedded signatures using session keys (#128)
* Add methods to sign when using session keys

* Add mobile helpers for explicit decryption

* Add functions to CHANGELOG

* Fix linter
2021-04-27 17:38:25 +02:00
wussler
80b9a7aca2
Release 2.1.7 (#123) 2021-03-30 12:06:50 +02:00
wussler
934571ce56
Fix AES tests for helpers (#122) 2021-03-30 11:46:32 +02:00
marinthiercelin
973856d299
Add new attachment processor that uses pre-allocated buffer (#120) 2021-03-29 20:46:47 +02:00
marinthiercelin
b5823b9dee
Update to go 1.16 for mobile builds (#121)
* modified build script to work with updated fork of go-mobile

* changed spacing and added trace for easier debugging

* fixed issue with user input overwritten

* removed mentions of make

* use go 1.16 in builds

* disabled some linters

* updated change log

Co-authored-by: wussler <aron@wussler.it>
2021-03-29 16:29:34 +02:00
wussler
7b16cf94c8
Release 2.1.6 (#119) 2021-03-17 16:54:47 +01:00
wussler
ff54225384
Fix various keys issues (#117)
* Fix armouring headers for public keys
* Fix error for session key decryption failure
2021-03-09 19:06:35 +01:00
wussler
27efcb4627
WIP: Add tests for attachments (#116)
* Add tests for attachments

* Fix CI

* Use go 1.15 for mobile
2021-03-08 17:59:03 +01:00
wussler
72062c4925
Release version 2.1.5 (#115) 2021-02-19 15:32:39 +01:00
marinthiercelin
cea3d0da4d
Removed the cloning of the final data in the attachment processor (#114)
* removed the cloning of the final data in the attachment processor

* fix linter
2021-02-19 14:54:31 +01:00
wussler
681ceb0546
Release v2.1.4 (#110)
* Release v2.1.4

* Loosen linter
2021-01-08 18:37:56 +01:00
marinthiercelin
e0deea82a3
add signcryption methods to the keyrings (#109)
* add signcryption methods to the keyrings

* added signing and verifying keyrings

* added nil checks

* added unit test for signcrypt

* updated changelog

* switched the keyrings in the api

* update the error messages

* changed the names of the keyRing variable
2020-12-17 12:58:25 +01:00
wussler
a42d48a203
Release 2.1.3 (#108) 2020-12-09 15:57:44 +01:00
Daniel Huigens
71d595a366 Update changelog 2020-12-08 19:18:53 +01:00
wussler
6105a3bcc0
Improve attachment memory allocation (#105)
* Improve attachment memory allocation

* added explicit garbage collection

* redundant GC

* added GCs in attachment processor and a FreeOSMemory helper

* added changelog

* linting

* Remove commented call to debug.FreeOSMemory

Co-authored-by: marin thiercelin <marin.thiercelin@pm.me>
Co-authored-by: marinthiercelin <marin.thiercelin@epfl.ch>
2020-12-08 17:52:50 +01:00
wussler
75f27fd1df
Add key generation offset (#104)
* Add key generation offset

* Bump version to 2.1.2
2020-12-01 19:44:49 +01:00
wussler
385e6d21d2
Drop regex for canonicalization (#102)
* Drop regex for canonicalization

* Fix CI
2020-12-01 18:09:25 +01:00
wussler
5b1a42c2cd
Release v2.1.1 (#100) 2020-11-16 09:51:51 +01:00
wussler
4166d25a63
Allow multiple keypackets in session key decryption (#99)
* Fix session key decryption

* Break on all data packets

Co-authored-by: Daniel Huigens <d.huigens@protonmail.com>
2020-11-13 14:13:11 +01:00
wussler
8a9f9f8fa9
Release version 2.1.0 (#96) 2020-11-04 17:49:30 +01:00
wussler
371d429001
WIP: Add compression to API (#91)
* Add compression to API

* Add docs

* Use defaults for a simpler interface

* Update x/crypto

* Fix ecdsa key types for lib update
2020-11-04 17:40:45 +01:00
marinthiercelin
9503b68f0c
Update the changelog with new helpers description (#93)
Co-authored-by: marin thiercelin <marin.thiercelin@pm.me>
2020-10-29 17:00:34 +01:00
wussler
53a85837e0
Improve error handling, fix linter (#92)
* Improve error handling, fix linter
2020-10-29 12:42:32 +01:00
wussler
ac353fcbef
Make Time and Filename public (#87) 2020-10-13 13:14:09 +02:00
wussler
a4d89bce32
Add filename and time properties to message (#85)
* Add filename and time properties to message

* Message time defaults to current time
2020-10-12 18:45:57 +02:00
wussler
64b3b45404
Fix mixed symmetric/asymmetric decryption (#77) 2020-09-01 11:07:30 +02:00