summaryrefslogtreecommitdiff
path: root/src/ext/ed25519/ref10
AgeCommit message (Collapse)Author
2020-01-28Use print() function in both Python 2 and Python 3cclauss
2019-12-12src/ext: Add __future__ imports for python 3 compatibilityteor
Closes ticket 32732.
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-04-06refactor: Remove unnecessary `#include "crypto.h"` throughout codebase.Isis Lovecruft
* FIXES part of #24658: https://bugs.torproject.org/24658
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2018-02-03Include crypto_digest.h in order to solve dependency issues.Fernando Fernandez Mancera
Included crypto_digest.h in some files in order to solve xof+digest module dependency issues. Removed crypto.h where it isn't needed anymore. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2017-08-08Don't double hash the ed25519 blind key parameter.George Kadianakis
We used to do: h = H(BLIND_STRING | H(A | s | B | N ) when we should be doing: h = H(BLIND_STRING | A | s | B | N) Change the logic so that hs_common.c does the hashing, and our ed25519 libraries just receive the hashed parameter ready-made. That's easier than doing the hashing on the ed25519 libraries, since that means we would have to pass them a variable-length param (depending on whether 's' is set or not). Also fix the ed25519 test vectors since they were also double hashing.
2017-06-28ed25519: Also check that retval in the ref10 implementation.George Kadianakis
2017-06-27ed25519: Add func that checks for torsion component in pubkeys.George Kadianakis
See https://lists.torproject.org/pipermail/tor-dev/2017-April/012213.html .
2017-04-07Use DIGEST512_LEN macro in crypto_hash_sha512.h in ref10Nick Mathewson
2017-03-31Make our ed25519 implementations no longer use openssl directly.Nick Mathewson
2016-09-11Merge remote-tracking branch 'public/solaris_warnings_028'Nick Mathewson
2016-07-28Fix a large pile of solaris warnings for bug 19767.Nick Mathewson
In nearly all cases, this is a matter of making sure that we include orconfig.h before we include any standard c headers.
2016-04-15Disambiguate: Avoid defining two static functions both called gettweak()Nick Mathewson
2015-12-08Always hash crypto_strongest_rand() along with some prngNick Mathewson
(before using it for anything besides feeding the PRNG) Part of #17694
2014-09-28Stop ed25519 8-bit signed left shift overflowingteor
Standardise usage in ge_scalarmult_base.c for 1 new fix.
2014-09-28Use SHL{8,32,64} in ed25519/ref10 to avoid left-shifting negative valuesNick Mathewson
This helps us avoid undefined behavior. It's based on a patch from teor, except that I wrote a perl script to regenerate the patch: #!/usr/bin/perl -p -w -i BEGIN { %vartypes = (); } if (/^[{}]/) { %vartypes = (); } if (/^ *crypto_int(\d+) +([a-zA-Z_][_a-zA-Z0-9]*)/) { $vartypes{$2} = $1; } elsif (/^ *(?:signed +)char +([a-zA-Z_][_a-zA-Z0-9]*)/) { $vartypes{$1} = '8'; } # This fixes at most one shift per line. But that's all the code does. if (/([a-zA-Z_][a-zA-Z_0-9]*) *<< *(\d+)/) { $v = $1; if (exists $vartypes{$v}) { s/$v *<< *(\d+)/SHL$vartypes{$v}($v,$1)/; } } # remove extra parenthesis s/\(SHL64\((.*)\)\)/SHL64\($1\)/; s/\(SHL32\((.*)\)\)/SHL32\($1\)/; s/\(SHL8\((.*)\)\)/SHL8\($1\)/;
2014-09-28Stop signed left shifts overflowing in ed25519: Macrosteor
The macros let us use unsigned types for potentially overflowing left shifts. Create SHL32() and SHL64() and SHL8() macros for convenience.
2014-09-26Comment-out dead code in ed25519/ref10Nick Mathewson
There are some loops of the form for (i=1;i<1;++i) ... And of course, if the loop index is initialized to 1, it will never be less than 1, and the loop body will never be executed. This upsets coverity. Patch fixes CID 1221543 and 1221542
2014-09-25Fix warnings on 32-bit builds.Nick Mathewson
When size_t is the most memory you can have, make sure that things referring to real parts of memory are size_t, not uint64_t or off_t. But not on any released Tor.
2014-09-25Comments and tweaks based on review by asnNick Mathewson
Add some documentation Rename "derive" -> "blind" Check for failure on randombytes().
2014-09-25More documentation for ed25519 stuff.Nick Mathewson
2014-09-25Fix linux compilation of ed25519_ref10Nick Mathewson
Our integer-definition headers apparently suck in a definition for select(2), which interferes with the select() in ge_scalarmult_base.c
2014-09-25Draft implementation for ed25519 key blinding, as in prop224Nick Mathewson
This implementation allows somebody to add a blinding factor to a secret key, and a corresponding blinding factor to the public key. Robert Ransom came up with this idea, I believe. Nick Hopper proved a scheme like this secure. The bugs are my own.
2014-09-25Add curve25519->ed25519 key conversion per proposal 228Nick Mathewson
For proposal 228, we need to cross-certify our identity with our curve25519 key, so that we can prove at descriptor-generation time that we own that key. But how can we sign something with a key that is only for doing Diffie-Hellman? By converting it to the corresponding ed25519 point. See the ALL-CAPS warning in the documentation. According to djb (IIUC), it is safe to use these keys in the ways that ntor and prop228 are using them, but it might not be safe if we start providing crazy oracle access. (Unit tests included. What kind of a monster do you take me for?)
2014-09-25Another ed25519 tweak: store secret keys in expanded formatNick Mathewson
This will be needed/helpful for the key blinding of prop224, I believe.
2014-09-25Fix API for ed25519_ref10_open()Nick Mathewson
This is another case where DJB likes sticking the whole signature prepended to the message, and I don't think that's the hottest idea. The unit tests still pass.
2014-09-25Tweak ed25519 ref10 signing interface to use less space.Nick Mathewson
Unit tests still pass.
2014-09-25Tweak ref10 keygen APIs to be more sane.Nick Mathewson
2014-08-26ed25519_ref10: use uint64_t and int64_t, not long longNick Mathewson
2014-08-26Add headers as needed to make ed25519_ref10 compile.Nick Mathewson
2014-08-26Add some explicit casts as needed to make ed25519_ref10 compileNick Mathewson
Apparently, ref10 likes implicit conversions from int64 to int32 more than our warnings do.
2014-08-26Add the ed25519 ref10 code verbatim from supercop-20140622Nick Mathewson
We might use libsodium or ed25519-donna later on, but for now, let's see whether this is fast enough. We should use it in all cases when performance doesn't matter.