Commit graph

16 commits

Author SHA1 Message Date
Dmitriy Matrenichev
158eba9411
Reset origText in verifySignature before the retry
This is partial fix for #231

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2023-04-13 10:45:56 -04:00
M. Thiercelin
97323a4c2b
Add signature context for embedded signatures 2023-04-06 12:28:12 +02:00
M. Thiercelin
257c381604
Add SIGNATURE_BAD_CONTEXT status to verification error.
Add a special status for verification errors that are
caused by the signature context.
2023-04-06 10:34:04 +02:00
M. Thiercelin
e9fca4d62f
Wrap the cause of signature verification errors.
Instead of swallowing the cause of verification errors,
we use error wrapping to communicate the cause to the caller.
2023-04-05 13:50:55 +02:00
M. Thiercelin
1ec90e34ea
Add API to add contexts to detached signatures.
Using the notation data packets of signatures, we add a way to
set a context to detached signatures.
We also add a way to enforce that signatures have the right context
during verification.
2023-03-13 11:48:31 +01:00
M. Thiercelin
eccc1df619
Add streaming APIs to encrypt with compression 2023-01-24 17:44:07 +01:00
M. Thiercelin
bae54f7e83 Check signature types in unit tests 2022-11-17 17:28:55 +00: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
wussler
53a85837e0
Improve error handling, fix linter (#92)
* Improve error handling, fix linter
2020-10-29 12:42:32 +01:00
wussler
ce607e0fa8
Canonicalize line endings for text messages (#86)
* Canonicalize line endings for text messages

* Improve cleartext messages
2020-10-12 21:24:33 +02:00
wussler
54f45d0471
Openpgp security update (V2) (#31)
* Change keyring unlock functionalities

* Add keyring#Lock, keyring#CheckIntegrity, tests

* Update helpers, fix bugs

* Update go.mod with ProtonMail/crypto commit

* Change key management system

* Clear keys from memory + tests

* Create SessionKey with direct encryption for datapackets. Move symmetrickey to password.

* Fix upstream dependencies

* Update module to V2, documentation

* Add linter

* Add v2 folder to .gitignore

* Minor changes to KeyID getters

* Remove old changelog

* Improve docs, remove compilation script
2019-12-27 19:35:43 +01:00
wussler
9195b9ae92
Fix compilation for gomobile iOS (#17)
* Move signature verification to errors

* Move cleartext messages to ClearTextMessage struct

* Fix documentation
2019-07-02 07:36:02 -07:00
wussler
e65ed17b41
Refactor api (#6)
* Refactor library, remove duplicates

* Rebuild structure to use Messages and Signature models

* Use PGPSplitMessage

* Remove signature model

* Various fixes

* Add helpers with tests

* Fixes, add some docs, add tests

* Add attachment helpers

* Add helpers Symmetric encryption

* Edit docs + examples

* Rename kr to keyRing

* Various fixes for documentation

* Edit JSON handling functions, add decrypt keyring via token

* Add proposal changes doc

* Fix CI

* Drop *Message functions, join CleartextMessage and BinaryMessage

* Change canonicalization and trimming only to text signatures

* Add cleartextsignature, detach signature from message model, move helpers

* Documentation, remove optional parameters

* Move verification to separate model

* Don't return message in VerifyDetached

* Update table of contents in readme

* Appease golint

* Run go fmt

* Rename Encrypt/DecryptMessageWithPassword to ..WithToken

These functions shouldn't be used with user-provided passwords,
as they don't do any key-stretching.

* Change key generation usernames
2019-06-03 17:00:01 +02:00
wussler
b074657c90 Add tests, remove duplicate signing functions (#1) 2019-05-15 13:48:47 +02:00
Daniel Huigens
bb1be4a43b Rename PmCrypto to GopenPGP 2019-05-14 18:12:35 +02:00
Aron Wussler
b42e382224 Add signature tests, fix tests 2019-05-14 16:08:25 +00:00