]> git.codecow.com Git - Monocypher.git/log
Monocypher.git
8 years agoBetter wording for Poly1305 security considerations
Loup Vaillant [Wed, 7 Feb 2018 22:55:51 +0000 (23:55 +0100)]
Better wording for Poly1305 security considerations

Fixes #84.  I hope.

Some users *will* use Poly1305 for who knows what nefarious purpose I
haven't anticipated.  This is why we expose low-level primitives in the
first place.

This may sound bikeshed-y, but Poly1305 is quite exacting.  Not as bad
as AES-GCM from what I've heard, but close.  So the manual must be
precise and unambiguous.

8 years agoMore accurate speed benchmark
Loup Vaillant [Sat, 3 Feb 2018 22:22:25 +0000 (23:22 +0100)]
More accurate speed benchmark

Used smaller buffers to minimise the impact of cache misses in the
benchmark.  Chosen a size that makes Libsodium and Monocypher look best.
(There is a trade-off between start up time and throughput.)

This should highlight the algorithmic differences better.  Still, the
memory access patterns are very clean, computation tends to dominate.
Ultimately, this makes little difference.

8 years agoComment nitpick about test vectors.
Loup Vaillant [Wed, 31 Jan 2018 17:40:59 +0000 (18:40 +0100)]
Comment nitpick about test vectors.

We no longer need SHA-512 for the Ed25519 test vectors, since we now
generate EdDSA/Blake2b test vectors with the Donna implementation.

8 years agoHTTP freaking S links
Loup Vaillant [Tue, 30 Jan 2018 21:27:25 +0000 (22:27 +0100)]
HTTP freaking S links

8 years agoIncrease documentation accessibility from the GitHub repository
Loup Vaillant [Tue, 30 Jan 2018 20:42:49 +0000 (21:42 +0100)]
Increase documentation accessibility from the GitHub repository

Fixes #83

Help the poor user by linking the hell out of https://monocypher.org/.
Users are supposed to use the official releases, not the repository.

Generated files in the repository are ugly.  They would displease the
Dictator.  So, nope.

8 years agoAdded official Poly1305 test vector
Loup Vaillant [Mon, 29 Jan 2018 18:23:49 +0000 (19:23 +0100)]
Added official Poly1305 test vector

From rfc7539, section 2.5.  I orginally only sourced from appendix A.3,
but there's no reason why we shouldn't also include this.

Section A.5 however would take some manual tweaking.  Let's not.

8 years agoFixed small undefined behaviour in tests
Loup Vaillant [Sun, 28 Jan 2018 23:36:24 +0000 (00:36 +0100)]
Fixed small undefined behaviour in tests

Apparently we cannot memcmp() null pointers, even when the size is zero.

8 years agoFixed erroneous crypto_wipe() calls
Loup Vaillant [Sun, 28 Jan 2018 23:31:00 +0000 (00:31 +0100)]
Fixed erroneous crypto_wipe() calls

And used convenience macros in the process, depending on whether we wipe
a buffer or a structure (generally a context).  The redundancy led to
some errors, which should be fixed by now.

8 years agoFixed buffer overflow (wipe too big)
Loup Vaillant [Sun, 28 Jan 2018 22:51:43 +0000 (23:51 +0100)]
Fixed buffer overflow (wipe too big)

8 years agoSpeed benchmark Mb/s -> megabytes per second
Loup Vaillant [Sun, 28 Jan 2018 16:07:39 +0000 (17:07 +0100)]
Speed benchmark Mb/s -> megabytes per second

8 years agoApplied @CuleX's and @mikesavage's advice
Loup Vaillant [Sun, 28 Jan 2018 12:21:45 +0000 (13:21 +0100)]
Applied @CuleX's and @mikesavage's advice

Also reordered some blocks in Argon2i. (Putting the additional arguments
at the very end was my intention all along, but I somehow failed to do
it).

8 years agoREADME.md bikeshedding
Loup Vaillant [Sat, 27 Jan 2018 23:18:51 +0000 (00:18 +0100)]
README.md bikeshedding

8 years agoRemoved known sources from README.md
Loup Vaillant [Sat, 27 Jan 2018 23:08:18 +0000 (00:08 +0100)]
Removed known sources from README.md

Those are listed in http://monocypher.org

8 years agoDescribed key and ad arguments in a separate list
Loup Vaillant [Sat, 27 Jan 2018 22:50:15 +0000 (23:50 +0100)]
Described key and ad arguments in a separate list

Suggested by @mikejsavage
Related to #58

8 years agoChanged official site
Loup Vaillant [Sat, 27 Jan 2018 18:57:02 +0000 (19:57 +0100)]
Changed official site

Related to #82

8 years agoDocumented aliases
Loup Vaillant [Sat, 27 Jan 2018 18:54:44 +0000 (19:54 +0100)]
Documented aliases

Related to #80

8 years agotypo
Loup Vaillant [Fri, 26 Jan 2018 17:39:47 +0000 (18:39 +0100)]
typo

8 years agoslightly bigger font for the manual
Loup Vaillant [Fri, 26 Jan 2018 14:08:52 +0000 (15:08 +0100)]
slightly bigger font for the manual

8 years agoSHA-512: hoisted w[] out of the round function
Loup Vaillant [Mon, 22 Jan 2018 21:38:05 +0000 (22:38 +0100)]
SHA-512: hoisted w[] out of the round function

This avoids wiping w[] for each block, and reclaims the speed
we lost in the previous commit.  It's also simpler.

8 years agoWipes SHA-512 internal buffers.
Loup Vaillant [Sun, 14 Jan 2018 17:35:20 +0000 (18:35 +0100)]
Wipes SHA-512 internal buffers.

We lose some performance this way, and this may be overkill. Still, I'd
rather take the performance hit than risk a vulnerability.

8 years agoadded sha512 speed benchmark
Loup Vaillant [Sun, 14 Jan 2018 17:34:30 +0000 (18:34 +0100)]
added sha512 speed benchmark

8 years agoMore concise Chacha20
Loup Vaillant [Sun, 14 Jan 2018 12:42:38 +0000 (13:42 +0100)]
More concise Chacha20

Partially reverts the optimisation from d1be682.  Hoisting the test out
of the loop entirely was overkill.  One level is sufficient, pushing it
any further has negligible impact.

8 years agoMore stringent tests for chacha20_stream
Loup Vaillant [Sun, 14 Jan 2018 12:42:22 +0000 (13:42 +0100)]
More stringent tests for chacha20_stream

8 years agoArgon2i: hoisted temporaries out of loops
Loup Vaillant [Thu, 11 Jan 2018 17:43:18 +0000 (18:43 +0100)]
Argon2i: hoisted temporaries out of loops

8 years agoOptimised chacha20 loading & unloading
Loup Vaillant [Thu, 11 Jan 2018 17:35:07 +0000 (18:35 +0100)]
Optimised chacha20 loading & unloading

Testing inside the loop caused a noticeable slow down.  Now the whole
thing looks kinda like a copy-pasta job, but the alternative was a less
readable data flow anyway.

8 years agoAdds high-level aliases to some low-level primitives
Loup Vaillant [Thu, 11 Jan 2018 16:55:37 +0000 (17:55 +0100)]
Adds high-level aliases to some low-level primitives

Some low-level primitives are actually suitable as high-level functions.
However, using them as such makes naming inconsistent and confusing.
Proper aliases have been added to make user code more consistent.

Macros (#define) have been used instead of function pointers to avoid
various compilation problems.

8 years agoWipe ALL temporary buffers
Loup Vaillant [Thu, 11 Jan 2018 16:23:20 +0000 (17:23 +0100)]
Wipe ALL temporary buffers

Fixed #15

I missed many buffers for some reason.  The fix affects performance in
some cases (especially Argon2i).  We should be able to recover most of
it.

8 years agoMade the header more suitable as a quick reference
Loup Vaillant [Sun, 7 Jan 2018 18:53:49 +0000 (19:53 +0100)]
Made the header more suitable as a quick reference

Some people won't read the manual.  Others will read it, then forget it.
Almost no one remembers the API perfectly â€”not even I.

8 years agoremoved useless check
Loup Vaillant [Sat, 6 Jan 2018 12:46:05 +0000 (13:46 +0100)]
removed useless check

If the public key is not in the curve, the verification will simply
fail.  There is little point verifying the validity of a signing public
key, since you have to trust its origin in the first place.

8 years agolow-level primitives warnings in the header
Loup Vaillant [Sat, 6 Jan 2018 12:39:56 +0000 (13:39 +0100)]
low-level primitives warnings in the header

Fixes #78

8 years agoMerge pull request #76 from mikejsavage/moremanualtweaks
Loup Vaillant [Fri, 5 Jan 2018 10:50:25 +0000 (11:50 +0100)]
Merge pull request #76 from mikejsavage/moremanualtweaks

More manual tweaks

8 years agoMore .Fa, more "Length of"
Michael Savage [Thu, 4 Jan 2018 20:27:15 +0000 (22:27 +0200)]
More .Fa, more "Length of"

8 years agoUse "Length of .Fa x , in bytes."
Michael Savage [Wed, 3 Jan 2018 20:55:06 +0000 (22:55 +0200)]
Use "Length of .Fa x , in bytes."

8 years agoturned test utils into header only
Loup Vaillant [Tue, 2 Jan 2018 23:10:04 +0000 (00:10 +0100)]
turned test utils into header only

Simplifies the makefiles a bit

8 years agoFactored speed tests
Loup Vaillant [Tue, 2 Jan 2018 22:59:05 +0000 (23:59 +0100)]
Factored speed tests

8 years agospeed-sodium uses utils
Loup Vaillant [Tue, 2 Jan 2018 22:47:10 +0000 (23:47 +0100)]
speed-sodium uses utils

8 years agoremoved monocypher dependency from utils.h
Loup Vaillant [Tue, 2 Jan 2018 22:43:42 +0000 (23:43 +0100)]
removed monocypher dependency from utils.h

8 years agoCredit where credit's due (take 2)
Loup Vaillant [Tue, 2 Jan 2018 18:06:38 +0000 (19:06 +0100)]
Credit where credit's due (take 2)

8 years agoCredit where credit's due
Loup Vaillant [Tue, 2 Jan 2018 18:03:20 +0000 (19:03 +0100)]
Credit where credit's due

8 years agoWrong path in the readme
Loup Vaillant [Sat, 30 Dec 2017 19:33:49 +0000 (20:33 +0100)]
Wrong path in the readme

8 years agoSpeed benchmark for libsodium
Loup Vaillant [Sat, 30 Dec 2017 19:24:25 +0000 (20:24 +0100)]
Speed benchmark for libsodium

8 years agoMerge pull request #77 from CuleX/master+prototypes
Loup Vaillant [Mon, 1 Jan 2018 20:00:22 +0000 (21:00 +0100)]
Merge pull request #77 from CuleX/master+prototypes

Fix wrong or missing const in man pages

8 years agoUse Fo/Fa/Fc in synopsis blocks
Michael Savage [Mon, 1 Jan 2018 14:27:19 +0000 (14:27 +0000)]
Use Fo/Fa/Fc in synopsis blocks

8 years agoFix wrong or missing const in man pages
CuleX [Mon, 1 Jan 2018 14:09:49 +0000 (15:09 +0100)]
Fix wrong or missing const in man pages

8 years agoAvoid :
Michael Savage [Mon, 1 Jan 2018 13:44:06 +0000 (13:44 +0000)]
Avoid :

8 years agoMore manual tweaks
Michael Savage [Mon, 1 Jan 2018 13:37:15 +0000 (13:37 +0000)]
More manual tweaks

8 years agoMerge pull request #75 from mikejsavage/miscmanualtweaks
Loup Vaillant [Sat, 30 Dec 2017 11:13:32 +0000 (12:13 +0100)]
Merge pull request #75 from mikejsavage/miscmanualtweaks

Misc manual tweaks

8 years agoApply Loup's feedback
Michael Savage [Sat, 30 Dec 2017 11:04:16 +0000 (11:04 +0000)]
Apply Loup's feedback

8 years agoMisc manual tweaks
Michael Savage [Fri, 29 Dec 2017 23:56:40 +0000 (23:56 +0000)]
Misc manual tweaks

8 years agoManual: reset dates (#58)
Loup Vaillant [Thu, 28 Dec 2017 15:42:36 +0000 (16:42 +0100)]
Manual: reset dates (#58)

8 years agoManual: examples (#58)
Loup Vaillant [Thu, 28 Dec 2017 15:31:34 +0000 (16:31 +0100)]
Manual: examples (#58)

8 years agoManual: Applying CuleX's advice
Loup Vaillant [Sun, 24 Dec 2017 09:43:14 +0000 (10:43 +0100)]
Manual: Applying CuleX's advice

8 years agoManual: xx byte => xx-byte
Loup Vaillant [Sun, 24 Dec 2017 09:20:51 +0000 (10:20 +0100)]
Manual: xx byte => xx-byte

8 years agoManual: add missing args blocks
Loup Vaillant [Sat, 23 Dec 2017 11:38:01 +0000 (12:38 +0100)]
Manual: add missing args blocks

8 years agoManual: warning about incremental signature verification
Loup Vaillant [Thu, 21 Dec 2017 17:16:46 +0000 (18:16 +0100)]
Manual: warning about incremental signature verification

Just so users don't mistakenly trust messages before the verification is
finished.

Related to #58

8 years agoFixed #74 (crypto_verify bug)
Loup Vaillant [Fri, 15 Dec 2017 18:45:21 +0000 (19:45 +0100)]
Fixed #74 (crypto_verify bug)

8 years agoAdded tests for comparison functions
Loup Vaillant [Fri, 15 Dec 2017 18:35:33 +0000 (19:35 +0100)]
Added tests for comparison functions

They are crafted to catch many possible errors, such as using an
operator instead of another.

And catch an error it did...

8 years agoManual: applying CuleX's corrections
Loup Vaillant [Fri, 15 Dec 2017 09:56:05 +0000 (10:56 +0100)]
Manual: applying CuleX's corrections

8 years agoAdded a warning about incremental authentication
Loup Vaillant [Sun, 10 Dec 2017 21:19:24 +0000 (22:19 +0100)]
Added a warning about incremental authentication

8 years agoMentinned the Double Ratchet Algorithm
Loup Vaillant [Sun, 10 Dec 2017 20:00:45 +0000 (21:00 +0100)]
Mentinned the Double Ratchet Algorithm

This is better than the half assed explanation about authenticating keys
with `crypto_lock`

8 years agoMerge pull request #73 from mikejsavage/poly1305feedback
Loup Vaillant [Sun, 10 Dec 2017 19:45:18 +0000 (20:45 +0100)]
Merge pull request #73 from mikejsavage/poly1305feedback

Poly1305 manual tweaks based on Loup's comments

8 years agoPoly1305 manual tweaks based on Loup's comments
Michael Savage [Fri, 8 Dec 2017 23:53:38 +0000 (01:53 +0200)]
Poly1305 manual tweaks based on Loup's comments

8 years agoMerge pull request #72 from mikejsavage/keyexchangereview
Loup Vaillant [Fri, 8 Dec 2017 23:30:49 +0000 (00:30 +0100)]
Merge pull request #72 from mikejsavage/keyexchangereview

Key exchange manual tweaks

8 years agoMerge pull request #70 from mikejsavage/lockincreview
Loup Vaillant [Fri, 8 Dec 2017 23:18:46 +0000 (00:18 +0100)]
Merge pull request #70 from mikejsavage/lockincreview

Incremental crypto_lock manual tweaks

8 years agoMerge pull request #71 from mikejsavage/poly1305review
Loup Vaillant [Fri, 8 Dec 2017 23:18:25 +0000 (00:18 +0100)]
Merge pull request #71 from mikejsavage/poly1305review

Poly1305 manual tweaks

8 years agoKey exchange manual tweaks
Michael Savage [Thu, 7 Dec 2017 19:41:02 +0000 (21:41 +0200)]
Key exchange manual tweaks

8 years agoRe-add the paragraph about corruption being 3x slower to detect
Michael Savage [Thu, 7 Dec 2017 18:05:06 +0000 (20:05 +0200)]
Re-add the paragraph about corruption being 3x slower to detect

8 years agoMore tweaking
Michael Savage [Thu, 7 Dec 2017 17:49:43 +0000 (19:49 +0200)]
More tweaking

8 years agoPoly1305 keys are 32 _bytes_!
Michael Savage [Wed, 6 Dec 2017 23:42:14 +0000 (01:42 +0200)]
Poly1305 keys are 32 _bytes_!

8 years agoPoly1305 manual tweaks
Michael Savage [Wed, 6 Dec 2017 23:36:00 +0000 (01:36 +0200)]
Poly1305 manual tweaks

8 years ago"can happen because of" -> "can be caused by"
Michael Savage [Wed, 6 Dec 2017 23:09:56 +0000 (01:09 +0200)]
"can happen because of" -> "can be caused by"

8 years agoIncremental crypto_lock manual tweaks
Michael Savage [Wed, 6 Dec 2017 23:06:12 +0000 (01:06 +0200)]
Incremental crypto_lock manual tweaks

8 years agoMerge pull request #69 from mikejsavage/verifyreview
Loup Vaillant [Wed, 29 Nov 2017 21:54:49 +0000 (22:54 +0100)]
Merge pull request #69 from mikejsavage/verifyreview

crypto_verify manual tweaks

8 years agoMerge pull request #68 from mikejsavage/cryptosignreview
Loup Vaillant [Wed, 29 Nov 2017 21:51:51 +0000 (22:51 +0100)]
Merge pull request #68 from mikejsavage/cryptosignreview

crypto_sign manual tweaks

8 years agoMerge pull request #67 from mikejsavage/cryptosignincrementalreview
Loup Vaillant [Wed, 29 Nov 2017 21:51:25 +0000 (22:51 +0100)]
Merge pull request #67 from mikejsavage/cryptosignincrementalreview

Incremental crypto_sign manual tweaks

8 years agoMerge pull request #66 from mikejsavage/chacha20review
Loup Vaillant [Wed, 29 Nov 2017 21:50:59 +0000 (22:50 +0100)]
Merge pull request #66 from mikejsavage/chacha20review

chacha20 manual tweaks

8 years agoMerge pull request #65 from mikejsavage/blakereview
Loup Vaillant [Wed, 29 Nov 2017 21:50:28 +0000 (22:50 +0100)]
Merge pull request #65 from mikejsavage/blakereview

BLAKE2b manual tweaks

8 years agoMerge pull request #64 from mikejsavage/chacha20hreview
Loup Vaillant [Wed, 29 Nov 2017 21:49:01 +0000 (22:49 +0100)]
Merge pull request #64 from mikejsavage/chacha20hreview

chacha20_H manual tweaks

8 years agoMerge pull request #63 from mikejsavage/wipereview
Loup Vaillant [Wed, 29 Nov 2017 21:48:06 +0000 (22:48 +0100)]
Merge pull request #63 from mikejsavage/wipereview

crypto_wipe manual tweaks

8 years agoRemove parens around "like memcmp"
Michael Savage [Wed, 29 Nov 2017 08:38:24 +0000 (10:38 +0200)]
Remove parens around "like memcmp"

8 years agoFormatting fix
Michael Savage [Wed, 29 Nov 2017 08:34:38 +0000 (10:34 +0200)]
Formatting fix

8 years ago64 bit -> 64-byte
Michael Savage [Wed, 29 Nov 2017 08:32:11 +0000 (10:32 +0200)]
64 bit -> 64-byte

8 years agocrypto_wipe manual tweaks
Michael Savage [Tue, 28 Nov 2017 19:06:44 +0000 (21:06 +0200)]
crypto_wipe manual tweaks

8 years agocrypto_verify manual tweaks
Michael Savage [Tue, 28 Nov 2017 19:02:03 +0000 (21:02 +0200)]
crypto_verify manual tweaks

8 years agoIncremental crypto_sign manual tweaks
Michael Savage [Tue, 28 Nov 2017 18:52:17 +0000 (20:52 +0200)]
Incremental crypto_sign manual tweaks

8 years agochacha20 manual tweaks
Michael Savage [Tue, 28 Nov 2017 18:37:01 +0000 (20:37 +0200)]
chacha20 manual tweaks

8 years agocrypto_sign manual tweaks
Michael Savage [Tue, 28 Nov 2017 18:39:19 +0000 (20:39 +0200)]
crypto_sign manual tweaks

8 years agochacha20_H manual tweaks
Michael Savage [Tue, 28 Nov 2017 18:14:20 +0000 (20:14 +0200)]
chacha20_H manual tweaks

8 years agoBLAKE2b manual tweaks
Michael Savage [Tue, 28 Nov 2017 18:12:40 +0000 (20:12 +0200)]
BLAKE2b manual tweaks

8 years agoMerge pull request #62 from CuleX/master+add-missing-symlink
Loup Vaillant [Sun, 26 Nov 2017 10:44:37 +0000 (11:44 +0100)]
Merge pull request #62 from CuleX/master+add-missing-symlink

Add symlink for crypto_argon2i_general.3monocypher

8 years agoAdd symlink for crypto_argon2i_general.3monocypher
CuleX [Sun, 26 Nov 2017 05:51:37 +0000 (06:51 +0100)]
Add symlink for crypto_argon2i_general.3monocypher

This also adds it to intro(3monocypher).

8 years agoReviewing mikejsavage's manual tweaks
Loup Vaillant [Thu, 23 Nov 2017 20:06:12 +0000 (21:06 +0100)]
Reviewing  mikejsavage's manual tweaks

8 years agoMerge pull request #59 from mikejsavage/cryptolockdoc
Loup Vaillant [Thu, 23 Nov 2017 00:10:33 +0000 (01:10 +0100)]
Merge pull request #59 from mikejsavage/cryptolockdoc

crypto_lock manual tweaks

8 years agoMerge pull request #60 from mikejsavage/argondoc
Loup Vaillant [Thu, 23 Nov 2017 00:00:47 +0000 (01:00 +0100)]
Merge pull request #60 from mikejsavage/argondoc

Argon manual tweaks

8 years agoMerge pull request #61 from mikejsavage/introdoc
Loup Vaillant [Wed, 22 Nov 2017 23:49:02 +0000 (00:49 +0100)]
Merge pull request #61 from mikejsavage/introdoc

Explicitly talk about compression being harmful in the intro

8 years agoReword CRIME sentence
Michael Savage [Tue, 21 Nov 2017 21:44:44 +0000 (23:44 +0200)]
Reword CRIME sentence

8 years agoExplicitly mention compression, see intro for details
Michael Savage [Tue, 21 Nov 2017 21:42:38 +0000 (23:42 +0200)]
Explicitly mention compression, see intro for details

8 years agoArgon manual tweaks
Michael Savage [Tue, 21 Nov 2017 21:21:21 +0000 (23:21 +0200)]
Argon manual tweaks

8 years agotw=72
Michael Savage [Tue, 21 Nov 2017 20:57:30 +0000 (22:57 +0200)]
tw=72

8 years agoNew lines after .
Michael Savage [Tue, 21 Nov 2017 20:57:01 +0000 (22:57 +0200)]
New lines after .