]> git.codecow.com Git - Monocypher.git/log
Monocypher.git
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 .

8 years agocrypto_lock manual tweaks
Michael Savage [Tue, 21 Nov 2017 20:56:09 +0000 (22:56 +0200)]
crypto_lock manual tweaks

8 years agoExplicitly talk about data compression being harmful in the intro
Michael Savage [Tue, 21 Nov 2017 20:15:45 +0000 (22:15 +0200)]
Explicitly talk about data compression being harmful in the intro

8 years agoChanged Argon2i API
Loup Vaillant [Thu, 16 Nov 2017 22:25:26 +0000 (23:25 +0100)]
Changed Argon2i API

- Removed the key and ad from crypto_argon2i()
- Added crypto_argon2i_general(), which conform to the old API, to
  compensate.
- Updated the manual.

Related to #58
Rationale: the key and ad arguments are rarely used.  Regular users
shouldn't be burdened with them.

8 years agoFaster Blake2b.
Loup Vaillant [Sun, 12 Nov 2017 16:59:03 +0000 (17:59 +0100)]
Faster Blake2b.

Between 25% and 30% faster on my corei5 skylake laptop.

8 years agomore warnings for multiplication timings
Loup Vaillant [Sun, 12 Nov 2017 16:27:28 +0000 (17:27 +0100)]
more warnings for multiplication timings

Following CuleX's advice.

Whitelisted x86, x86_64, ARM, and ARM64.  Users should check
how multiplication is done on other platforms.

8 years agoManual review: applying CuleX's advice
Loup Vaillant [Sun, 12 Nov 2017 13:00:34 +0000 (14:00 +0100)]
Manual review: applying CuleX's advice

8 years agoRenamed crypto_poly1305_auth to crypto_poly1305
Loup Vaillant [Sat, 11 Nov 2017 18:17:03 +0000 (19:17 +0100)]
Renamed crypto_poly1305_auth to crypto_poly1305

8 years agoManual review: intro
Loup Vaillant [Sat, 11 Nov 2017 18:00:39 +0000 (19:00 +0100)]
Manual review: intro

8 years agoManual review: applying CuleX's advice
Loup Vaillant [Sat, 11 Nov 2017 17:59:58 +0000 (18:59 +0100)]
Manual review: applying CuleX's advice

8 years agoForgot to wipe a temporary buffer
Loup Vaillant [Mon, 6 Nov 2017 19:37:34 +0000 (20:37 +0100)]
Forgot to wipe a temporary buffer

8 years agoManual review: applying CuleX's advice
Loup Vaillant [Mon, 6 Nov 2017 19:29:58 +0000 (20:29 +0100)]
Manual review: applying CuleX's advice

8 years agoManual review: crypto_sign_init
Loup Vaillant [Sun, 5 Nov 2017 19:29:45 +0000 (20:29 +0100)]
Manual review: crypto_sign_init

8 years agoRemoved "The *** function" patterns
Loup Vaillant [Sun, 5 Nov 2017 17:43:24 +0000 (18:43 +0100)]
Removed "The *** function" patterns

8 years agoManual review: applying CuleX's advice
Loup Vaillant [Sun, 5 Nov 2017 17:09:29 +0000 (18:09 +0100)]
Manual review: applying CuleX's advice

8 years agoManual review: spell check
Loup Vaillant [Sun, 5 Nov 2017 15:42:09 +0000 (16:42 +0100)]
Manual review: spell check

8 years agoManual review: crypto_sign
Loup Vaillant [Sun, 5 Nov 2017 15:39:33 +0000 (16:39 +0100)]
Manual review: crypto_sign

8 years agoManual review: crypto_lock_init
Loup Vaillant [Sun, 5 Nov 2017 11:21:52 +0000 (12:21 +0100)]
Manual review: crypto_lock_init

8 years agoForgot to wipe a temporary buffer
Loup Vaillant [Fri, 3 Nov 2017 11:10:23 +0000 (12:10 +0100)]
Forgot to wipe a temporary buffer

8 years agoManual review: applying CuleX's advice
Loup Vaillant [Fri, 3 Nov 2017 09:46:25 +0000 (10:46 +0100)]
Manual review: applying CuleX's advice

8 years agoManual review: crypto_lock
Loup Vaillant [Fri, 3 Nov 2017 00:31:13 +0000 (01:31 +0100)]
Manual review: crypto_lock

8 years agoAutomatically wipe Argon2i work area
Loup Vaillant [Wed, 1 Nov 2017 20:07:14 +0000 (21:07 +0100)]
Automatically wipe Argon2i work area

crypto_wipe() wipes byte by byte.  This is fine for small buffers, but
for the Argon2i work area, it means losing about 20% performance.

This has a direct impact on security: users are advised to chose the
highest settings they are comfortable with.  A 20% slow down will mean
a 20% edge for the attacker.) Users must then chose between
sacrificing 20% of security, or exposing themselves to side channel
attacks.

---

There is a faster way to wipe that work area: word by word.  Since it
is already required to be aligned for 8-byte words, we can wipe it in
8-bytes chunks.  This is much faster than crypto_wipe, and slows down
the whole process by only 2-3%.

This is a bit ad-hoc, though, and it wouldn't make much sense to add a
crypto_wipe_fast() function or something to handle that special case.
Instead, I've chosen to integrate it in Argon2i itself.  Now users
don't have to wipe the work area any more.

The drawback is, the output hash buffer must not overlap with the work
area, or it will be wiped with it.  This shouldn't be a problem in
practice.

8 years agoManual review: applying CuleX's advice
Loup Vaillant [Wed, 1 Nov 2017 16:59:13 +0000 (17:59 +0100)]
Manual review: applying CuleX's advice

Replaced 'evil' by 'malicious'

8 years agoMerge pull request #57 from mikejsavage/deterministically
Loup Vaillant [Wed, 1 Nov 2017 16:52:41 +0000 (17:52 +0100)]
Merge pull request #57 from mikejsavage/deterministically

eterministically -> deterministically

8 years agoMerge branch 'master' into deterministically
Loup Vaillant [Wed, 1 Nov 2017 16:51:50 +0000 (17:51 +0100)]
Merge branch 'master' into deterministically