]> git.codecow.com Git - Monocypher.git/log
Monocypher.git
6 years agocrypto_blake2b: Harmonize description with MAC example
Fabio Scotoni [Tue, 31 Mar 2020 11:52:30 +0000 (13:52 +0200)]
crypto_blake2b: Harmonize description with MAC example

6 years agocrypto_verify: wording nitpicks
Fabio Scotoni [Tue, 31 Mar 2020 11:49:55 +0000 (13:49 +0200)]
crypto_verify: wording nitpicks

1. s/guessed a few bytes/guessed a byte/
   Nobody guesses multiple bytes per attempt except by sheer dumb luck.
2. Add missing "functions" to make one sentence not seem incomplete.

6 years agointro, crypto_poly1305: standardize "one-time"
Fabio Scotoni [Tue, 31 Mar 2020 11:46:03 +0000 (13:46 +0200)]
intro, crypto_poly1305: standardize "one-time"

6 years agodoc: crypto_xchacha20 does XChaCha20, not Chacha20
Fabio Scotoni [Tue, 31 Mar 2020 11:44:00 +0000 (13:44 +0200)]
doc: crypto_xchacha20 does XChaCha20, not Chacha20

6 years agocrypto_x25519: Note that _from_eddsa exists
Fabio Scotoni [Tue, 31 Mar 2020 11:39:37 +0000 (13:39 +0200)]
crypto_x25519: Note that _from_eddsa exists

6 years agocrypto_key_exchange: Note that _from_eddsa exists
Fabio Scotoni [Tue, 31 Mar 2020 11:37:47 +0000 (13:37 +0200)]
crypto_key_exchange: Note that _from_eddsa exists

6 years agoManual: nits & typos
Loup Vaillant [Tue, 31 Mar 2020 08:33:23 +0000 (10:33 +0200)]
Manual: nits & typos

6 years agoUpdate changelog
Loup Vaillant [Tue, 31 Mar 2020 07:34:48 +0000 (09:34 +0200)]
Update changelog

6 years agoFixed copyright year
Loup Vaillant [Mon, 30 Mar 2020 14:43:31 +0000 (16:43 +0200)]
Fixed copyright year

6 years agoAdded constant time tests with Valgrind
Loup Vaillant [Mon, 30 Mar 2020 13:28:43 +0000 (15:28 +0200)]
Added constant time tests with Valgrind

The trick is to call Monocypher API with uninitialised buffers.

If Valgrind complains about uninitialised something, that means an array
index or a conditional jump depends on secret data.

Note that crypto_check() is not tested: that's because it doesn't even
try to be constant time.

Note that a couple tested functions do have secret dependent conditional
jumps.  Those jumps however are just final checks, that just reveal
success or failure (and those are revealed anyway, as part as the
semantics of the function being tested).

Note that optimisations are disabled for the compilation of `ctgrind.c`
and the linking of `ctgrind.out`. This is an attempt to maximise
Valgrind's findings.

Also note that Valgrind seems to miss a secret dependent conditional
jump (it finds only one where we should have 2). But that may just be
Valgrind squashing the error report, instead of an actual miss.

6 years agoManual: fixed function name
Loup Vaillant [Sun, 29 Mar 2020 14:52:27 +0000 (16:52 +0200)]
Manual: fixed function name

6 years agoSqueeze some more lines of code
Loup Vaillant [Sun, 29 Mar 2020 14:47:34 +0000 (16:47 +0200)]
Squeeze some more lines of code

And we are back below 2000

6 years agoOptimised scalar inversion with Montgomery multiplication
Loup Vaillant [Sun, 29 Mar 2020 14:09:51 +0000 (16:09 +0200)]
Optimised scalar inversion with Montgomery multiplication

This causes us to overshoot the 2000 lines mark by 35 lines or so.  But
this is much faster than using the much slower mul_add() routine.

6 years agoMore accurate code examples for Blake2b MAC
Loup Vaillant [Sat, 28 Mar 2020 11:29:03 +0000 (12:29 +0100)]
More accurate code examples for Blake2b MAC

6 years agoWording nitpick
Loup Vaillant [Fri, 27 Mar 2020 21:07:18 +0000 (22:07 +0100)]
Wording nitpick

6 years agoTypos
Loup Vaillant [Fri, 27 Mar 2020 21:04:02 +0000 (22:04 +0100)]
Typos

6 years agoTest all possible key lengths for Blake2b
Loup Vaillant [Fri, 27 Mar 2020 17:16:32 +0000 (18:16 +0100)]
Test all possible key lengths for Blake2b

6 years agoFixed non-working example
Loup Vaillant [Fri, 27 Mar 2020 16:48:54 +0000 (17:48 +0100)]
Fixed non-working example

6 years agoDoc: wrong key length range in example
Loup Vaillant [Fri, 27 Mar 2020 16:47:49 +0000 (17:47 +0100)]
Doc: wrong key length range in example

6 years agoSeparated arithmetic moduloL from EdDSA
Loup Vaillant [Fri, 27 Mar 2020 16:07:11 +0000 (17:07 +0100)]
Separated arithmetic moduloL from EdDSA

6 years agoTiny simplification
Loup Vaillant [Fri, 27 Mar 2020 16:02:08 +0000 (17:02 +0100)]
Tiny simplification

6 years agoMerge pull request #163 from fscoto/master+eddsa-doc
Loup Vaillant [Fri, 27 Mar 2020 09:03:40 +0000 (10:03 +0100)]
Merge pull request #163 from fscoto/master+eddsa-doc

doc: more details on mitigating power side channels in EdDSA

6 years agodoc: more details on mitigating power side channels in EdDSA
Fabio Scotoni [Fri, 27 Mar 2020 06:29:47 +0000 (07:29 +0100)]
doc: more details on mitigating power side channels in EdDSA

While already there, add a very sternly worded warning about omitting
the first pass that will *appear* to work but will, in fact, just repeat
the Sony PlayStation 3 ECDSA nonce disaster with EdDSA instead.

RFC 8032 § 8.7 already hates Monocypher's guts for providing this risky
interface at all, so we might as well use it for good:
By showing how it can be used to mitigate power analysis attacks.

The wording is such that crypto_sign.3monocypher redirects to
crypto_sign_init_first_pass.3monocypher for how to mitigate
power-related side channels;
crypto_ed25519_sign_init_first_pass.3monocypher already points to
crypto_sign_init_first_pass.3monocypher wholesale anyway.

I've intentionally broken the rule that
crypto_sign_init_first_pass.3monocypher *only* talks about BLAKE2b in
this specific instance because of the redirect on the Ed25519 page so
that this content doesn't need to be duplicated.
There's no issue doing this with the example code because both hash
functions call their internal compression functions.

While I could've just *described* what to do,
I'd feel uneasy leaving implementers just guessing what it is that we
mean and overshoot or undershoot by 32 bytes (undershooting being
particularly fatal) or just be too scared to try at all,
so I've added example code nonetheless.
It's been adorned with the bare minimum of an explanation about the
magic number 128-32.
Ideally, I'd have a good place to go on at length about EdDSA nonces,
but there really isn't.

On the other hand, I have very much *intentionally* omitted the fact
that you could be okay just hashing a random nonce in (which then should
be preferably at least 32 bytes, though you might be able to get away with
less as well, I don't think there's a well-defined threshold for
randomness with hash->reduce) or other kinds of nonces in the first pass
of EdDSA in particular.
While this is interesting and sometimes very much useful knowledge,
it's also a large footgun and the whole reason why RFC 8032 § 8.7
recommends against init-update-final interfaces in APIs (unless using
Ed25519ph, but that means you need a collision-resistant hash function
as the prehash, losing the security benefits of *not* requiring
collision resistance from the hash function in EdDSA in the first
place).

6 years agoDocumentation typo
Loup Vaillant [Wed, 25 Mar 2020 14:53:51 +0000 (15:53 +0100)]
Documentation typo

6 years agocorrected symlink
Loup Vaillant [Wed, 25 Mar 2020 14:04:25 +0000 (15:04 +0100)]
corrected symlink

6 years agoMissing space
Loup Vaillant [Wed, 25 Mar 2020 14:01:33 +0000 (15:01 +0100)]
Missing space

6 years agos/dangerous/dirty
Loup Vaillant [Wed, 25 Mar 2020 14:00:31 +0000 (15:00 +0100)]
s/dangerous/dirty

6 years agoMerge pull request #162 from fscoto/master+new-doc
Loup Vaillant [Wed, 25 Mar 2020 11:25:47 +0000 (12:25 +0100)]
Merge pull request #162 from fscoto/master+new-doc

Document Elligator and related plus X25519 inverse

6 years agodoc: Re-insert accidentally omitted "otherwise"
Fabio Scotoni [Wed, 25 Mar 2020 11:09:04 +0000 (12:09 +0100)]
doc: Re-insert accidentally omitted "otherwise"

6 years agoAddress review concerns in #162
Fabio Scotoni [Wed, 25 Mar 2020 10:25:37 +0000 (11:25 +0100)]
Address review concerns in #162

6 years agodoc intro: Xr the EdDSA->25519 conversion functions
Fabio Scotoni [Wed, 25 Mar 2020 06:45:36 +0000 (07:45 +0100)]
doc intro: Xr the EdDSA->25519 conversion functions

6 years agoDocument the EdDSA->X25519 functions
Fabio Scotoni [Wed, 25 Mar 2020 06:43:38 +0000 (07:43 +0100)]
Document the EdDSA->X25519 functions

6 years agoMerge branch 'master' into master+new-doc
Fabio Scotoni [Wed, 25 Mar 2020 06:21:02 +0000 (07:21 +0100)]
Merge branch 'master' into master+new-doc

6 years agodoc: s/dangerous/fast/g
Fabio Scotoni [Tue, 24 Mar 2020 19:41:45 +0000 (20:41 +0100)]
doc: s/dangerous/fast/g

Matching 491a026.

6 years agoAdded EdDSA to X25519 conversions
Loup Vaillant [Tue, 24 Mar 2020 19:40:48 +0000 (20:40 +0100)]
Added EdDSA to X25519 conversions

6 years agoTypos
Loup Vaillant [Tue, 24 Mar 2020 18:06:31 +0000 (19:06 +0100)]
Typos

6 years agos/dangerous/dirty
Loup Vaillant [Tue, 24 Mar 2020 18:05:28 +0000 (19:05 +0100)]
s/dangerous/dirty

Those functions are not that dangerous, and such a scary word
would send the wrong message.  The manual though will make clear
this is not for everyone

6 years agodoc: address review concerns from #162
Fabio Scotoni [Tue, 24 Mar 2020 15:05:33 +0000 (16:05 +0100)]
doc: address review concerns from #162

6 years agocurve_to_hidden: Note it is intended for ephemeral only
Fabio Scotoni [Tue, 24 Mar 2020 13:57:40 +0000 (14:57 +0100)]
curve_to_hidden: Note it is intended for ephemeral only

6 years agoMerge branch 'master' into master+new-doc
Fabio Scotoni [Tue, 24 Mar 2020 12:40:56 +0000 (13:40 +0100)]
Merge branch 'master' into master+new-doc

6 years agoDocument Elligator and related plus X25519 inverse
Fabio Scotoni [Tue, 24 Mar 2020 12:40:07 +0000 (13:40 +0100)]
Document Elligator and related plus X25519 inverse

6 years agoForgot to wipe buffers
Loup Vaillant [Tue, 24 Mar 2020 12:34:55 +0000 (13:34 +0100)]
Forgot to wipe buffers

6 years agoAdded dangerous X25519 speed benchmarks
Loup Vaillant [Tue, 24 Mar 2020 12:34:29 +0000 (13:34 +0100)]
Added dangerous X25519 speed benchmarks

6 years agoMerge pull request #161 from fscoto/master+new-doc
Loup Vaillant [Tue, 24 Mar 2020 07:54:06 +0000 (08:54 +0100)]
Merge pull request #161 from fscoto/master+new-doc

doc: contributory behavior may be required sometimes

6 years agodoc: contributory behavior may be required sometimes
Fabio Scotoni [Tue, 24 Mar 2020 07:41:48 +0000 (08:41 +0100)]
doc: contributory behavior may be required sometimes

While already there, hoist the explanation about contributory behavior
from RETURN VALUES to the main DESCRIPTION section.
The only reason it was in RETURN VALUES is because of historical
reasons; we used to justify why the return value was deprecated there,
so the position of the explanation made sense before removal of the
return value.

6 years agoRefined the Elligator interface
Loup Vaillant [Mon, 23 Mar 2020 19:46:43 +0000 (20:46 +0100)]
Refined the Elligator interface

Also added a new lightweight (but slower) path for embedded devices

6 years agoElligator script: alternate way to co-clear
Loup Vaillant [Mon, 23 Mar 2020 15:36:27 +0000 (16:36 +0100)]
Elligator script: alternate way to co-clear

6 years agoHave trim_scalar() copy its own buffer
Loup Vaillant [Mon, 23 Mar 2020 10:39:59 +0000 (11:39 +0100)]
Have trim_scalar() copy its own buffer

6 years agoCommented inverse square root
Loup Vaillant [Mon, 23 Mar 2020 10:32:53 +0000 (11:32 +0100)]
Commented inverse square root

6 years agoElligator script: simplified Montgomery ladder
Loup Vaillant [Sun, 22 Mar 2020 21:05:46 +0000 (22:05 +0100)]
Elligator script: simplified Montgomery ladder

6 years agoRenamed Elligator2 functions
Loup Vaillant [Sun, 22 Mar 2020 18:54:00 +0000 (19:54 +0100)]
Renamed Elligator2 functions

6 years agoSave more LOC with load/store routines
Loup Vaillant [Sun, 22 Mar 2020 18:38:07 +0000 (19:38 +0100)]
Save more LOC with load/store routines

6 years agoMore honest LOC count for scalarmult
Loup Vaillant [Sun, 22 Mar 2020 16:43:49 +0000 (17:43 +0100)]
More honest LOC count for scalarmult

6 years agoAdded ZERO helper to save some more lines
Loup Vaillant [Sun, 22 Mar 2020 16:27:35 +0000 (17:27 +0100)]
Added ZERO helper to save some more lines

6 years agoAdded COPY helper to save some LOC
Loup Vaillant [Sun, 22 Mar 2020 16:05:25 +0000 (17:05 +0100)]
Added COPY helper to save some LOC

Note: we generally copy bytes, maybe it could be a function...

6 years agoAdded scalar multiplication by inverse
Loup Vaillant [Sun, 22 Mar 2020 00:07:01 +0000 (01:07 +0100)]
Added scalar multiplication by inverse

6 years agoElligator script: added padding to test vectors
Loup Vaillant [Sat, 21 Mar 2020 12:18:48 +0000 (13:18 +0100)]
Elligator script: added padding to test vectors

So we properly test Monocypher ignores the padding

6 years agoElligator script: small refactor
Loup Vaillant [Sat, 21 Mar 2020 12:14:32 +0000 (13:14 +0100)]
Elligator script: small refactor

6 years agoAdded vectors from hash_to_curve RFC
Loup Vaillant [Sat, 21 Mar 2020 11:57:15 +0000 (12:57 +0100)]
Added vectors from hash_to_curve RFC

6 years agoElligator: take cofactor from secret key instead of tweak
Loup Vaillant [Wed, 18 Mar 2020 14:40:04 +0000 (15:40 +0100)]
Elligator: take cofactor from secret key instead of tweak

This allows the simplification of the implementation of higher level
interfaces.

The idea is, only the scalar and cofactor have any influence over
whether the inverse map succeeds or fail. This means that when it fails,
the padding & sign have not be used at all, and can be "reused" to
generate another random seed.

In practice, this means we can use Chacha20 or Blake2, or any hash that
outputs 64 random bytes from 32 random bytes, use 32 bytes to make an
attempt, then use the *other* 32 bytes to either generate more random
bytes (if we failed), or to use the tweak (if we succeed).

The tweak has also been modified to simplify the implementation. The
sign bit is now the least significant bit, and the padding bits are the
most significant bits. The computational savings are negligible, but
this allows neat micro-simplifications.

6 years agoAdded easy interface for Elligator
Loup Vaillant [Wed, 18 Mar 2020 11:27:31 +0000 (12:27 +0100)]
Added easy interface for Elligator

Note a small problem in the implementation: we are reusing one byte for
both the tweak and the next random seed.  This makes them *not*
independent, and a possible source of vulnerability.

In practice, this is only a problem for the 3 bits comprising the
cofactor, since the sign and the padding do not play a role in deciding
whether the mapping fails or succeeds.

TODO: take the cofactor from the clamped bits of the scalar, instead of
the tweak. This will ensure proper independence, while keeping the high
level code simple and maximally efficient.

6 years agoDon't try to re-generate test vectors upon release
Loup Vaillant [Tue, 17 Mar 2020 22:13:00 +0000 (23:13 +0100)]
Don't try to re-generate test vectors upon release

6 years agoIgnore the right release script
Loup Vaillant [Tue, 17 Mar 2020 22:12:14 +0000 (23:12 +0100)]
Ignore the right release script

6 years agoMinor bits & fixes
Loup Vaillant [Tue, 17 Mar 2020 07:40:37 +0000 (08:40 +0100)]
Minor bits & fixes

6 years agoCommented how clamping biases Elligator keys
Loup Vaillant [Mon, 16 Mar 2020 23:52:11 +0000 (00:52 +0100)]
Commented how clamping biases Elligator keys

6 years agoElligator/X25519 compatibility test
Loup Vaillant [Mon, 16 Mar 2020 22:42:16 +0000 (23:42 +0100)]
Elligator/X25519 compatibility test

6 years agoWhitespace nitpick
Loup Vaillant [Mon, 16 Mar 2020 22:41:31 +0000 (23:41 +0100)]
Whitespace nitpick

6 years agoElligator Script: fixed short test vectors
Loup Vaillant [Mon, 16 Mar 2020 21:01:15 +0000 (22:01 +0100)]
Elligator Script: fixed short test vectors

6 years agoOverlapping tests for Elligator2 (inverse)
Loup Vaillant [Mon, 16 Mar 2020 15:45:32 +0000 (16:45 +0100)]
Overlapping tests for Elligator2 (inverse)

6 years agoAdded Elligator2 inverse mapping
Loup Vaillant [Mon, 16 Mar 2020 12:13:06 +0000 (13:13 +0100)]
Added Elligator2 inverse mapping

6 years agoRemoved temporary to save some more stack
Loup Vaillant [Tue, 10 Mar 2020 07:18:05 +0000 (08:18 +0100)]
Removed temporary to save some more stack

6 years agoForgot to wipe a buffer
Loup Vaillant [Mon, 9 Mar 2020 23:05:53 +0000 (00:05 +0100)]
Forgot to wipe a buffer

6 years agoComment nitpick
Loup Vaillant [Mon, 9 Mar 2020 23:00:55 +0000 (00:00 +0100)]
Comment nitpick

6 years agoSeparated EdDSA parsing and negation
Loup Vaillant [Mon, 9 Mar 2020 22:54:39 +0000 (23:54 +0100)]
Separated EdDSA parsing and negation

The goal is to make the code easier to understand.  Merging parsing and
negation was clever, but it also was confusing.  Better not be clever.

The cost is 2 field negations. Arguably negligible.

6 years agoSimplified Edwards point parsing
Loup Vaillant [Mon, 9 Mar 2020 22:38:38 +0000 (23:38 +0100)]
Simplified Edwards point parsing

6 years agoElligator tests: overlapping I/O
Loup Vaillant [Mon, 9 Mar 2020 21:40:52 +0000 (22:40 +0100)]
Elligator tests: overlapping I/O

6 years agoElligator script: removed unused imports
Loup Vaillant [Mon, 9 Mar 2020 21:16:38 +0000 (22:16 +0100)]
Elligator script: removed unused imports

6 years agogit ignore __pycache__
Loup Vaillant [Mon, 9 Mar 2020 21:14:40 +0000 (22:14 +0100)]
git ignore __pycache__

6 years agoTypo, comment fe_isnegative()
Loup Vaillant [Mon, 9 Mar 2020 19:40:24 +0000 (20:40 +0100)]
Typo, comment fe_isnegative()

6 years agoElligator: fixed failure to ignore padding
Loup Vaillant [Mon, 9 Mar 2020 15:48:22 +0000 (16:48 +0100)]
Elligator: fixed failure to ignore padding

6 years agoAdded tests for Elligator direct mappings
Loup Vaillant [Mon, 9 Mar 2020 15:47:37 +0000 (16:47 +0100)]
Added tests for Elligator direct mappings

6 years agoFixed broken compilation
Loup Vaillant [Mon, 9 Mar 2020 15:09:53 +0000 (16:09 +0100)]
Fixed broken compilation

6 years agoElligator script: removed unnecessary temporary
Loup Vaillant [Mon, 9 Mar 2020 12:16:15 +0000 (13:16 +0100)]
Elligator script: removed unnecessary temporary

6 years agoAdded Elligator2 direct map
Loup Vaillant [Mon, 9 Mar 2020 11:33:39 +0000 (12:33 +0100)]
Added Elligator2 direct map

6 years agoMerge pull request #158 from fscoto/master+randombytes
Loup Vaillant [Mon, 2 Mar 2020 10:24:02 +0000 (11:24 +0100)]
Merge pull request #158 from fscoto/master+randombytes

Add random_bytes() to crypto_lock examples

6 years agocrypto_sign example: sign the *entire* message
Fabio Scotoni [Mon, 2 Mar 2020 08:53:09 +0000 (09:53 +0100)]
crypto_sign example: sign the *entire* message

6 years agoextract_examples.sh: warning cleanup
Fabio Scotoni [Mon, 2 Mar 2020 07:36:52 +0000 (08:36 +0100)]
extract_examples.sh: warning cleanup

1. Remove now-unused random_bytes().
2. "warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat]"
   "warning: empty struct is a GNU extension [-Wgnu-empty-struct]"
   clang -Weverything

6 years agoMerge branch 'master' into master+randombytes
Fabio Scotoni [Mon, 2 Mar 2020 07:35:42 +0000 (08:35 +0100)]
Merge branch 'master' into master+randombytes

6 years agocrypto_sha512 example overhaul
Fabio Scotoni [Mon, 2 Mar 2020 07:33:38 +0000 (08:33 +0100)]
crypto_sha512 example overhaul

Just gives it a message to hash, matching crypto_blake2b(3monocypher).
Nothing to randomize.

6 years agocrypto_hmac_sha512 example overhaul
Fabio Scotoni [Mon, 2 Mar 2020 07:28:18 +0000 (08:28 +0100)]
crypto_hmac_sha512 example overhaul

1. Randomize the key.
2. Key for HMAC is NOT optional.
3. Give it an actual example message to authenticate.

6 years agocrypto_x25519 example overhaul
Fabio Scotoni [Mon, 2 Mar 2020 07:21:31 +0000 (08:21 +0100)]
crypto_x25519 example overhaul

Just adds arc4random_buf().

6 years agocrypto_sign example overhaul
Fabio Scotoni [Mon, 2 Mar 2020 07:15:29 +0000 (08:15 +0100)]
crypto_sign example overhaul

1. Randomize key.
2. Give it an actual example message to sign.

6 years agocrypto_poly1305 example overhaul
Fabio Scotoni [Mon, 2 Mar 2020 07:08:37 +0000 (08:08 +0100)]
crypto_poly1305 example overhaul

1. Randomize key.
2. Give it an actual example message to MAC.

6 years agocrypto_key_exchange example overhaul
Fabio Scotoni [Mon, 2 Mar 2020 07:03:20 +0000 (08:03 +0100)]
crypto_key_exchange example overhaul

Just adds arc4random_buf().

6 years agocrypto_hchacha20 example overhaul
Fabio Scotoni [Mon, 2 Mar 2020 07:00:58 +0000 (08:00 +0100)]
crypto_hchacha20 example overhaul

Just adds arc4random_buf() for the key.

6 years agocrypto_chacha20 example overhaul
Fabio Scotoni [Mon, 2 Mar 2020 06:57:22 +0000 (07:57 +0100)]
crypto_chacha20 example overhaul

1. Randomize keys and nonces.
2. Minor alignment fix in second example.
3. Make i unsigned to avoid clang warning about 500-(i-64) changing
   signedness with -Weverything.
4. Initialize ctr to 0.
5. Fix obviously wrong encryption by jumping around example
   (repeating ctr issue [!], wrong function used in the example).

6 years agocrypto_blake2b example overhaul
Fabio Scotoni [Mon, 2 Mar 2020 06:41:02 +0000 (07:41 +0100)]
crypto_blake2b example overhaul

1. A key when "Computing a message authentication code" is NOT optional.
2. Randomize keys.

6 years agocrypto_argon2i example overhaul
Fabio Scotoni [Mon, 2 Mar 2020 06:34:14 +0000 (07:34 +0100)]
crypto_argon2i example overhaul

1. The common type for a password is char*; use a cast instead.
   C11, para. 6.5(7) suggests this will be largely okay.
2. Wipe the password on failure.
3. Initialize the password size while there.
   Does not use strlen(3) to avoid extra stdlib functions.
4. Branch on allocation failure.

6 years agoElligator script: clean up & comments
Loup Vaillant [Sun, 1 Mar 2020 21:50:39 +0000 (22:50 +0100)]
Elligator script: clean up & comments

6 years agoAnother attempt at crypto_lock example overhaul
Fabio Scotoni [Sun, 1 Mar 2020 11:40:43 +0000 (12:40 +0100)]
Another attempt at crypto_lock example overhaul