Skip to content

Commit 94d9c56

Browse files
authored
chore!: align to draft 16, update dependencies (#365)
* chore!: align to draft 16, update dependencies * chore: fix toml formatting
1 parent 4e52556 commit 94d9c56

File tree

10 files changed

+675
-693
lines changed

10 files changed

+675
-693
lines changed

.github/workflows/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ jobs:
236236
- name: Install Taplo
237237
# Adding the --locked flag because of
238238
# https://github.com/tamasfe/taplo/issues/242
239-
run: cargo install taplo-cli --locked
239+
run: cargo install taplo-cli --locked
240240

241241
- name: Checkout sources
242242
uses: actions/checkout@main
@@ -249,4 +249,4 @@ jobs:
249249
runs-on: ubuntu-latest
250250
steps:
251251
- uses: actions/checkout@main
252-
- uses: EmbarkStudios/cargo-deny-action@v1
252+
- uses: EmbarkStudios/cargo-deny-action@v2

CHANGELOG.md

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

3+
## 3.0.0-pre.6 (TBD)
4+
* Synced implementation with draft-irtf-cfrg-opaque-16
5+
* **Breaking: protocol context string changed from `RFCXXXX` to `OPAQUEv1-`**
6+
* Dropped unmaintained json crate in favor of serde_json
7+
* Updated dependencies
8+
39
## 3.0.0-pre.5 (September 18, 2024)
410
* Increased MSRV to 1.74
511
* Updated voprf dependency
@@ -15,6 +21,7 @@
1521

1622
## 3.0.0-pre.2 (March 14, 2023)
1723
* Updated VOPRF to draft 19
24+
* **Breaking: backwards-incompatible changes introduced in OPRF protocol**
1825
* Added P384 testing support
1926
* Increased MSRV to 1.65
2027
* Updating dependencies

Cargo.toml

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "opaque-ke"
99
readme = "README.md"
1010
repository = "https://github.com/facebook/opaque-ke"
1111
rust-version = "1.74"
12-
version = "3.0.0-pre.5"
12+
version = "3.0.0-pre.6"
1313

1414
[features]
1515
argon2 = ["dep:argon2"]
@@ -38,9 +38,9 @@ rand = { version = "0.8", default-features = false }
3838
serde = { version = "1", default-features = false, features = [
3939
"derive",
4040
], optional = true }
41-
subtle = { version = "2.3", default-features = false }
41+
subtle = { version = "2.6", default-features = false }
4242
voprf = { version = "0.5", default-features = false, features = ["danger"] }
43-
zeroize = { version = "1.5", features = ["zeroize_derive"] }
43+
zeroize = { version = "1.8", features = ["zeroize_derive"] }
4444

4545
[target.'cfg(target_arch = "wasm32")'.dependencies]
4646
getrandom = { version = "0.2", features = ["js"], optional = true }
@@ -50,7 +50,6 @@ bincode = "1"
5050
chacha20poly1305 = "0.10"
5151
criterion = "0.5"
5252
hex = "0.4"
53-
json = "0.12"
5453
p256 = { version = "0.13", default-features = false, features = [
5554
"hash2curve",
5655
"voprf",

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## The OPAQUE key exchange protocol ![Build Status](https://github.com/facebook/opaque-ke/workflows/Rust%20CI/badge.svg)
22

3-
[OPAQUE](https://eprint.iacr.org/2018/163.pdf) is an asymmetric password-authenticated key exchange protocol. It allows a client to authenticate to a server using a password, without ever having to expose the plaintext password to the server.
3+
[OPAQUE](https://eprint.iacr.org/2018/163.pdf) is an augmented password-authenticated key exchange protocol. It allows a client to authenticate to a server using a password, without ever having to expose the plaintext password to the server.
44

55
This implementation is based on the [Internet Draft for OPAQUE](https://github.com/cfrg/draft-irtf-cfrg-opaque).
66

77
Background
88
----------
99

10-
Asymmetric Password Authenticated Key Exchange (aPAKE) protocols are designed to provide password authentication and mutually authenticated key exchange without relying on PKI (except during user/password registration) and without disclosing passwords to servers or other entities other than the client machine.
10+
Augmented Password Authenticated Key Exchange (aPAKE) protocols are designed to provide password authentication and mutually authenticated key exchange without relying on PKI (except during user/password registration) and without disclosing passwords to servers or other entities other than the client machine.
1111

1212
OPAQUE is a PKI-free aPAKE that is secure against pre-computation attacks and capable of using a secret salt.
1313

deny.toml

+7-34
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# The values provided in this template are the default values that will be used
1010
# when any section or field is not specified in your own configuration
1111

12+
[graph]
1213
# If 1 or more target triples (and optionally, target_features) are specified,
1314
# only the specified targets will be checked when running `cargo deny check`.
1415
# This means, if a particular package is only ever used as a target specific
@@ -17,6 +18,7 @@
1718
# this list would mean the nix crate, as well as any of its exclusive
1819
# dependencies not shared by any other crates, would be ignored, as the target
1920
# list here is effectively saying which targets you are building for.
21+
all-features = true
2022
targets = [
2123
# The triple can be any string, but only the target triples built in to
2224
# rustc (as of 1.40) can be checked against actual config expressions
@@ -35,16 +37,8 @@ targets = [
3537
db-path = "~/.cargo/advisory-db"
3638
# The url of the advisory database to use
3739
db-urls = ["https://github.com/rustsec/advisory-db"]
38-
# The lint level for security vulnerabilities
39-
vulnerability = "deny"
40-
# The lint level for unmaintained crates
41-
unmaintained = "warn"
4240
# The lint level for crates that have been yanked from their source registry
4341
yanked = "warn"
44-
# The lint level for crates with security notices. Note that as of
45-
# 2019-12-17 there are no security notice advisories in
46-
# https://github.com/rustsec/advisory-db
47-
notice = "deny"
4842
# A list of advisory IDs to ignore. Note that ignored advisories will still
4943
# output a note when they are encountered.
5044
ignore = [
@@ -64,47 +58,26 @@ ignore = [
6458
# More documentation for the licenses section can be found here:
6559
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
6660
[licenses]
67-
# The lint level for crates which do not have a detectable license
68-
unlicensed = "deny"
6961
# List of explictly allowed licenses
7062
# See https://spdx.org/licenses/ for list of possible licenses
7163
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
7264
allow = [
73-
#"MIT",
74-
#"Apache-2.0",
65+
"MIT",
66+
"BSD-3-Clause",
67+
"Apache-2.0",
7568
#"Apache-2.0 WITH LLVM-exception",
7669
]
77-
# List of explictly disallowed licenses
78-
# See https://spdx.org/licenses/ for list of possible licenses
79-
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
80-
deny = [
81-
#"Nokia",
82-
]
83-
# Lint level for licenses considered copyleft
84-
copyleft = "warn"
85-
# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
86-
# * both - The license will be approved if it is both OSI-approved *AND* FSF
87-
# * either - The license will be approved if it is either OSI-approved *OR* FSF
88-
# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
89-
# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
90-
# * neither - This predicate is ignored and the default lint level is used
91-
allow-osi-fsf-free = "neither"
92-
# Lint level used when no other predicates are matched
93-
# 1. License isn't in the allow or deny lists
94-
# 2. License isn't copyleft
95-
# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
96-
default = "allow"
9770
# The confidence threshold for detecting a license from license text.
9871
# The higher the value, the more closely the license text must be to the
9972
# canonical license text of a valid SPDX license file.
10073
# [possible values: any between 0.0 and 1.0].
101-
confidence-threshold = 0.8
74+
confidence-threshold = 0.95
10275
# Allow 1 or more licenses on a per-crate basis, so that particular licenses
10376
# aren't accepted for every possible crate as with the normal allow list
10477
exceptions = [
10578
# Each entry is the crate and version constraint, and its specific allow
10679
# list
107-
#{ allow = ["Zlib"], name = "adler32", version = "*" },
80+
{ allow = ["Unicode-DFS-2016"], name = "unicode-ident", version = "*" },
10881
]
10982

11083
# Some crates don't have (easily) machine readable licensing information,

src/key_exchange/tripledh.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use crate::serialization::{Input, UpdateExt};
3838
///////////////
3939

4040
pub(crate) type NonceLen = U32;
41-
static STR_RFC: &[u8] = b"RFCXXXX";
41+
static STR_CONTEXT: &[u8] = b"OPAQUEv1-";
4242
static STR_CLIENT_MAC: &[u8] = b"ClientMAC";
4343
static STR_HANDSHAKE_SECRET: &[u8] = b"HandshakeSecret";
4444
static STR_SERVER_MAC: &[u8] = b"ServerMAC";
@@ -215,7 +215,7 @@ where
215215
let server_nonce = generate_nonce::<R>(rng);
216216

217217
let mut transcript_hasher = D::new()
218-
.chain(STR_RFC)
218+
.chain(STR_CONTEXT)
219219
.chain_iter(
220220
Input::<U2>::from(context)
221221
.map_err(ProtocolError::into_custom)?
@@ -278,7 +278,7 @@ where
278278
context: &[u8],
279279
) -> Result<GenerateKe3Result<Self, D, KG>, ProtocolError> {
280280
let mut transcript_hasher = D::new()
281-
.chain(STR_RFC)
281+
.chain(STR_CONTEXT)
282282
.chain_iter(Input::<U2>::from(context)?.iter())
283283
.chain_iter(id_u)
284284
.chain_iter(serialized_credential_request)

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// of this source tree. You may select, at your option, one of the above-listed
77
// licenses.
88

9-
//! An implementation of the OPAQUE asymmetric password authentication key
9+
//! An implementation of the OPAQUE augmented password authentication key
1010
//! exchange protocol
1111
//!
1212
//! Note: This implementation is in sync with [draft-irtf-cfrg-opaque-16](https://datatracker.ietf.org/doc/draft-irtf-cfrg-opaque/16/),

0 commit comments

Comments
 (0)