Commit graph

65 commits

Author SHA1 Message Date
isis agora lovecruft
254e43debf
Merge pull request #78 from isislovecruft/feature/contributory-behaviour-check
Implement optional contributory behaviour check
2021-09-14 20:13:24 +00:00
Isis Lovecruft
91babd286f
Add a #[must_use] to the was_contributory check. 2021-09-14 19:51:02 +00:00
Isis Lovecruft
18323afd63
Bisect to determine MSRV. 2021-09-13 23:44:57 +00:00
Isis Lovecruft
a32a92798a
Get rid of the include_str!() docs to support earlier MSRVs. 2021-09-13 22:37:52 +00:00
Isis Lovecruft
c13e102f95
Implement optional check for contributory behaviour. 2021-09-13 21:31:54 +00:00
isis agora lovecruft
7af25420ec
Merge pull request #76 from decentriq/main
feature(external_doc) -> doc = include_str
2021-09-13 21:31:17 +00:00
exfalso
ee2500db75 feature(external_doc) -> doc = include_str 2021-08-17 09:49:02 +02:00
Isis Lovecruft
2333b52698
Move tests to a separate directory. 2021-04-14 19:45:36 +00:00
Isis Lovecruft
9e387372e6
Remove unused import from test suite. 2021-04-14 19:33:11 +00:00
Isis Lovecruft
0cca7977fc
Derive Zeroize for PublicKey. 2021-04-14 19:29:09 +00:00
Isis Lovecruft
fc945778ab
Fixups for doctest from #33. 2021-04-14 05:05:54 +00:00
Isis Lovecruft
cdd97559de
Merge remote-tracking branch 'zer0x64/master' into develop 2021-04-14 04:55:59 +00:00
Isis Lovecruft
f616c8b2c5
Update CHANGELOG and README; bump version to 1.1.1. 2021-04-14 04:38:37 +00:00
Isis Lovecruft
1c39ff92e0
Update copyright years. 2021-04-14 04:32:20 +00:00
Henry de Valence
e8615a9326 bump version to 1.1.0 and update CHANGELOG 2020-08-31 12:56:34 -07:00
Jack Michaud
3c09664112 Feedback from @hdevalence - Added derive for Eq and Hash 2020-08-31 12:15:43 -07:00
Jack Michaud
48df927d7b Add PartialEq derive to PublicKey
Derives from the PartialEq impl for MontgomeryPoint
2020-08-30 17:41:54 -07:00
Henry de Valence
af6d5bd5bf Bump version to 1.0.1 2020-08-17 20:37:20 -07:00
Henry de Valence
1b01d597ca Bump version to 1.0.0 and update CHANGELOG.md 2020-08-17 19:43:22 -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
DebugSteven
be82bcb15b update rand_core version
Co-authored-by: Greg <gregory.mkv@gmail.com>
2019-11-26 14:28:34 -07:00
DebugSteven
de5d79388b use zeroize instead of clear_on_drop 2019-11-26 13:44:50 -07:00
DebugSteven
0c3981d87a support for serde serialize and deserialize 2019-11-11 10:46:28 -05: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
Bodo Junglas
0f187b4670
Ensure that all data of StaticSecret is cleared on drop 2019-04-12 08:34:41 +02:00
Michael Rosenberg
935f6e8e35
Made StaticSecret cloneable 2019-03-22 12:50:55 -04: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
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
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
Philippe Dugre
1d23a1d30d Added doc example for x25519() 2019-01-25 17:08:48 -05:00
Henry de Valence
1117184a02 Add EphemeralPublic::as_bytes 2019-01-22 14:11:44 -08:00
Henry de Valence
dd8b61da4a Add an X25519 basepoint constant 2019-01-15 21:44:56 -08:00
Isis Lovecruft
53ba2f3bcc
Merge remote-tracking branch 'newpavlov/rand_os' into release/0.4.0 2019-01-16 01:29:46 +00:00
Isis Lovecruft
c9a1ef6a36
Credit @DebugSteven as an author. 2019-01-12 23:34:49 +00:00
Henry de Valence
b8716bb82b Pull source docs from README 2019-01-10 10:30:30 -08:00
Артём Павлов [Artyom Pavlov]
5dcc1c17da use rand_os instead of rand 2019-01-05 16:17:05 +03:00
DebugSteven
d3b7ccf030 byte-oriented x25519 function 2018-12-16 11:30:32 -07:00
DebugSteven
ff0e1f286b From<[u8; 32]> for Ephemeral Public, fix to benches 2018-12-07 17:51:08 -05:00
DebugSteven
8730bfbba6 move implementation of x25519 into diffie_hellman 2018-12-07 17:07:24 -05:00