Henry de Valence
389d2bc9e2
Ensure Pippenger works on manually-constructed extremal values.
...
When using Scalar::from_bits to manually create unreduced Scalars (e.g.,
X/Ed25519 keys with specified bit patterns), it's possible to construct Scalar
values that range up to 2^255-1. These shouldn't ever end up in a vartime
multiscalar mul call anyways, because it doesn't handle secret data, but it is
technically allowed by the type system and should be handled. When w=8, these
can generate terminal carries that can't be folded into the last digit, but
this can be handled by folding them into an extra digit instead.
2019-06-05 23:03:07 -07:00
Henry de Valence
5f1d73bca0
Fix a negate-with-overflow edgecase by widening before computation.
...
This fixes a bug in the Pippenger implementation reported by Fernando Krell and
diagnosed by Oleg Andreev. The problem is that at the largest problem sizes
(using w=8), the signed digits fill the value range of an i8, and so doing
computation on them to calculate the bucket index can hit an overflow.
This was not caught in CI because the test suite didn't check all problem
sizes; tests for these sizes which expose this bug were added in the previous
commit.
2019-06-05 20:59:07 -07:00
Henry de Valence
6fe93564cd
Add a more comprehensive random multiscalar test.
...
This exercises the constant- and variable- time code at large sizes, to hit
every path of Straus/Pippenger.
2019-06-05 20:54:00 -07:00
Peat Bakke
1d61e1ba46
Add .to_bytes() to PublicKey, so that it has similar capabilities to the ed25519 PublicKey impl. Also to SharedSecret for consistency.
2019-06-05 12:20:02 -07:00
Henry de Valence
c159bd4b07
Merge branch 'master' into develop
2019-06-04 15:28:12 -07:00
Henry de Valence
22ce43f971
Merge branch 'release/1.2.0'
2019-06-04 15:28:02 -07:00
Henry de Valence
62fbd6ab63
Update version to 1.2.0
2019-06-04 15:27:12 -07:00
Henry de Valence
c084def3a3
Merge pull request #249 from oleganza/oleg/pippenger2
...
Pippenger multiscalar multiplication algorithm
2019-06-04 15:13:41 -07:00
Henry de Valence
19dcd62053
Add reference to 2012/549
2019-06-04 13:41:43 -07:00
Henry de Valence
5921d6d2ac
Replace std::iter with core::iter
2019-06-04 13:36:07 -07:00
isis agora lovecruft
33f21a9f34
Merge pull request #255 from xoloki/no-std-optional-serde
...
Turn off default serde features but keep it as an optional dependency
2019-06-04 19:39:30 +00:00
Joey Yandle
fd69503a40
turn off default serde features but keep it optional
2019-06-03 15:29:08 -07:00
Henry de Valence
baaeed23fc
Merge pull request #251 from fabric-and-ink/quench-warning
...
Quench snake case warning
2019-05-26 20:35:27 -07:00
Fabian Drinck
29dca772a9
Quench snake case warning
2019-05-26 13:03:40 +02:00
Oleg Andreev
eb82a9d8b6
Update src/backend/serial/scalar_mul/pippenger.rs
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2019-05-24 18:00:34 -05:00
Oleg Andreev
9836d6622c
cleaner name per Henry’s suggestion
2019-05-24 12:18:10 -07:00
Oleg Andreev
ca2926ac89
use one buffer instead of two
2019-05-22 11:48:30 -07:00
Henry de Valence
dfcac0d8e2
rustfmt and copyright fixes
2019-05-22 11:38:52 -07:00
Oleg Andreev
7fba2a1bcc
avoid unnecessary allocation
2019-05-22 11:14:26 -07:00
Oleg Andreev
df745e98a2
oops - forgot to switch on pippenger
2019-05-21 14:10:56 -07:00
Oleg Andreev
33b41ac10d
fix type conversions
2019-05-21 13:48:29 -07:00
Oleg Andreev
42648aa460
cgs
2019-05-21 13:32:50 -07:00
Oleg Andreev
b52c2053c1
new pippenger radix 6/7/8 implementation
2019-05-21 12:35:58 -07:00
Henry de Valence
e726147af8
Merge pull request #245 from dalek-cryptography/optimize-variable-base
...
Save 2.5% on variable-base scmul by squeezing some multiplications.
2019-05-21 08:52:53 -07:00
Henry de Valence
23ca520ac2
Merge pull request #226 from ebfull/faster-equality
...
Check the equality of `EdwardsPoint`s in the projective coordinates
2019-05-21 08:50:32 -07:00
Henry de Valence
6503378fef
Save 2.5% on variable-base scmul by squeezing some multiplications.
...
This saves 4 point doublings by unwrapping the first loop iteration,
as well as 63 field multiplications (one per iteration) by managing
curve model choice explicitly.
2019-05-08 21:04:13 -07:00
Henry de Valence
076f32686f
Merge branch 'master' into develop
2019-05-06 19:11:24 -07:00
Henry de Valence
f630041af2
Merge branch 'release/1.1.4'
2019-05-06 19:11:12 -07:00
Henry de Valence
ea9d7411d5
Bump version to 1.1.4
2019-05-06 19:09:04 -07:00
Henry de Valence
8f02cf5bf8
Merge pull request #244 from dalek-cryptography/fix-typo
...
Suppress a generated <br> which breaks KaTeX.
2019-05-06 19:04:01 -07:00
Henry de Valence
b52c7ddafe
Suppress a generated <br> which breaks KaTeX.
2019-05-06 15:18:16 -07:00
Henry de Valence
1cc37a1eda
Merge pull request #41 from untoldwind/master
...
Ensure that all data of StaticSecret is cleared on drop
2019-04-23 10:08:40 -07:00
Bodo Junglas
0f187b4670
Ensure that all data of StaticSecret is cleared on drop
2019-04-12 08:34:41 +02:00
Henry de Valence
e1c56cbf8e
Merge pull request #241 from markblunk/feature/torsion-doc-fix
...
fix typo in torsion documentation
2019-04-02 14:04:11 -07:00
Mark Blunk
50f46c7685
fix typo in torsion documentation
2019-04-02 14:33:27 -06:00
Isis Lovecruft
d31df0aaa8
Remove sha2 dep; limit rand depends; fixes after PR#68 merge.
...
* ADD new "batch" feature for feature-gating ed25519 batch verification; off by
default. The "batch" feature is the only thing which depends on all of the
`rand` crate, since it requires the functionality of `rand::thread_rng()`.
Without batch verification, the rest of ed25519-dalek only depends on
`rand_os` and `rand_core`.
2019-04-02 01:46:23 +00:00
Henry de Valence
9a637d48d4
Merge branch 'master' into develop
2019-03-29 12:56:21 -07:00
Henry de Valence
9567e021c5
Merge branch 'release/0.5.2'
2019-03-29 12:56:08 -07:00
Henry de Valence
89c58a991b
Bump version, add changelog entries
2019-03-29 12:53:43 -07:00
Henry de Valence
9aa1b8bd4d
Merge pull request #40 from rozbb/master
...
Made StaticSecret cloneable
2019-03-22 10:23:08 -07:00
Michael Rosenberg
935f6e8e35
Made StaticSecret cloneable
2019-03-22 12:50:55 -04:00
Henry de Valence
1a3da32e97
Merge pull request #239 from dpc/patch-1
...
Remove unnecessary trait bound
2019-03-20 23:43:05 -07:00
Dawid Ciężarkiewicz
f612dd9dfa
Remove unnecessary trait bound
2019-03-20 20:30:58 -07:00
Isis Lovecruft
1bec256418
Merge remote-tracking branch 'newpavlov/rand_core' into develop
2019-03-12 22:22:19 +00:00
Isis Lovecruft
43baaaf279
Also test the alloc features on Travis.
2019-03-12 21:12:47 +00:00
Isis Lovecruft
a6e0019ae4
Merge remote-tracking branch 'nickray/towards-no-std' into develop
2019-03-12 21:11:09 +00:00
Isis Lovecruft
1edc2965ad
Fix typo in README.
2019-03-12 20:52:34 +00:00
DebugSteven
ba389040de
implement Zeroize for Scalar and MontgomeryPoint
2019-03-03 17:09:34 -07:00
Isis Lovecruft
daf86298c6
Merge branch 'master' into develop
2019-02-28 22:45:11 +00:00
Isis Lovecruft
45bc970eec
Merge branch 'release/0.5.1'
2019-02-28 22:45:02 +00:00