Commit graph

142 commits

Author SHA1 Message Date
Henry de Valence
122d4bb114
Merge pull request #61 from dalek-cryptography/clarify-ephemeral-static
Clarify Ephemeral/StaticSecret docs.
2020-08-17 19:33:45 -07:00
Henry de Valence
fb92cd82da Clarify Ephemeral/StaticSecret docs.
Also does a pass through the docs converting `TypeNames` to Rustdoc links, and
making sure that all the items have consistent summaries.

Closes #58
Closes $56
2020-08-17 19:25:12 -07:00
Henry de Valence
736f8dd313
Merge pull request #60 from dalek-cryptography/remove-rand-os-example
Remove rand os example
2020-08-17 19:22:21 -07:00
Henry de Valence
5d245dcefa
Merge pull request #43 from peat/master
Add .to_bytes() to PublicKey, SharedSecret
2020-08-17 18:55:18 -07:00
Henry de Valence
8287798aa1 Update doc examples to remove deprecated code and restore testing.
Closes #59.

The doc examples have code interspersed with text explaining the API.  Because
each doctest executes independently, when these code examples are run as
doctests, they have to include parts of the previous examples with # lines.
These lines are hidden from Rustdoc output and do not appear in the rendered
docs, but they do appear when viewing the README.md on Github.

In order to hide these on Github, the code blocks were made non-executable,
with their content moved to a unit test.  However, this meant that the example
API usage was not tested, and so when the unit test was updated to remove the
deprecated `rand_os`, there was no check that the examples stayed in sync with
the test, causing #59.  To prevent this from reocurring in the future, go back
to executable tests of the API examples.
2020-08-17 18:47:31 -07:00
Henry de Valence
5d91bd8f22 Make bound on csprng more general.
`rand_core` defines a blanket impl of `RngCore + CryptoRng` for `&mut T` where
`T: RngCore + CryptoRng`, so rather than requiring a borrowed RNG, it's better
to require an owned RNG, as this allows passing either owned or borrowed
values.  In particular, this makes `OsRng` usage much more ergonomic, because
the caller is not forced to do `&mut OsRng` on the zero-sized struct.
2020-08-17 18:44:48 -07:00
Henry de Valence
5115951681
Merge pull request #55 from huitseeker/bump-criterion
Bump criterion version
2020-03-06 09:10:35 -08:00
François Garillot
be420d4ffc
Bump criterion version 2020-03-04 22:35:33 -05:00
Henry de Valence
ebb4981232
Merge pull request #54 from tarcieri/readme/crypto_box
README.md: Add "See also" section with link to `crypto_box` crate
2020-02-25 13:30:39 -08:00
Tony Arcieri
bdc6412faa README.md: Add "See also" section with link to crypto_box crate
The `crypto_box` crate provides a pure Rust implementation of the
public-key authenticated encryption primitive from NaCl which combines
X25519 + XSalsa20Poly1305 (a.k.a. "Curve25519XSalsa20Poly1305")

This commit adds a link to it case x25519-dalek users are interested in
using it as part of a hybrid cryptosystem.
2020-02-25 12:14:41 -08:00
Henry de Valence
52050e4e10 Merge branch 'master' into develop 2019-11-26 14:05:18 -08:00
Henry de Valence
ecd6be6748 Merge branch 'release/0.6' 2019-11-26 14:05:10 -08:00
Henry de Valence
d9c7f2814e Bump version to 0.6.0 and update CHANGELOG. 2019-11-26 14:03:08 -08:00
Henry de Valence
d588e2fd18
Merge pull request #52 from DebugSteven/bump-rand
Bump rand_core Version
2019-11-26 13:56:19 -08:00
DebugSteven
be82bcb15b update rand_core version
Co-authored-by: Greg <gregory.mkv@gmail.com>
2019-11-26 14:28:34 -07:00
Henry de Valence
b651a5e7ca
Merge pull request #39 from DebugSteven/zeroize
Use zeroize crate
2019-11-26 12:52:36 -08:00
DebugSteven
de5d79388b use zeroize instead of clear_on_drop 2019-11-26 13:44:50 -07:00
J Haigh
e2537185ac
Merge pull request #48 from DebugSteven/serde-support
support for serde serialize and deserialize
2019-11-11 17:33:59 -05:00
DebugSteven
0c3981d87a support for serde serialize and deserialize 2019-11-11 10:46:28 -05:00
Henry de Valence
7af85b8e4b
Merge pull request #49 from dalek-cryptography/rust-2018
Use 2018 edition
2019-10-24 15:57:41 -07:00
Henry de Valence
9c3d6921d0 Use 2018 edition 2019-10-24 15:44:57 -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
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
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
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
Isis Lovecruft
78b46c4abe
Bump x25519-dalek version to 0.5.1. 2019-02-27 23:36:29 +00:00
Isis Lovecruft
ea2f39afa5
Ignore doctests since they were moved to actual tests. 2019-02-27 22:01:43 +00:00
Isis Lovecruft
23e61b7063
Merge remote-tracking branch 'rozbb/master' into develop 2019-02-27 21:51:37 +00:00
Isis Lovecruft
60f276db72
Fix README examples and doctests. 2019-02-27 20:45:55 +00:00
Michael Rosenberg
2a58e35b23
PublicKey now derives Copy, Clone, Debug 2019-02-27 12:40:14 -05:00
Henry de Valence
2ffd916dc7
Merge pull request #36 from DebugSteven/the-number-5
Doc version bump to 0.5
2019-02-16 17:56:26 -08:00
DebugSteven
ad8dd8430b bump installation version to 0.5 in docs 2019-02-16 18:46:11 -07:00
Henry de Valence
b57cdba0a3 Merge branch 'master' into develop 2019-02-16 13:47:28 -08:00
Henry de Valence
34676d3360 Merge branch 'release/0.5.0' 2019-02-16 13:47:14 -08:00
Henry de Valence
ebdd71b54b Bump version to 0.5.0 2019-02-16 13:46:06 -08:00
Henry de Valence
724c929130
Merge pull request #35 from DebugSteven/staticsecret
Static secret keys
2019-02-16 13:38:47 -08:00
Henry de Valence
aee783ae82
use clamp_scalar for StaticSecret
This ensures that the `StaticSecret`'s scalar always has the X25519 bit-twiddles applied.

Co-Authored-By: DebugSteven <debugsteven@gmail.com>
2019-02-16 16:31:05 -05:00
Henry de Valence
bcea24308f Fix benchmark 2019-02-16 10:17:15 -08:00
Henry de Valence
e25c72b476 Update README tests and ensure they're run in Travis. 2019-02-16 10:13:39 -08:00
DebugSteven
6797c0969f summarize how types are used & how they relate to one another 2019-02-16 10:57:42 -07:00
DebugSteven
29edaa17ac informative doc comments 2019-02-16 10:22:06 -07:00
DebugSteven
ad670a4d03 methods to convert a StaticSecret to and from bytes 2019-02-16 09:42:56 -07:00
DebugSteven
4caffdcca0 impl StaticSecret & create DH method that borrows our StaticSecret 2019-02-16 09:14:43 -07:00
DebugSteven
9fe535dcc7 rename EphemeralPublic to PublicKey 2019-02-16 08:57:09 -07:00