Isis Lovecruft
220c6c1d13
Merge remote-tracking branch 'hdevalence/feature/refactor-scalar-api' into develop
2017-11-26 04:15:04 +00:00
Isis Lovecruft
227acc117b
Whitespace fix.
2017-11-26 03:26:47 +00:00
Isis Lovecruft
7a0c0e9d0d
Change Debug for Scalar output to be valid Rust code.
2017-11-26 03:26:29 +00:00
Isis Lovecruft
87f93a5df2
Add to_bytes() convenience method for Scalar.
2017-11-26 03:23:31 +00:00
Isis Lovecruft
9a49263752
Add to_bytes() convenience method for CompressedRistretto points.
2017-11-26 03:22:28 +00:00
Isis Lovecruft
6e96e49eea
Merge remote-tracking branch 'hdevalence/feature/refactor-internal-code' into develop
2017-11-25 23:07:23 +00:00
Henry de Valence
f165b63ee9
Encode scalars canonically using Serde.
2017-11-23 12:29:46 -08:00
Henry de Valence
c1f6302879
Add a Scalar::from_bytes_canonical method
2017-11-23 12:29:46 -08:00
Henry de Valence
9855260bfd
Add a method to test if a Scalar is canonical
2017-11-23 12:29:46 -08:00
Henry de Valence
34639725d4
clean up reduction test
2017-11-23 12:29:46 -08:00
Henry de Valence
d32fe9772b
Ensure that all Scalars are bounded by 2^255.
...
This commit defines a Scalar to hold an integer representing an element of
Z/lZ. Applications like X/Ed25519 that care about the bit-patterns of the
scalars they use can set a specific bit-pattern using the `from_bits`
constructor. Applications that want to treat scalars as integers mod l can use
the `from_bytes_mod_order` constructor. Either way, the constructor ensures
that the integer representing each Scalar is bounded by 2^255 so that the high
bit is set. This means that any Scalar object is always safe to use for scalar
multiplication, while maintaining compatibility with both the Ristretto
use-case and the X/Ed25519 usecase.
2017-11-23 12:29:46 -08:00
Henry de Valence
d88f92276a
Add Scalar::reduce method
2017-11-21 11:28:25 -08:00
Henry de Valence
df182b79d0
Rename Scalar::reduce to Scalar::reduce_wide
...
This opens the `Scalar::reduce` name for reduction mod l.
2017-11-21 11:06:54 -08:00
Henry de Valence
033a90890c
Remove Scalar::{add, sub, mul} methods
2017-11-21 10:43:49 -08:00
Henry de Valence
e94c6f0a96
Make more Scalar methods pub(crate)
2017-11-20 16:45:30 -08:00
Henry de Valence
efe66b11b2
Add Makefile target for internal docs
2017-11-20 16:44:49 -08:00
Henry de Valence
3275d98d64
update makefile
2017-11-20 15:02:13 -08:00
Henry de Valence
2d69a8a7dc
Eliminate array_ref dependency
2017-11-20 14:53:08 -08:00
Isis Lovecruft
0d59f6e709
Merge remote-tracking branch 'chain/feature/refactor-32bit_r2' into develop
2017-11-18 00:40:07 +00:00
Henry de Valence
504a557b33
Hide UnpackedScalars
2017-11-17 15:51:29 -08:00
Henry de Valence
0cb70ae032
Hide the underlying ExtendedPoint from a Ristretto point
2017-11-17 15:50:58 -08:00
Henry de Valence
a9f8789524
hide unimplemented fns from docs
2017-11-17 15:50:04 -08:00
Henry de Valence
9fda4739d0
Hide fns using private types
2017-11-17 15:42:37 -08:00
Henry de Valence
78d9e70071
Move ExtendedPoint->MontgomeryPoint conversion to edwards.rs
...
Need to find a solution to the internal/external docs problem
2017-11-17 15:13:45 -08:00
Henry de Valence
2b0a4979b1
Fix indentation
2017-11-17 14:09:48 -08:00
Henry de Valence
8337a895d4
Only compress ExtendedPoints
2017-11-17 13:32:22 -08:00
Henry de Valence
7f52745770
Remove unused import
2017-11-16 20:11:18 -08:00
Isis Lovecruft
ea8bee28c4
Merge branch 'master' into develop
2017-11-17 01:35:10 +00:00
Isis Lovecruft
9b72359d17
Merge branch 'release/0.13.2'
2017-11-17 01:35:03 +00:00
Henry de Valence
8d0808a077
Split internal curve models into a private submodule
2017-11-16 17:34:28 -08:00
Henry de Valence
e196f8347c
Move 32/64-bit code into submodules in a backend module.
...
See the doc comment in `backend/mod.rs` for motivation on naming.
2017-11-16 16:07:55 -08:00
Henry de Valence
6ce7a4ee2d
Remove catchall 'utils' module
2017-11-16 12:13:13 -08:00
Henry de Valence
e4f5f23b8d
fixup! Merge branch 'optimzed_scalar_r1' into develop
2017-11-16 12:13:13 -08:00
Henry de Valence
207af566b9
Replace signed constants with unsigned constants
2017-11-16 12:13:13 -08:00
Henry de Valence
83e20b5387
cfg-gate all tests using precomputed tables
2017-11-16 12:13:13 -08:00
Henry de Valence
8952c7f476
initial work on rewriting 32bit arithmetic
2017-11-16 12:13:13 -08:00
Henry de Valence
399a9db478
Generate AFFINE_ODD_MULTIPLES_OF_BASEPOINT at compile time
2017-11-16 12:13:13 -08:00
Henry de Valence
e7387650f6
Remove warnings from build.rs
2017-11-16 12:13:13 -08:00
Henry de Valence
108a690941
First attempt at generating basepoint tables at compile time
2017-11-16 12:13:13 -08:00
Henry de Valence
b966f942a8
Impl Debug for EdwardsBasepointTable
2017-11-16 11:09:45 -08:00
Henry de Valence
6f5f0c51fd
Tweak Debug impls to produce Rust source
2017-11-16 11:09:32 -08:00
Isis Lovecruft
3de2bf0ddc
No idea how this XSS will work when the hash after "github.com-" changes.
2017-11-16 01:33:13 +00:00
Isis Lovecruft
f6f7059dbe
Avoid making a package with literally only one HTML file, lol.
2017-11-16 01:30:19 +00:00
Isis Lovecruft
a6806eacc3
Bump curve25519-dalek version to 0.13.2.
2017-11-16 01:18:46 +00:00
Isis Lovecruft
37a56bf2ba
Exclude .travis.yml from packages.
2017-11-16 01:13:57 +00:00
Isis Lovecruft
1b66c2de01
Include rustdoc-include-katex-header.html in package.
2017-11-16 01:13:30 +00:00
Isis Lovecruft
d9f1c3df55
Merge branch 'master' into develop
2017-11-16 01:01:51 +00:00
Isis Lovecruft
78a63397b9
Merge branch 'release/0.13.1'
2017-11-16 01:01:45 +00:00
Isis Lovecruft
d267a5c54b
Bump curve25519-dalek version to 0.13.1.
2017-11-16 01:00:29 +00:00
Isis Lovecruft
b40cf14351
Maybe this gets rustdoc to build with latex headers???
2017-11-16 00:59:36 +00:00