Skip to content

Commit 6e16a99

Browse files
authored
Updating to draft version 10 (#79)
1 parent 4646fe4 commit 6e16a99

File tree

6 files changed

+649
-645
lines changed

6 files changed

+649
-645
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22

3-
## 0.4.0-pre.2 (April 5, 2022)
3+
## 0.4.0-pre.3 (July 1, 2022)
4+
* Updated to be in sync with draft-irtf-cfrg-voprf-10, with
5+
the only difference from -09 being a constant string change
6+
7+
## 0.4.0-pre.2 (April 21, 2022)
48
* Exposes the derive_key function under the "danger" feature
59

610
## 0.4.0-pre.1 (April 1, 2022)

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "voprf"
99
readme = "README.md"
1010
repository = "https://github.com/novifinancial/voprf/"
1111
rust-version = "1.57"
12-
version = "0.4.0-pre.2"
12+
version = "0.4.0-pre.3"
1313

1414
[features]
1515
alloc = []
@@ -30,7 +30,7 @@ curve25519-dalek = { version = "=4.0.0-pre.1", default-features = false, optiona
3030
derive-where = { version = "=1.0.0-rc.3", features = ["zeroize-on-drop"] }
3131
digest = "0.10"
3232
displaydoc = { version = "0.2", default-features = false }
33-
elliptic-curve = { version = "=0.12.0-pre.1", features = [
33+
elliptic-curve = { version = "0.12", features = [
3434
"hash2curve",
3535
"sec1",
3636
"voprf",
@@ -48,7 +48,7 @@ zeroize = { version = "1.5", default-features = false }
4848
generic-array = { version = "0.14", features = ["more_lengths"] }
4949
hex = "0.4"
5050
json = "0.12"
51-
p256 = { version = "=0.11.0-pre.0", default-features = false, features = [
51+
p256 = { version = "0.11", default-features = false, features = [
5252
"hash2curve",
5353
"voprf",
5454
] }

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Installation
1616
Add the following line to the dependencies of your `Cargo.toml`:
1717

1818
```
19-
voprf = "0.4.0-pre.2"
19+
voprf = "0.4.0-pre.3"
2020
```
2121

2222
### Minimum Supported Rust Version

src/common.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub(crate) const STR_DERIVE_KEYPAIR: [u8; 13] = *b"DeriveKeyPair";
3333
pub(crate) const STR_COMPOSITE: [u8; 9] = *b"Composite";
3434
pub(crate) const STR_CHALLENGE: [u8; 9] = *b"Challenge";
3535
pub(crate) const STR_INFO: [u8; 4] = *b"Info";
36-
pub(crate) const STR_VOPRF: [u8; 8] = *b"VOPRF09-";
36+
pub(crate) const STR_VOPRF: [u8; 8] = *b"VOPRF10-";
3737
pub(crate) const STR_HASH_TO_SCALAR: [u8; 13] = *b"HashToScalar-";
3838
pub(crate) const STR_HASH_TO_GROUP: [u8; 12] = *b"HashToGroup-";
3939

@@ -153,7 +153,7 @@ where
153153
<CS::Hash as OutputSizeUser>::OutputSize:
154154
IsLess<U256> + IsLessOrEqual<<CS::Hash as BlockSizeUser>::BlockSize>,
155155
{
156-
// https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-09.html#section-2.2.1
156+
// https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-10.html#section-2.2.1
157157

158158
let (m, z) = compute_composites::<CS, _, _>(Some(k), b, cs, ds, mode)?;
159159

@@ -216,7 +216,7 @@ where
216216
<CS::Hash as OutputSizeUser>::OutputSize:
217217
IsLess<U256> + IsLessOrEqual<<CS::Hash as BlockSizeUser>::BlockSize>,
218218
{
219-
// https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-09.html#section-2.2.2
219+
// https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-10.html#section-2.2.2
220220
let (m, z) = compute_composites::<CS, _, _>(None, b, cs, ds, mode)?;
221221
let t2 = (a * &proof.s_scalar) + &(b * &proof.c_scalar);
222222
let t3 = (m * &proof.s_scalar) + &(z * &proof.c_scalar);
@@ -285,7 +285,7 @@ where
285285
<CS::Hash as OutputSizeUser>::OutputSize:
286286
IsLess<U256> + IsLessOrEqual<<CS::Hash as BlockSizeUser>::BlockSize>,
287287
{
288-
// https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-09.html#section-2.2.1
288+
// https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-10.html#section-2.2.1
289289

290290
let elem_len = <CS::Group as Group>::ElemLen::U16.to_be_bytes();
291291

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! An implementation of a verifiable oblivious pseudorandom function (VOPRF)
99
//!
1010
//! Note: This implementation is in sync with
11-
//! [draft-irtf-cfrg-voprf-09](https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-09.html),
11+
//! [draft-irtf-cfrg-voprf-10](https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-10.html),
1212
//! but this specification is subject to change, until the final version
1313
//! published by the IETF.
1414
//!
@@ -430,7 +430,7 @@
430430
//! The API for POPRF mode is similar to VOPRF mode, except that a [PoprfServer]
431431
//! and [PoprfClient] are used, and that each of the functions accept an
432432
//! additional (and optional) info parameter which represents the public input.
433-
//! See <https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-09.html#name-poprf-public-input>
433+
//! See <https://www.ietf.org/archive/id/draft-irtf-cfrg-voprf-10.html#name-poprf-public-input>
434434
//! for more detailed information on how this public input should be used.
435435
//!
436436
//! # Features

0 commit comments

Comments
 (0)