]> git.codecow.com Git - Monocypher.git/log
Monocypher.git
8 years agoWe no longer need dist.sh
Loup Vaillant [Tue, 19 Sep 2017 06:38:30 +0000 (08:38 +0200)]
We no longer need dist.sh

We do need a make_tarball.sh script however

8 years agoCleaner generation of test vectors.
Loup Vaillant [Mon, 18 Sep 2017 21:13:36 +0000 (23:13 +0200)]
Cleaner generation of test vectors.

The makefile that generates the test vectors directly puts the
vectors.h header in the dist/tests/ directory.  No more weird script
to do half that work.

As a side effect, BSD users can now switch to gmake more easily (they
don't depend on a script to do stuff like `make || gmake`.

Closes #33, though not satisfactorily (the makefiles still rely on GNU
make, because portable makefiles are just crippled).

8 years agovectors.h is generated. It belongs to the tarball
Loup Vaillant [Sun, 17 Sep 2017 18:21:56 +0000 (20:21 +0200)]
vectors.h is generated.  It belongs to the tarball

8 years agoFixed #34. The README has been split in 2
Loup Vaillant [Sun, 17 Sep 2017 18:18:27 +0000 (20:18 +0200)]
Fixed #34. The README has been split in 2

8 years agoCreated a dedicated dist/ directory for end user releases
Loup Vaillant [Sat, 16 Sep 2017 20:43:32 +0000 (22:43 +0200)]
Created a dedicated dist/ directory for end user releases

Related to #14 and #24.  The repository is now unfit for distribution
to end users.  We must first execute the dist.sh script to generate
test vectors and move the relevant files to the dist/ directory, which
can then be archived and distributed.  This archive will contain a
makefile to compile and test Monocypher.

Stuff left to do:

- Review and finalise the tests.
- Generate html files for the manual.
- Revise the frama-c.sh and coverage.sh scripts
- Have the makefile install Monocypher
- Automate archive generation (and print the archive's blake2 hash).

8 years agoMerge pull request #31 from CuleX/master+man-page-type-fix
Loup Vaillant [Thu, 14 Sep 2017 07:24:00 +0000 (09:24 +0200)]
Merge pull request #31 from CuleX/master+man-page-type-fix

crypto_sign man page improvements

8 years agoDocument that message and signature cannot overlap
CuleX [Wed, 13 Sep 2017 12:27:45 +0000 (14:27 +0200)]
Document that message and signature cannot overlap

The signature variable gets overwritten halfway through the crypto_sign
function and that value is then reused in multiple places.

8 years agoFix function type on man page for crypto_sign
CuleX [Wed, 13 Sep 2017 12:24:03 +0000 (14:24 +0200)]
Fix function type on man page for crypto_sign

8 years agoClarified why we need to hash the message twice in EdDSA
Loup Vaillant [Sat, 9 Sep 2017 11:02:27 +0000 (13:02 +0200)]
Clarified why we need to hash the message twice in EdDSA

The code isn't crystal clear about the fact we reuse the result of the
first hash in the second hash.  A little comment makes sure reviewers
don't miss it.

8 years agoMerge pull request #30 from CuleX/master+man-page-fixes
Loup Vaillant [Sat, 9 Sep 2017 18:41:05 +0000 (20:41 +0200)]
Merge pull request #30 from CuleX/master+man-page-fixes

Man page fixes

8 years agoAdd note to intro page that getrandom() is new
CuleX [Sat, 9 Sep 2017 11:51:58 +0000 (13:51 +0200)]
Add note to intro page that getrandom() is new

8 years agoImprove the crypto_sign man page
CuleX [Sat, 9 Sep 2017 11:09:46 +0000 (13:09 +0200)]
Improve the crypto_sign man page

1. Reorder the arguments so that crypto_sign_public_key() comes directly
   after crypto_sign().  This harmonizes the order of the public key
   generation functions with crypto_key_exchange(3monocypher).
2. Move implementation details and complaints about SHA-512 to the
   IMPLEMENTATION DETAILS section.
3. Note that there is no incremental interface available in the
   DESCRIPTION and explain it in the IMPLEMENTATION DETAILS section.
4. Add an example for key generation.  Key generation using straight
   random bytes may come as a surprise to people not used working with
   Curve25519.

8 years agoImprove the intro man page
CuleX [Sat, 9 Sep 2017 10:51:25 +0000 (12:51 +0200)]
Improve the intro man page

1. This adds the crypto_memcmp and crypto_zerocmp functions to the index
   and the SEE ALSO section.
2. SEE ALSO got reordered from mirroring the topical index to an
   alphabetical index.  Having the same list twice is to nobody's
   benefit and makes searching alphabetically (e.g. when the reader
   already has a vague idea what the function is supposed to be called)
   more difficult.

8 years agoFix example for crypto_argon2i
CuleX [Sat, 9 Sep 2017 10:47:55 +0000 (12:47 +0200)]
Fix example for crypto_argon2i

It actually did not have a password and password length parameter.

The invocation line was thus split up into logical blocks to avoid
confusing the reader.  A similar layout can be observed in
tests/self.c:argon2i().

8 years agoImprove the man page for crypto_key_exchange
CuleX [Sat, 9 Sep 2017 10:27:13 +0000 (12:27 +0200)]
Improve the man page for crypto_key_exchange

1. Improve wording in the section on public keys that yield an all-zero
   result.
2. Fix casing (HCHacha20 -> HChacha20).
3. Resolve contraction to keep the manual style.
4. Add example for key generation and key exchange.  It's not quite
   obvious that you just use straight random bytes.  If coming from
   other X25519 implementations, it may be a surprise not having to
   trim the key.  If coming from other public key cryptographic systems,
   it may be a surprise that key generation is this straightforward.

8 years agoMerge pull request #28 from CuleX/master+key-exchange-man-page
Loup Vaillant [Sat, 9 Sep 2017 09:37:53 +0000 (11:37 +0200)]
Merge pull request #28 from CuleX/master+key-exchange-man-page

Minor improvements to crypto_key_exchange man page

8 years agoClarify function argument to crypto_x25519
CuleX [Thu, 7 Sep 2017 04:52:11 +0000 (06:52 +0200)]
Clarify function argument to crypto_x25519

1. Change param "shared_secret" in crypto_x25519 to "raw_shared_secret"
   to aid quick identification of the difference between it and
   crypto_key_exchange; the "key" vs. "secret" gets lost easily because
   of the shared prefix "shared_".
   This change was traced everywhere in the source code where the old
   name was used as well as the man page.
2. Fix not having punctuation as a separate word in man page macro.

8 years agoadded test vector generators
Loup Vaillant [Tue, 5 Sep 2017 18:06:28 +0000 (20:06 +0200)]
added test vector generators

8 years agoMerge pull request #26 from njlr/docs/buck-port
Loup Vaillant [Tue, 5 Sep 2017 14:45:48 +0000 (16:45 +0200)]
Merge pull request #26 from njlr/docs/buck-port

Note about the Buck port to the README

8 years agoMerge pull request #27 from CuleX/master+man-page-fix-formatting
Loup Vaillant [Tue, 5 Sep 2017 14:44:05 +0000 (16:44 +0200)]
Merge pull request #27 from CuleX/master+man-page-fix-formatting

Fix formatting on man page for crypto_chacha20_*

8 years agoFix formatting on man page for crypto_chacha20_*
CuleX [Tue, 5 Sep 2017 11:28:47 +0000 (13:28 +0200)]
Fix formatting on man page for crypto_chacha20_*

Missing .Pp after .Ed.

8 years ago * Added a note about the Buck port to the README
njlr [Tue, 5 Sep 2017 10:14:00 +0000 (11:14 +0100)]
 * Added a note about the Buck port to the README

8 years agoProperly initialise libsodium for the speed benchmarks
Loup Vaillant [Mon, 4 Sep 2017 06:55:05 +0000 (08:55 +0200)]
Properly initialise libsodium for the speed benchmarks

Without this initialisation, libsodium can't select the fastest
implementation for the platform, and has to revert to a portable,
slower one.  This leads to misleading benchmarks.

8 years agoMerge pull request #22 from CuleX/master+man-pages
Loup Vaillant [Tue, 29 Aug 2017 06:58:47 +0000 (08:58 +0200)]
Merge pull request #22 from CuleX/master+man-pages

Add man pages

8 years agoFix centering in style.css
CuleX [Mon, 28 Aug 2017 13:17:55 +0000 (15:17 +0200)]
Fix centering in style.css

8 years agoRemove Xr to system man pages
CuleX [Mon, 28 Aug 2017 13:11:29 +0000 (15:11 +0200)]
Remove Xr to system man pages

These create broken links when generating the manual page and there is
no way to selectively disable link generation in mandoc.

This change should not create much of an impact to readers on console,
who would enter a man command for the respective page regardless.

This also fixes a small usage error of the Xr macro in
crypto_aead_lock.3monocypher.

8 years agoAdd symbolic links
CuleX [Mon, 28 Aug 2017 12:50:02 +0000 (14:50 +0200)]
Add symbolic links

Generated with:

find . -name '*.3monocypher' -not -type l -and -not -type d | \
grep -v '^\./?' | \
xargs grep '^\.Nm' | \
sed -e 's/^\([^:]*\):\.Nm \([a-zA-Z0-9_]*\).*$/
[ ! -f \2.3monocypher ] \&\& ln -s \1 \2.3monocypher/'

8 years agoAdd style.css for HTML manual generation
CuleX [Mon, 28 Aug 2017 12:25:12 +0000 (14:25 +0200)]
Add style.css for HTML manual generation

8 years agoAdd man pages
CuleX [Sat, 26 Aug 2017 10:09:19 +0000 (12:09 +0200)]
Add man pages

They've been given a custom section 3monocypher to avoid potential
clashes with the system.  This also allows having a custom intro
page, which would otherwise clash or need a different name.

8 years agoMerge pull request #21 from CuleX/master+fix-tests-typo
Loup Vaillant [Sat, 26 Aug 2017 02:17:05 +0000 (04:17 +0200)]
Merge pull request #21 from CuleX/master+fix-tests-typo

Fix typo in "Property based tests tests"

8 years agoFix typo in "Property based tests tests"
CuleX [Fri, 25 Aug 2017 15:26:11 +0000 (17:26 +0200)]
Fix typo in "Property based tests tests"

8 years agoMerge pull request #20 from CuleX/master+fix-solaris-32bit
Loup Vaillant [Fri, 25 Aug 2017 14:24:08 +0000 (16:24 +0200)]
Merge pull request #20 from CuleX/master+fix-solaris-32bit

Fix Chacha20 ctr test when size_t < u64

8 years agoFix Chacha20 ctr test when size_t < u64
CuleX [Fri, 25 Aug 2017 13:00:43 +0000 (15:00 +0200)]
Fix Chacha20 ctr test when size_t < u64

This can happen on 32-bit platforms and was reproduced on a 32-bit build
of Solaris 11.

8 years agoExplained key and ad arguments for Argon2i
Loup Vaillant [Fri, 25 Aug 2017 04:56:25 +0000 (06:56 +0200)]
Explained key and ad arguments for Argon2i

8 years agoadded memory locking advice
Loup Vaillant [Mon, 21 Aug 2017 05:54:54 +0000 (07:54 +0200)]
added memory locking advice

8 years agoMerge pull request #17 from occivink/master
Loup Vaillant [Sun, 20 Aug 2017 05:30:02 +0000 (07:30 +0200)]
Merge pull request #17 from occivink/master

Change vocabulary in manual to match the header's

8 years agoChange vocabulary in manual to match the header's
Olivier Perret [Thu, 17 Aug 2017 18:02:49 +0000 (20:02 +0200)]
Change vocabulary in manual to match the header's

8 years agoreferenced AUR package for Arch Linux
Loup Vaillant [Wed, 16 Aug 2017 04:29:46 +0000 (06:29 +0200)]
referenced AUR package for Arch Linux

8 years agomore readable one liners
Loup Vaillant [Fri, 11 Aug 2017 07:46:58 +0000 (09:46 +0200)]
more readable one liners

8 years agoadded edDSA test for invalid public key rejection
Loup Vaillant [Wed, 9 Aug 2017 12:23:02 +0000 (14:23 +0200)]
added edDSA test for invalid public key rejection

8 years agoadded link to lua bindings
Loup Vaillant [Tue, 8 Aug 2017 06:55:24 +0000 (08:55 +0200)]
added link to lua bindings

8 years agoMore sensitive constant timing test
Loup Vaillant [Sun, 6 Aug 2017 21:33:44 +0000 (23:33 +0200)]
More sensitive constant timing test

32 bytes buffers weren't big enough to make a difference if crypto_memcmp
and crypto_zerocmp don't run in constant time.  Increased to 64Kib instead.

8 years agoadded a language bindings section to the README
Loup Vaillant [Sun, 6 Aug 2017 21:16:23 +0000 (23:16 +0200)]
added a language bindings section to the README

8 years agocosmetic
Loup Vaillant [Sun, 6 Aug 2017 19:33:13 +0000 (21:33 +0200)]
cosmetic

8 years agoMerge branch 'master' of github.com:LoupVaillant/Monocypher
Loup Vaillant [Sun, 6 Aug 2017 19:28:07 +0000 (21:28 +0200)]
Merge branch 'master' of github.com:LoupVaillant/Monocypher

8 years agoMerge pull request #13 from CuleX/master+cmp-tests
Loup Vaillant [Sun, 6 Aug 2017 19:25:33 +0000 (21:25 +0200)]
Merge pull request #13 from CuleX/master+cmp-tests

Test constant-timeness of comparison functions

8 years agooptimised Blake2b loading code (again)
Loup Vaillant [Sun, 6 Aug 2017 19:12:18 +0000 (21:12 +0200)]
optimised Blake2b loading code (again)

8 years agoTest constant-timeness of comparison functions
CuleX [Sun, 6 Aug 2017 16:58:53 +0000 (18:58 +0200)]
Test constant-timeness of comparison functions

clock() in time.h is specified in C89 and should thus be portable.
COMPARISON_DIFF_THRESHOLD was chosen based on observed values, which
reached a maximum at 3.

8 years agoadded ed25519-donna speed benchmark
Loup Vaillant [Sun, 6 Aug 2017 16:59:09 +0000 (18:59 +0200)]
added ed25519-donna speed benchmark

8 years agofixed bogus TweetNaCl benchmark
Loup Vaillant [Sun, 6 Aug 2017 16:18:16 +0000 (18:18 +0200)]
fixed bogus TweetNaCl benchmark

8 years agoHighlighted RNGs and comparison (fixes #2)
Loup Vaillant [Sun, 6 Aug 2017 15:00:09 +0000 (17:00 +0200)]
Highlighted RNGs and comparison (fixes #2)

8 years agoMerge branch 'master' of github.com:LoupVaillant/Monocypher
Loup Vaillant [Sun, 6 Aug 2017 11:57:11 +0000 (13:57 +0200)]
Merge branch 'master' of github.com:LoupVaillant/Monocypher

8 years agoMerge pull request #12 from rain-1/master
Loup Vaillant [Sun, 6 Aug 2017 11:56:54 +0000 (13:56 +0200)]
Merge pull request #12 from rain-1/master

add /* FALLTHRU */ comments to silence warnings on gcc 7

8 years agooptimised Chacha20 (un)loading code
Loup Vaillant [Sun, 6 Aug 2017 10:36:10 +0000 (12:36 +0200)]
optimised Chacha20 (un)loading code

8 years agoadd /* FALLTHRU */ comments to silence warnings
rain [Sun, 6 Aug 2017 09:42:13 +0000 (10:42 +0100)]
add /* FALLTHRU */ comments to silence warnings

8 years agooptimised poly1305 loading code (again)
Loup Vaillant [Sun, 6 Aug 2017 09:30:53 +0000 (11:30 +0200)]
optimised poly1305 loading code (again)

8 years agoadded poly1305-donna speed benchmark
Loup Vaillant [Sun, 6 Aug 2017 09:11:23 +0000 (11:11 +0200)]
added poly1305-donna speed benchmark

8 years agofixed #7 by adding a second licence (BSD)
Loup Vaillant [Sat, 5 Aug 2017 23:03:18 +0000 (01:03 +0200)]
fixed #7 by adding a second licence (BSD)

8 years agoMerge branch 'CuleX-master+gcc421-openbsd'
Loup Vaillant [Sat, 5 Aug 2017 22:27:52 +0000 (00:27 +0200)]
Merge branch 'CuleX-master+gcc421-openbsd'

8 years agoAdded SHA_512_BLOCK_SIZE to correct naming
Loup Vaillant [Sat, 5 Aug 2017 22:16:28 +0000 (00:16 +0200)]
Added SHA_512_BLOCK_SIZE to correct naming

8 years agoself: Initialize const values from macros
CuleX [Sat, 5 Aug 2017 07:30:03 +0000 (09:30 +0200)]
self: Initialize const values from macros

This fixes building on OpenBSD 6.1, which ships with GCC 4.2.1. Trying
to build tests/self.c failed because it does not permit initializing a
const value from another const value.

The local const variables have been replaced with macros.

This fixes #9.

8 years agoMerge pull request #8 from CuleX/master+doc-min-libsodium-ver
Loup Vaillant [Fri, 4 Aug 2017 16:03:42 +0000 (18:03 +0200)]
Merge pull request #8 from CuleX/master+doc-min-libsodium-ver

Document minimum libsodium version for test suite

8 years agoDocument minimum libsodium version for test suite
CuleX [Fri, 4 Aug 2017 06:51:44 +0000 (08:51 +0200)]
Document minimum libsodium version for test suite

8 years agoreally fixed #4
Loup Vaillant [Wed, 2 Aug 2017 23:05:40 +0000 (01:05 +0200)]
really fixed #4

8 years agofixed #4 (wrong function name in the manual)
Loup Vaillant [Sun, 30 Jul 2017 17:55:20 +0000 (19:55 +0200)]
fixed #4 (wrong function name in the manual)

8 years agoUpdated manual
Loup Vaillant [Sun, 23 Jul 2017 17:59:46 +0000 (19:59 +0200)]
Updated manual

8 years agoadded coverage report script
Loup Vaillant [Sun, 23 Jul 2017 17:31:18 +0000 (19:31 +0200)]
added coverage report script

8 years agofused self containted tests together
Loup Vaillant [Sun, 23 Jul 2017 15:26:10 +0000 (17:26 +0200)]
fused self containted tests together

8 years agocleanup formatting and naming
Loup Vaillant [Sat, 22 Jul 2017 00:28:45 +0000 (02:28 +0200)]
cleanup formatting and naming

8 years agomore accurate speed benchmarks
Loup Vaillant [Sat, 22 Jul 2017 00:26:30 +0000 (02:26 +0200)]
more accurate speed benchmarks

8 years agooptimised Blake2b (un)loading code
Loup Vaillant [Thu, 20 Jul 2017 17:24:06 +0000 (19:24 +0200)]
optimised Blake2b (un)loading code

8 years agooptimised Poly1305 loading code
Loup Vaillant [Thu, 20 Jul 2017 13:55:12 +0000 (15:55 +0200)]
optimised Poly1305 loading code

8 years agooptimised chacha20 (un)loading code
Loup Vaillant [Thu, 20 Jul 2017 12:56:46 +0000 (14:56 +0200)]
optimised chacha20 (un)loading code

8 years agocosmetic
Loup Vaillant [Thu, 20 Jul 2017 12:55:01 +0000 (14:55 +0200)]
cosmetic

8 years agospelling
Loup Vaillant [Thu, 20 Jul 2017 12:52:54 +0000 (14:52 +0200)]
spelling

8 years agooptimised sha512 loading code
Loup Vaillant [Wed, 19 Jul 2017 21:36:32 +0000 (23:36 +0200)]
optimised sha512 loading code

8 years agoadded absolute timings for the speed benchmark
Loup Vaillant [Wed, 19 Jul 2017 21:35:00 +0000 (23:35 +0200)]
added absolute timings for the speed benchmark

8 years agoadded self consistency tests for sha512
Loup Vaillant [Wed, 19 Jul 2017 21:31:35 +0000 (23:31 +0200)]
added self consistency tests for sha512

8 years agoremoved #define sv static void
Loup Vaillant [Wed, 19 Jul 2017 11:24:21 +0000 (13:24 +0200)]
removed #define sv static void

8 years agoreadme cosmetic
Loup Vaillant [Tue, 18 Jul 2017 17:43:03 +0000 (19:43 +0200)]
readme cosmetic

8 years agotitle for the readme
Loup Vaillant [Tue, 18 Jul 2017 17:36:48 +0000 (19:36 +0200)]
title for the readme

8 years agoupdated the readme
Loup Vaillant [Tue, 18 Jul 2017 17:26:28 +0000 (19:26 +0200)]
updated the readme

8 years agoadded TIS interpreter support
Loup Vaillant [Tue, 18 Jul 2017 17:01:03 +0000 (19:01 +0200)]
added TIS interpreter support

8 years agoremoved some test vectors
Loup Vaillant [Tue, 18 Jul 2017 16:59:30 +0000 (18:59 +0200)]
removed some test vectors

8 years agoreverted back to -O3 by default
Loup Vaillant [Tue, 18 Jul 2017 10:06:23 +0000 (12:06 +0200)]
reverted back to -O3 by default

8 years agodeclared a constant 'static const'
Loup Vaillant [Tue, 18 Jul 2017 10:04:51 +0000 (12:04 +0200)]
declared a constant 'static const'

8 years agofixed signed overflow
Loup Vaillant [Tue, 18 Jul 2017 10:02:02 +0000 (12:02 +0200)]
fixed signed overflow

8 years agoadded sanitizers (ASan, MSan, UBSan, coverage)
Loup Vaillant [Tue, 18 Jul 2017 10:00:36 +0000 (12:00 +0200)]
added sanitizers (ASan, MSan, UBSan, coverage)

8 years agodocumented crypto_chacha20_set_ctr()
Loup Vaillant [Mon, 17 Jul 2017 16:54:39 +0000 (18:54 +0200)]
documented crypto_chacha20_set_ctr()

8 years agomore tests for crypto_chacha20_set_ctr()
Loup Vaillant [Mon, 17 Jul 2017 16:15:02 +0000 (18:15 +0200)]
more tests for crypto_chacha20_set_ctr()

8 years agocosmetic
Loup Vaillant [Mon, 17 Jul 2017 14:51:00 +0000 (16:51 +0200)]
cosmetic

8 years agoclarified the licence
Loup Vaillant [Sun, 16 Jul 2017 23:03:48 +0000 (01:03 +0200)]
clarified the licence

8 years agoadded crypto_chacha20_set_ctr()
Loup Vaillant [Sun, 16 Jul 2017 22:52:25 +0000 (00:52 +0200)]
added crypto_chacha20_set_ctr()

8 years agorenamed chacha20_Xinit into chacha20_x_init
Loup Vaillant [Sun, 16 Jul 2017 12:56:47 +0000 (14:56 +0200)]
renamed chacha20_Xinit into chacha20_x_init

8 years agoremove ./speed when cleaning
Loup Vaillant [Sun, 16 Jul 2017 12:56:02 +0000 (14:56 +0200)]
remove ./speed when cleaning

8 years ago-O3 march=native (heavily affects Argon2i)
Loup Vaillant [Sun, 16 Jul 2017 12:43:59 +0000 (14:43 +0200)]
-O3 march=native (heavily affects Argon2i)

8 years agooptimized away an indirect call in Argon2i
Loup Vaillant [Sun, 16 Jul 2017 12:42:37 +0000 (14:42 +0200)]
optimized away an indirect call in Argon2i

8 years agocompute signatures in Montgomery space (faster)
Loup Vaillant [Sat, 15 Jul 2017 14:11:21 +0000 (16:11 +0200)]
compute signatures in Montgomery space (faster)

8 years agoadded XChacha20 comparison with libsodium
Loup Vaillant [Sun, 9 Jul 2017 12:12:33 +0000 (14:12 +0200)]
added XChacha20 comparison with libsodium

8 years agoadded speed benchmark against TweetNaCl
Loup Vaillant [Sat, 8 Jul 2017 12:05:51 +0000 (14:05 +0200)]
added speed benchmark against TweetNaCl