Compare commits

...

50 Commits
v0.2.0 ... main

Author SHA1 Message Date
dependabot[bot] 55dc5504ef Bump actions/checkout from 3.0.0 to 3.0.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.0 to 3.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.0...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 07:42:55 -04:00
dependabot[bot] 03543411df Bump codecov/codecov-action from 3.0.0 to 3.1.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 07:40:52 -04:00
dependabot[bot] 180f76c33b Bump codecov/codecov-action from 2.1.0 to 3.0.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2.1.0...v3.0.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-21 22:21:28 -04:00
dependabot[bot] 00dfdebcab
Bump actions/checkout from 2.4.0 to 3 (#61)
* Bump actions/checkout from 2.4.0 to 3

Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* full semver

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-03-16 21:01:39 -04:00
dependabot[bot] 5f1f6ec186 Bump actions/checkout from 2.3.5 to 2.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-07 22:59:18 -05:00
dependabot[bot] 8e2971ee2d Bump actions/checkout from 2.3.4 to 2.3.5
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-19 15:05:09 -04:00
dependabot[bot] 578f86f5f0 Bump codecov/codecov-action from 2.0.3 to 2.1.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.3 to 2.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2.0.3...v2.1.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-15 11:20:06 -04:00
dependabot[bot] 43245bb32f Bump codecov/codecov-action from 1.5.2 to 2.0.3
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1.5.2 to 2.0.3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.5.2...v2.0.3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-26 18:49:34 -04:00
Deirdre Connolly 21868fdcf8 Add codecov.yml 2021-06-11 21:32:47 -04:00
Deirdre Connolly cc93deb133 Try cargo-llvm-cov 2021-06-11 19:59:29 -04:00
Deirdre Connolly ea3047d939 Pin tarpaulin 0.16.0 2021-06-11 18:11:42 -04:00
Deirdre Connolly b56a31866f Nightly tarpaulin 2021-06-11 18:11:42 -04:00
Deirdre Connolly 4769fbe900 Go back to tarpaulin-based coverage 2021-06-11 18:11:42 -04:00
Deirdre Connolly 09333f6407 Try json coverage 2021-06-11 18:11:42 -04:00
Deirdre Connolly 7927fbfb0a cargo test --all-features 2021-06-11 18:11:42 -04:00
Deirdre Connolly 0f0e2cff33 Switch to unstable source-based code coverage 2021-06-11 18:11:42 -04:00
Deirdre Connolly 6b1d1db752 cargo component clippy for nightly for clippy-check 2021-06-11 18:11:42 -04:00
Deirdre Connolly c9aeb16549 Nightly 2021-06-11 18:11:42 -04:00
Deirdre Connolly 4360ff8595 Use nightly clippy 2021-06-11 18:11:42 -04:00
Deirdre Connolly ecf327eff0 Stop using deprecated external_doc, use doc = include_str macro 2021-06-11 18:11:42 -04:00
dependabot[bot] 21cb1cb743 Bump actions-rs/toolchain from 1 to 1.0.7
Bumps [actions-rs/toolchain](https://github.com/actions-rs/toolchain) from 1 to 1.0.7.
- [Release notes](https://github.com/actions-rs/toolchain/releases)
- [Changelog](https://github.com/actions-rs/toolchain/blob/master/CHANGELOG.md)
- [Commits](https://github.com/actions-rs/toolchain/compare/v1...v1.0.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 11:00:52 -04:00
dependabot[bot] a323173e23 Bump codecov/codecov-action from v1.4.1 to v1.5.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.4.1 to v1.5.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.4.1...a1ed4b322b4b38cb846afb5a0ebfa17086917d27)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-07 10:28:59 -04:00
dependabot[bot] 149da3a4ad Bump codecov/codecov-action from v1.3.2 to v1.4.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.3.2 to v1.4.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.3.2...967e2b38a85a62bd61be5529ada27ebc109948c2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-21 09:30:30 -04:00
dependabot[bot] b38b214cde Bump codecov/codecov-action from v1.3.1 to v1.3.2
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.3.1 to v1.3.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.3.1...9b0b9bbe2c64e9ed41413180dd7398450dfeee14)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-10 09:09:06 -04:00
dependabot[bot] 28ecb3657f Bump codecov/codecov-action from v1.2.2 to v1.3.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.2.2 to v1.3.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.2.2...fcebab03f26c7530a22baa63f06b3e0515f0c7cd)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-17 22:24:59 -04:00
dependabot[bot] fd109ebe91 Bump codecov/codecov-action from v1.2.1 to v1.2.2
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.2.1 to v1.2.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.2.1...1f8f3abcccf7960749744fd13547965f0e7d1bdd)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-13 01:17:03 -05:00
dependabot[bot] 82b3d61c08 Update proptest requirement from 0.10 to 1.0
Updates the requirements on [proptest](https://github.com/altsysrq/proptest) to permit the latest version.
- [Release notes](https://github.com/altsysrq/proptest/releases)
- [Changelog](https://github.com/AltSysrq/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/altsysrq/proptest/compare/0.10.0...1.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-25 06:08:48 -05:00
dependabot[bot] 5154a9955a Update proptest-derive requirement from 0.2.0 to 0.3.0
Updates the requirements on [proptest-derive](https://github.com/AltSysrq/proptest) to permit the latest version.
- [Release notes](https://github.com/AltSysrq/proptest/releases)
- [Changelog](https://github.com/AltSysrq/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/AltSysrq/proptest/compare/proptest-derive-0.2.0...proptest-derive-0.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-23 12:15:32 -05:00
dependabot[bot] 483c7cf302 Bump codecov/codecov-action from v1.2.0 to v1.2.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.2.0 to v1.2.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.2.0...e156083f13aff6830c92fc5faa23505779fbf649)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-15 18:20:17 -05:00
dependabot[bot] 2daceab266 Bump codecov/codecov-action from v1.1.0 to v1.2.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.1.0 to v1.2.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.1.0...a92c414703a4bba586f6df7fcc885c9d0bdff772)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 23:11:59 -05:00
dependabot[bot] 010d2565ac Bump codecov/codecov-action from v1.0.15 to v1.1.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.15 to v1.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.15...7de43a7373de21874ae196a78f8eb633fcf7f0c4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 23:24:46 -05:00
dependabot[bot] d2b7b8f8ab Bump codecov/codecov-action from v1.0.14 to v1.0.15
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.14 to v1.0.15.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.14...239febf655bba88b16ff5dea1d3135ea8663a1f9)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-17 11:35:27 -05:00
dependabot[bot] 2227dc8be6 Bump actions/checkout from v2.3.3 to v2.3.4
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.3 to v2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.3...5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-04 19:15:33 -05:00
dependabot[bot] 03bfd3e6d0 Bump codecov/codecov-action from v1.0.13 to v1.0.14
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.13 to v1.0.14.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.13...7d5dfa54903bd909319c580a00535b483d1efcf3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-19 11:01:58 -04:00
dependabot[bot] 58bc531c87 Bump actions/checkout from v2.3.2 to v2.3.3
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.2 to v2.3.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.2...a81bbbf8298c0fa03ea29cdc473d45769f953675)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-24 22:15:33 -04:00
dependabot[bot] 86bf80a88c Update curve25519-dalek requirement from 2.0.0 to 3.0.0
Updates the requirements on [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) to permit the latest version.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases)
- [Changelog](https://github.com/dalek-cryptography/curve25519-dalek/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/2.0.0...3.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-03 10:16:46 -04:00
dependabot[bot] 545469b961 Bump codecov/codecov-action from v1.0.12 to v1.0.13
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.12 to v1.0.13.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.12...6004246f47ab62d32be025ce173b241cd84ac58e)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-02 15:13:10 -04:00
dependabot[bot] 415caf4817 Bump actions/checkout from v2.3.1 to v2.3.2
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.1 to v2.3.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.1...2036a08e25fa78bbd946711a407b529a0a1204bf)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-16 20:27:15 -04:00
dependabot[bot] 268cfc5c37 Bump codecov/codecov-action from v1.0.11 to v1.0.12
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.11 to v1.0.12.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.11...07127fde53bc3ccd346d47ab2f14c390161ad108)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-23 11:52:19 -04:00
dependabot[bot] bdbbe825fa Bump codecov/codecov-action from v1.0.10 to v1.0.11
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.10 to v1.0.11.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.10...6d208f5b527841fb050f92f778e86cb808dacdcb)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-21 11:57:18 -04:00
dependabot[bot] 78f712d28b Bump codecov/codecov-action from v1.0.7 to v1.0.10
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.7 to v1.0.10.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.7...f3570723ef743f6942b6a480461ed0cd6c0f9baa)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-02 06:40:48 -04:00
dependabot[bot] 9ab1897b2b
Update actions/checkout requirement to v2.3.1 (#20)
* Update actions/checkout requirement to v2.3.1

Updates the requirements on [actions/checkout](https://github.com/actions/checkout) to permit the latest version.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/master/CHANGELOG.md)
- [Commits](28c7f3d2b5)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix the version numbers

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2020-06-19 17:56:26 -04:00
dependabot[bot] 1619c1ff68 Bump codecov/codecov-action from v1 to v1.0.7
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1 to v1.0.7.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1...f532c3a1452359a7f96c37efc741537b80555c74)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-09 17:10:13 -04:00
dependabot-preview[bot] 8fbfadcf0d
Create Dependabot config file (#16)
* Create Dependabot config file

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2020-06-09 16:19:24 -04:00
dependabot-preview[bot] ceee1c1d87 Update proptest requirement from 0.9 to 0.10
Updates the requirements on [proptest](https://github.com/altsysrq/proptest) to permit the latest version.
- [Release notes](https://github.com/altsysrq/proptest/releases)
- [Changelog](https://github.com/AltSysrq/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/altsysrq/proptest/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 15:48:20 -04:00
dependabot-preview[bot] d980b3b6a0 Update proptest-derive requirement from 0.1.0 to 0.2.0
Updates the requirements on [proptest-derive](https://github.com/AltSysrq/proptest) to permit the latest version.
- [Release notes](https://github.com/AltSysrq/proptest/releases)
- [Changelog](https://github.com/AltSysrq/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/AltSysrq/proptest/compare/proptest-derive-0.1.1...proptest-derive-0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 19:36:15 +00:00
Deirdre Connolly 67f60d69d0 Bump to 0.3.0 2020-05-12 00:54:19 -04:00
Deirdre Connolly 7d72a6d8c0 Impl From<[u8; 64]> for *Secret's 2020-05-12 00:54:19 -04:00
Deirdre Connolly 18e12e7406 Impl From<StaticSecret> for [u8; 32]
Plus derive(Copy), proptest bytes roundtrip
2020-05-12 00:54:19 -04:00
Deirdre Connolly 06fddf3fb1 Call '.ok()' on the try_from Result in PublicKey strategy 2020-05-12 00:54:19 -04:00
5 changed files with 146 additions and 66 deletions

20
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
timezone: America/New_York
open-pull-requests-limit: 10
reviewers:
- dconnolly
assignees:
- dconnolly
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
timezone: America/New_York
open-pull-requests-limit: 10
assignees:
- dconnolly

View File

@ -11,78 +11,65 @@ on:
jobs:
test:
name: Test on ${{ matrix.os }}
name: Build & Test (+nightly) / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3.0.2
- uses: actions-rs/toolchain@v1.0.7
with:
toolchain: stable
toolchain: nightly
override: true
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all
- name: Build
- name: Build (+nightly)
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --release
- name: Test (+nightly)
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all-features
doctest-nightly:
name: Run doctests via nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
# Because we use nightly features for building docs,
# using --all-features will fail without nightly toolchain.
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.12.3'
timeout: 300
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
clippy:
name: Clippy
name: Clippy (+nightly)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3.0.2
- uses: actions-rs/toolchain@v1.0.7
with:
toolchain: stable
toolchain: nightly
components: clippy
override: true
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
coverage:
name: Code Coverage (+nightly)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.2
- uses: actions-rs/toolchain@v1.0.7
with:
toolchain: nightly
components: llvm-tools-preview
override: true
- name: Install rustfilt, cargo-llvm-cov cargo commands
run: |
cargo install rustfilt
cargo install cargo-llvm-cov --version 0.1.0-alpha.3
- name: Generate code coverage
run: cargo llvm-cov --all-features --lcov > lcov.info
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3.1.0

View File

@ -1,6 +1,6 @@
[package]
name = "ristretto255-dh"
version = "0.2.0"
version = "0.3.0"
authors = ["Deirdre Connolly <durumcrustulum@gmail.com>"]
edition = "2018"
readme = "README.md"
@ -19,15 +19,15 @@ exclude = [
features = ["nightly"]
[dependencies]
curve25519-dalek = { version = "2.0.0", features = ["serde"] }
curve25519-dalek = { version = "3.0.0", features = ["serde"] }
rand_core = "0.5.1"
serde = { version = "1.0", features = ["derive"] }
zeroize = "1.1.0"
[dev-dependencies]
bincode = "1.2.1"
proptest = "0.9"
proptest-derive = "0.1.0"
proptest = "1.0"
proptest-derive = "0.3.0"
[features]
nightly = []

29
codecov.yml Normal file
View File

@ -0,0 +1,29 @@
coverage:
range: "50...100"
status:
project:
default:
informational: true
patch:
default:
informational: true
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: yes
macro: yes
# comment:
# layout: "diff"
# # if true: only post the comment if coverage changes
# require_changes: true
# This turns off the extra comment; the coverage %'s are still
# reported on the main PR page as check results
# comment: false
# github_checks:
# annotations: false

View File

@ -1,5 +1,4 @@
#![cfg_attr(feature = "nightly", feature(external_doc))]
#![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
#![doc = include_str!("../README.md")]
use std::convert::TryFrom;
@ -12,14 +11,13 @@ use rand_core::{CryptoRng, RngCore};
use serde::{Deserialize, Serialize};
#[cfg(test)]
use proptest::{arbitrary::Arbitrary, array, prelude::*};
use proptest::{arbitrary::Arbitrary, array, collection, prelude::*};
/// A Diffie-Hellman secret key used to derive a shared secret when
/// combined with a public key, that only exists for a short time.
#[cfg_attr(test, derive(Debug))]
pub struct EphemeralSecret(pub(crate) Scalar);
#[cfg(test)]
impl From<[u8; 32]> for EphemeralSecret {
fn from(bytes: [u8; 32]) -> EphemeralSecret {
match Scalar::from_canonical_bytes(bytes) {
@ -29,6 +27,12 @@ impl From<[u8; 32]> for EphemeralSecret {
}
}
impl From<[u8; 64]> for EphemeralSecret {
fn from(bytes: [u8; 64]) -> EphemeralSecret {
Self(Scalar::from_bytes_mod_order_wide(&bytes))
}
}
impl EphemeralSecret {
/// Generate a `EphemeralSecret` using a new scalar mod the group
/// order.
@ -103,13 +107,9 @@ impl Arbitrary for PublicKey {
fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy {
array::uniform32(any::<u8>())
.prop_filter_map(
"Decompressible Ristretto point",
|b| match PublicKey::try_from(b) {
Ok(public_key) => Some(public_key),
Err(_) => None,
},
)
.prop_filter_map("Decompressible Ristretto point", |b| {
PublicKey::try_from(b).ok()
})
.boxed()
}
@ -132,10 +132,16 @@ impl From<SharedSecret> for [u8; 32] {
/// A Diffie-Hellman secret key used to derive a shared secret when
/// combined with a public key, that can be stored and loaded.
#[derive(Clone, Eq, PartialEq, Deserialize, Serialize)]
#[derive(Clone, Copy, Eq, PartialEq, Deserialize, Serialize)]
#[cfg_attr(test, derive(Debug))]
pub struct StaticSecret(pub(crate) Scalar);
impl From<StaticSecret> for [u8; 32] {
fn from(static_secret: StaticSecret) -> [u8; 32] {
static_secret.0.to_bytes()
}
}
impl From<[u8; 32]> for StaticSecret {
fn from(bytes: [u8; 32]) -> StaticSecret {
match Scalar::from_canonical_bytes(bytes) {
@ -145,6 +151,12 @@ impl From<[u8; 32]> for StaticSecret {
}
}
impl From<[u8; 64]> for StaticSecret {
fn from(bytes: [u8; 64]) -> StaticSecret {
Self(Scalar::from_bytes_mod_order_wide(&bytes))
}
}
impl StaticSecret {
/// Generate a `StaticSecret` using a new scalar mod the group
/// order.
@ -171,7 +183,7 @@ impl Arbitrary for StaticSecret {
.prop_filter("Valid scalar mod l", |b| {
Scalar::from_bytes_mod_order(*b).is_canonical()
})
.prop_map(|bytes| return Self::from(bytes))
.prop_map(Self::from)
.boxed()
}
@ -181,7 +193,6 @@ impl Arbitrary for StaticSecret {
#[cfg(test)]
mod tests {
use bincode;
use rand_core::OsRng;
use super::*;
@ -205,6 +216,30 @@ mod tests {
proptest! {
#[test]
fn random_dh_wide(alice_bytes in collection::vec(any::<u8>(), 64),
bob_bytes in collection::vec(any::<u8>(), 64)) {
let mut a = [0u8; 64];
a.copy_from_slice(alice_bytes.as_slice());
let alice_secret = EphemeralSecret::from(a);
let alice_public = PublicKey::from(&alice_secret);
let mut b = [0u8; 64];
b.copy_from_slice(bob_bytes.as_slice());
let bob_secret = StaticSecret::from(b);
let bob_public = PublicKey::from(&bob_secret);
let alice_shared_secret = alice_secret.diffie_hellman(&bob_public);
let bob_shared_secret = bob_secret.diffie_hellman(&alice_public);
assert_eq!(
<[u8; 32]>::from(alice_shared_secret),
<[u8; 32]>::from(bob_shared_secret)
);
}
#[test]
fn ephemeral_dh(
alice_secret in any::<EphemeralSecret>(),
@ -268,6 +303,15 @@ mod tests {
);
}
#[test]
fn from_into_static_secret_bytes(static_secret in any::<StaticSecret>()) {
let bytes: [u8; 32] = static_secret.into();
prop_assert_eq!(
static_secret, StaticSecret::from(bytes)
);
}
#[test]
fn scalar_mul_different_paths(
secret in any::<EphemeralSecret>(),