RFC 9807: The OPAQUE Augmented Password-Authenticated Key Exchange (aPAKE) Protocol
- D. Bourdrez,
- H. Krawczyk,
- K. Lewi,
- C. A. Wood
Abstract
This document describes the OPAQUE protocol, an Augmented (or Asymmetric)
Password
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.¶
This document is a product of the Internet Research Task Force
(IRTF). The IRTF publishes the results of Internet
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://
1. Introduction
Password authentication is ubiquitous in many applications. In a common
implementation, a client authenticates to a server by sending its client
ID and password to the server over a secure connection. This makes
the password vulnerable to server mishandling, including accidentally
logging the password or storing it in plaintext in a database. Server
compromise resulting in access to these plaintext passwords is not an
uncommon security incident, even among security
Augmented (or Asymmetric) Password Authenticated Key Exchange (aPAKE) protocols are designed to provide password authentication and mutually authenticated key exchange in a client-server setting without relying on PKI (except during client registration) and without disclosing passwords to servers or other entities other than the client machine. A secure aPAKE should provide the best possible security for a password protocol. Indeed, some attacks are inevitable, such as online impersonation attempts with guessed client passwords and offline dictionary attacks upon the compromise of a server and leakage of its credential file. In the latter case, the attacker learns a mapping of a client's password under a one-way function and uses such a mapping to validate potential guesses for the password. It is crucially important for the password protocol to use an unpredictable one-way mapping. Otherwise, the attacker can pre-compute a deterministic list of mapped passwords leading to almost instantaneous leakage of passwords upon server compromise.¶
This document describes OPAQUE, an aPAKE protocol that is secure against pre-computation attacks (as defined in [JKX18]). OPAQUE provides forward secrecy with respect to password leakage while also hiding the password from the server, even during password registration. OPAQUE allows applications to increase the difficulty of offline dictionary attacks via iterated hashing or other key-stretching schemes. OPAQUE is also extensible, allowing clients to safely store and retrieve arbitrary application data on servers using only their password.¶
OPAQUE is defined and proven as the composition of three functionalities
OPAQUE consists of two stages: registration and authenticated key exchange. In the first stage, a client registers its password with the server and stores information used to recover authentication credentials on the server. Recovering these credentials can only be done with knowledge of the client password. In the second stage, a client uses its password to recover those credentials and subsequently uses them as input to an AKE protocol. This stage has additional mechanisms to prevent an active attacker from interacting with the server to guess or confirm clients registered via the first phase. Servers can use this mechanism to safeguard registered clients against this type of enumeration attack; see Section 10.9 for more discussion.¶
The name "OPAQUE" is a homonym of O-PAKE, where O is for Oblivious. The name "OPAKE" was taken.¶
This document complies with the requirements for PAKE protocols set forth in [RFC8125]. This document represents the consensus of the Crypto Forum Research Group (CFRG). It is not an IETF product and is not a standard.¶
1.1. Requirements Notation
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
1.2. Notation
The following functions are used throughout this document:¶
- I2OSP and OS2IP:
- Convert a byte string to and from a non-negative integer as described in Section 4 of [RFC8017]. Note that these functions operate on byte strings in big-endian byte order.¶
- concat(x0, ..., xN):
- Concatenate byte strings. For example,
concat(0x01, 0x0203, 0x040506) = 0x010203040506.¶ - random(n):
- Generates a cryptographical
ly secure pseudorandom byte string of length nbytes.¶ - zeroes(n):
- Generate a string of
nbytes all equal to 0 (zero).¶ - xor(a,b):
- Apply XOR to byte strings. For example,
xor(0xF0F0, 0x1234) = 0xE2C4. It is an error to call this function with arguments of unequal length.¶ - ct_equal(a, b):
- Return
trueifais equal tob, and false otherwise. The implementation of this function must be constant-time in the length ofaandb, which are assumed to be of equal length, irrespective of the valuesaorb.¶
Except if said otherwise, random choices in this specification refer to
drawing with uniform distribution from a given set (i.e., "random" is short
for "uniformly random"). Random choices can be replaced with fresh outputs from
a cryptographicalnil as a
lack of value.¶
All protocol messages and structures defined in this document use the syntax from Section 3 of [RFC8446].¶
2. Cryptographic Dependencies
OPAQUE depends on the following cryptographic protocols and primitives:¶
This section describes these protocols and primitives in more detail. Unless said
otherwise, all random nonces and seeds used in these dependencies and the rest of
the OPAQUE protocol are of length Nn and Nseed bytes, respectively, where
Nn = Nseed = 32.¶
2.1. Oblivious Pseudorandom Function
An Oblivious Pseudorandom Function (OPRF) is a two-party protocol between
client and server for computing a Pseudorandom Function (PRF), where the PRF key is held by the server
and the input to the function is provided by the client. The client does not
learn anything about the PRF other than the obtained output, and the server
learns nothing about the client's input or the function output.
This specification depends on the prime-order OPRF construction specified
as modeOPRF (0x00) from Section 3.1 of [RFC9497].¶
The following OPRF client APIs are used:¶
- Blind(element):
- Create and output (
blind,blinded_element), consisting of a blinded representation of inputelement, denotedblinded_element, along with a value to revert the blinding process, denotedblind. This is equivalent to the Blind function described in Section 3.3.1 of [RFC9497].¶ - Finalize
(element, blind, evaluated _element ): - Finalize the OPRF
evaluation using input
element, random inverterblind, and evaluation outputevaluated, yielding output_element oprf_output. This is equivalent to the Finalize function described in Section 3.3.1 of [RFC9497].¶
Moreover, the following OPRF server APIs are used:¶
- BlindEvaluate(k, blinded
_element ): - Evaluate blinded input
blinded_elementusing input keyk, yielding output elementevaluated. This is equivalent to the BlindEvaluate function described in Section 3.3.1 of [RFC9497], where_element kis the private key parameter.¶ - Derive
Key Pair (seed, info): - Create and output (
sk,pk), consisting of a private and public key derived deterministically from an input seedand inputinfoparameter, as described in Section 3.2 of [RFC9497].¶
Finally, this specification makes use of the following shared APIs and parameters:¶
- Serialize
Element (element ): - Map input
elementto a fixed-length byte array.¶ - Deserialize
Element (buf ): - Attempt to map input byte array
bufto an OPRF group element. This function can raise a DeserializeError upon failure; see Section 2.1 of [RFC9497] for more details.¶ - Noe:
- The size of a serialized OPRF group element output from Serialize
Element .¶ - Nok:
- The size of an OPRF private key as output from DeriveKeyPair.¶
2.2. Key Derivation Function and Message Authentication Code
A Key Derivation Function (KDF) is a function that takes some source of initial
keying material and uses it to derive one or more cryptographical
- Extract(salt, ikm):
- Extract a pseudorandom key of fixed length
Nxbytes from input keying materialikmand an optional byte stringsalt.¶ - Expand(prk, info, L):
- Expand a pseudorandom key
prk, using the stringinfo, intoLbytes of output keying material.¶ -
Nx: - The output size of the
Extract()function in bytes.¶
This specification also makes use of a random-key robust Message Authentication Code (MAC). See Section 10.6 for more details on this property. The API and parameters for the random-key robust MAC are as follows:¶
2.3. Hash Functions
This specification makes use of a collision
- Hash(msg):
- Apply a cryptographic hash function to input
msg, producing a fixed-length digest of sizeNhbytes.¶ -
Nh: - The output size of the
Hash()function in bytes.¶
This specification makes use of a Key Stretching Function (KSF), which is a slow and expensive cryptographic hash function with the following API:¶
- Stretch(msg):
- Apply a key stretching function to stretch
the input
msgand harden it against offline dictionary attacks. This function also needs to satisfy collision resistance.¶
3. Protocol Overview
OPAQUE consists of two stages: registration and authenticated key exchange (AKE). In the first stage, a client registers its password with the server and stores its credential file on the server. In the second stage (also called the "login" or "online" stage), the client recovers its authentication material and uses it to perform a mutually authenticated key exchange.¶
3.1. Setup
Prior to both stages, the client and server agree on a configuration that
fully specifies the cryptographic algorithm dependencies necessary to run the
protocol; see Section 7 for details.
The server chooses a pair of keys (server and server)
for the AKE protocol and chooses a seed (oprf_seed) of Nh bytes for the OPRF.
The server can use server and server with multiple
clients. The server can also opt to use a different seed for each client
(i.e., each client can be assigned a single seed), so long as they are maintained
across the registration and online AKE stages and kept consistent for each
client (since an inconsistent mapping of clients to seeds could leak information
as described in Section 10.9).¶
3.2. Registration
Registration is the only stage in OPAQUE that requires a server
The client inputs its credentials, which include its password and user identifier, and the server inputs its parameters, which include its private key and other information.¶
The client output of this stage is a single value export_key that the client
may use for applicationexport_key.¶
The server output of this stage is a record corresponding to the client's
registration that it stores in a credential file alongside other clients
registrations as needed.¶
The registration flow is shown in Figure 1, and the process is described in more detail in Section 5:¶
These messages are named Registration, Registration, and
Registration, respectively. Their contents and wire format are defined in
Section 5.1.¶
3.3. Online Authenticated Key Exchange
In this second stage, a client obtains credentials previously registered
with the server, recovers private key material using the password, and
subsequently uses them as input to the AKE protocol. As in the registration
phase, the client inputs its credentials, including its password and user
identifier, and the server inputs its parameters and the credential file record
corresponding to the client. The client outputs two values, an export_key
(matching that from registration) and a session_key, the latter of which
is the primary AKE protocol output. The server outputs a single value session_key
that matches that of the client. Upon completion, clients and servers can
use these values as needed.¶
The authenticated key exchange flow is shown in Figure 2:¶
These messages are named KE1, KE2, and KE3, respectively. They carry the
messages of the concurrent execution of the key recovery process (OPRF) and the
authenticated key exchange (AKE). Their corresponding wire formats are
specified in Section 6.1.¶
The rest of this document describes the specifics of these stages in detail. Section 4 describes how client credential information is generated, encoded, and stored on the server during registration and recovered during login. Section 5 describes the first registration stage of the protocol, and Section 6 describes the second authentication stage of the protocol. Section 7 describes how to instantiate OPAQUE using different cryptographic dependencies and parameters.¶
4. Client Credential Storage and Key Recovery
OPAQUE makes use of a structure called Envelope to manage client credentials.
The client creates its Envelope on registration and sends it to the server for
storage. On every login, the server sends this Envelope to the client so it can
recover its key material for use in the AKE.¶
Applications may pin key material to identities if desired. If no identity is given for a party, its value MUST default to its public key. The following types of application credential information are considered:¶
-
client:_private _key - The encoded client private key for the AKE protocol.¶
-
client:_public _key - The encoded client public key for the AKE protocol.¶
-
server:_public _key - The encoded server public key for the AKE protocol.¶
-
client_identity: - The client identity. This is an
application
-specific value, e.g., an email address or an account name. If not specified, it defaults to the client's public key.¶ -
server_identity: - The server identity. This is typically a domain name, e.g., example.com. If not specified, it defaults to the server's public key. See Section 10.3 for information about this identity.¶
A subset of these credential values are used in the Cleartext structure as follows:¶
The function CreateCleartext structure given
application credential information.¶
4.1. Key Recovery
This specification defines a key recovery mechanism that uses the stretched OPRF
output as a seed to directly derive the private and public keys using the
Derive function defined in Section 6.4.1.¶
4.1.1. Envelope Structure
The key recovery mechanism defines its Envelope as follows:¶
4.1.2. Envelope Creation
Clients create an Envelope at registration with the function Store defined
below. Note that Derive in this function can fail with negligible
probability. If this occurs, servers should re-run the function, sampling a
new envelope_nonce, to completion.¶
4.1.3. Envelope Recovery
Clients recover their Envelope during login with the Recover function
defined below.¶
In the case of Envelope being raised, all previously computed
intermediary values in this function MUST be deleted.¶
5. Registration
The registration process proceeds as follows. The client inputs the following values:¶
The server inputs the following values:¶
-
server:_public _key - The server public key for the AKE protocol.¶
-
credential:_identifier - A unique identifier for the client's credential generated by the server.¶
-
client_identity: - The optional client identity as described in Section 4.¶
-
oprf_seed: - A
seedused to derive per-client OPRF keys.¶
The registration protocol then runs as shown below:¶
Section 5.1 describes the formats for the above messages, and Section 5.2 describes details of the functions and the corresponding parameters referenced above.¶
At the end of this interaction, the server stores the record object as the
credential file for each client along with the associated credential
and client_identity (if different). Note that the values oprf_seed and
server from the server's setup phase must also be persisted.
The oprf_seed value SHOULD be used for all clients; see Section 10.9
for the justification behind this, along with a description of the exception in which
applications may choose to avoid the use of a global oprf_seed value across clients
and instead sample OPRF keys uniquely for each client. The server may
be unique for each client.¶
Both client and server MUST validate the other party's public key before use.
See Section 10.7 for more details. Upon completion, the server stores
the client's credentials for later use. Moreover, the client MAY use the output
export_key for further application
5.1. Registration Messages
This section contains definitions of the Registration,
Registration, and Registration messages exchanged between
client and server during registration.¶
- blinded_message:
- A serialized OPRF group element.¶
5.2. Registration Functions
This section contains definitions of the functions used by client and server
during registration, including Create, Create,
and Finalize.¶
5.2.1. CreateRegistrationRequest
To begin the registration flow, the client executes the following function. This function
can fail with an Invalid error with negligible probability. A different input
password is necessary in the event of this error.¶
5.2.2. CreateRegistrationResponse
To process the client's registration request, the server executes
the following function. This function can fail with a Derive
error with negligible probability. In this case, applications can
choose a new credential for this registration record
and rerun this function.¶
6. Online Authenticated Key Exchange
The generic outline of OPAQUE with a 3-message AKE protocol includes three
messages: KE1, KE2, and KE3. KE1 and KE2 include key exchange shares (e.g., DH
values) sent by the client and server, respectively. KE3 provides explicit
client authentication and full forward security (without it, forward secrecy
is only achieved against eavesdroppers, which is insufficient for OPAQUE
security).¶
This section describes the online authenticated key exchange protocol flow, message encoding, and helper functions. This stage is composed of a concurrent OPRF and key exchange flow. The key exchange protocol is authenticated using the client and server credentials established during registration; see Section 5. In the end, the client proves its knowledge of the password, and both client and server agree on (1) a mutually authenticated shared secret key and (2) any optional application information exchange during the handshake.¶
In this stage, the client inputs the following values:¶
The server inputs the following values:¶
-
server:_private _key - The server's private key for the AKE protocol.¶
-
server:_public _key - The server's public key for the AKE protocol.¶
-
server_identity: - The server identity as described in Section 4.¶
-
record: - The
Registrationobject corresponding to the client's registration.¶Record -
credential:_identifier - An identifier that uniquely represents the credential.¶
-
oprf_seed: - The
seedused to derive per-client OPRF keys.¶
The client receives two outputs: a session secret and an export key. The export
key is only available to the client and may be used for additional
applicationexport_key before
authenticating the peer in the authenticated key exchange protocol.
See Appendix A for more details about this
requirement. The server receives a single output: a session secret matching the
client's.¶
The protocol runs as shown below:¶
Both client and server may use implicit internal state objects to keep necessary
material for the OPRF and AKE, client_state, and server_state, respectively.¶
The client state ClientState may have the following fields:¶
- password:
- The client's password.¶
-
blind: - The random blinding inverter returned by
Blind().¶ - client
_ake _state : - The
ClientAkeStateas defined in Section 6.4.¶
The server state ServerState may have the following fields:¶
- server
_ake _state : - The
ServerAkeStateas defined in Section 6.4.¶
Both of these states are ephemeral and should be erased after the protocol completes.¶
The rest of this section describes these authenticated key exchange messages and their parameters in more detail. Section 6.1 defines the structure of the messages passed between client and server in the above setup. Section 6.2 describes details of the functions and corresponding parameters mentioned above. Section 6.3 discusses internal functions used for retrieving client credentials, and Section 6.4 discusses how these functions are used to execute the authenticated key exchange protocol.¶
6.1. AKE Messages
In this section, we define the KE1, KE2, and KE3 structs that make up
the AKE messages used in the protocol. KE1 is composed of a Credential
and AuthRequest, and KE2 is composed of a Credential
and AuthResponse.¶
- client_nonce:
- A fresh randomly generated nonce of length
Nn.¶ - client
_public _keyshare : - A serialized client ephemeral public key of fixed size
Npk.¶
- server_nonce:
- A fresh randomly generated nonce of length
Nn.¶ -
servershare:_public _key - A server ephemeral public key of
fixed size
Npk, whereNpkdepends on the corresponding prime order group.¶ - server_mac:
- An authentication tag computed over the
handshake transcript computed using
Km2, which is defined below.¶
- client_mac:
- An authentication tag computed over the
handshake transcript of fixed size
Nm, computed usingKm2, defined below.¶
6.2. AKE Functions
In this section, we define the main functions used to produce the AKE messages in the protocol. Note that this section relies on definitions of subroutines defined in later sections:¶
6.2.1. GenerateKE1
The GenerateKE1 function begins the AKE protocol and produces the client's KE1
output for the server.¶
6.2.2. GenerateKE2
The GenerateKE2 function continues the AKE protocol by processing the client's KE1 message
and producing the server's KE2 output.¶
6.2.3. GenerateKE3
The GenerateKE3 function completes the AKE protocol for the client and
produces the client's KE3 output for the server, as well as the session_key
and export_key outputs from the AKE.¶
6.2.4. ServerFinish
The ServerFinish function completes the AKE protocol for the server, yielding the session_key.
Since the OPRF is a two-message protocol, KE3 has no element of the OPRF. Therefore, KE3
invokes the AKE's Auth directly. The Auth function
takes KE3 as input and MUST verify the client authentication material it contains
before the session_key value can be used. This verification is necessary to ensure
forward secrecy against active attackers.¶
This function MUST NOT return the session_key value if the client authentication
material is invalid and may instead return an appropriate error message, such as
Client, which is invoked from Auth.¶
6.3. Credential Retrieval
This section describes the sub-protocol run during authentication to retrieve and recover the client credentials.¶
6.3.1. Credential Retrieval Messages
This section describes the Credential and Credential messages exchanged
between client and server to perform credential retrieval.¶
- blinded_message:
- A serialized OPRF group element.¶
6.3.2. Credential Retrieval Functions
This section describes the Create, Create,
and Recover functions used for credential retrieval.¶
6.3.2.1. CreateCredentialRequest
The Create is used by the client to initiate the credential
retrieval process, and it produces a Credential message and OPRF state.
Like Create, this function can fail with an Invalid
error with negligible probability. However, this should not occur since
registration (via Create) will fail when provided the same
password input.¶
6.3.2.2. CreateCredentialResponse
The Create function is used by the server to process the client's
Credential message and complete the credential retrieval process, producing
a Credential.¶
There are two scenarios to handle for the construction of a Credential
object: either the record for the client exists (corresponding to a properly
registered client) or it was never created (corresponding to an unregistered
client identity, possibly the result of an enumeration attack attempt).¶
In the case of an existing record with the corresponding identifier
credential, the server invokes the following function to
produce a Credential:¶
In the case of a record that does not exist and if client enumeration prevention is desired,
the server MUST respond to the credential request to fake the existence of the record.
The server SHOULD invoke the Create function with a fake client record
argument that is configured so that:¶
It is RECOMMENDED that a fake client record is created once (e.g., as the first user record
of the application) and then stored alongside legitimate client records to serve
subsequent client requests. This allows servers to retrieve the record in a time comparable
to that of a legitimate client record.¶
Note that the responses output by either scenario are indistinguishabcredential.¶
6.3.2.3. RecoverCredentials
The Recover function is used by the client to process the server's
Credential message and produce the client's private key, server public
key, and the export_key.¶
6.4. 3DH Protocol
This section describes the authenticated key exchange protocol for OPAQUE using 3DH, a 3-message AKE that satisfies the forward secrecy and KCI properties discussed in Section 10.¶
The client AKE state ClientAkeState mentioned in Section 6 has the
following fields:¶
The server AKE state ServerAkeState mentioned in Section 6 has the
following fields:¶
- expected
_client _mac : - An opaque byte string of length
Nm.¶ -
session_key: - An opaque byte string of length
Nx.¶
Sections 6.4.3 and 6.4.4 specify the inner workings of client and server functions, respectively.¶
6.4.1. 3DH Key Exchange Functions
We assume the following functions exist for all Diffie-Hellman key exchange variants:¶
- Derive
Diffie Hellman Key Pair (seed ): - Derive a private and
public Diffie-Hellman key pair deterministical
ly from the input seed. The type of the private key depends on the implementation, whereas the type of the public key is a byte string ofNpkbytes.¶ - DiffieHellman(k, B):
- A function that performs the
Diffie-Hellman operation between the private input
kand public inputB. The output of this function is a unique, fixed-length byte string.¶
It is RECOMMENDED to use Elliptic Curve Diffie-Hellman for this key exchange protocol. Implementations for recommended groups in Section 7, as well as groups covered by test vectors in Appendix C, are described in the following sections.¶
6.4.1.1. 3DH ristretto255
This section describes the implementation of the Diffie-Hellman key exchange functions based on ristretto255 as defined in [RFC9496].¶
- Derive
Diffie Hellman Key Pair (seed ): - This function is
implemented as Derive
Key Pair (seed, "OPAQUE -Derive Diffie Hellman Key Pair" ), where DeriveKeyPair is as specified in Section 3.2 of [RFC9497]. The public value from DeriveKeyPair is encoded using Serialize Element from Section 2.1 of [RFC9497].¶ - DiffieHellman(k, B):
- Implemented as scalar
multiplication as described in [RFC9496] after decoding
Bfrom its encoded input using the Decode function in Section 4.3.1 of [RFC9496]. The output is then encoded using the SerializeElement function of the OPRF group described in Section 2.1 of [RFC9497].¶
6.4.1.2. 3DH P-256
This section describes the implementation of the Diffie-Hellman key exchange functions based on NIST P-256 as defined in [NISTCurves].¶
- Derive
Diffie Hellman Key Pair (seed ): - As defined in Section 6.4.1.1.¶
- DiffieHellman(k, B):
- Implemented as
scalar multiplication as described in [NISTCurves] after decoding
Bfrom its encoded input using the compressed Octet-String -to -Elliptic -Curve -Point method according to [NISTCurves]. The output is then encoded using the Serialize Element function of the OPRF group described in Section 2.1 of [RFC9497].¶
6.4.1.3. 3DH Curve25519
This section describes the implementation of the Diffie-Hellman key exchange functions based on Curve25519 as defined in [RFC7748].¶
- Derive
Diffie Hellman Key Pair (seed ): - This function is
implemented by returning the private key
kbased onseed(of lengthNseed = 32bytes) as described in Section 5 of [RFC7748], as well as the result of DiffieHellman (k, B), where B is the base point of Curve25519.¶ - DiffieHellman(k, B):
- Implemented using the X25519 function in Section 5 of [RFC7748]. The output is then used raw with no processing.¶
6.4.2. Key Schedule Functions
This section contains functions used for the AKE key schedule.¶
6.4.2.1. Transcript Functions
The OPAQUE-3DH key derivation procedures make use of the functions below that are repurposed from TLS 1.3 [RFC8446].¶
Where CustomLabel is specified and encoded (following Section 3.4 of [RFC8446]) as:¶
Note that the Label parameter is not a NULL-terminated string.¶
OPAQUE-3DH can optionally include applicationcontext information in the
transcript, such as configuration parameters or application
The OPAQUE-3DH key schedule requires a preamble, which is computed as follows.¶
6.4.3. 3DH Client Functions
The AuthClientStart function is used by the client to create a
KE1 structure.¶
The Auth function is used by the client to create a KE3
message and output session_key using the server's KE2 message and
recovered credential information.¶
6.4.4. 3DH Server Functions
The Auth function is used by the server to process the client's
KE1 message and public credential information to create a KE2 message.¶
The Auth function is used by the server to process the client's
KE3 message and output the final session_key.¶
7. Configurations
An OPAQUE-3DH configuration is a tuple (OPRF, KDF, MAC, Hash, KSF, Group, Context) such that the following conditions are met:¶
Context is the shared parameter used to construct the preamble in Section 6.4.2.1.
This parameter SHOULD include any application
Absent an application
The above recommended configurations target 128-bit security.¶
Future configurations may specify different combinations of dependent algorithms with the following considerations:¶
8. Application Considerations
Beyond choosing an appropriate configuration, there are several parameters that applications can use to control OPAQUE:¶
9. Implementation Considerations
This section documents considerations for OPAQUE implementations
9.1. Implementation Safeguards
Certain information created, exchanged, and processed in OPAQUE is sensitive. Specifically, all private key material and intermediate values, along with the outputs of the key exchange phase, are all secret. Implementations should not retain these values in memory when no longer needed. Moreover, all operations, particularly the cryptographic and group arithmetic operations, should be constant-time and independent of the bits of any secrets. This includes any conditional branching during the creation of the credential response as needed to mitigate client enumeration attacks.¶
As specified in Section 5 and Section 6, OPAQUE only requires
the client password as input to the OPRF for registration and authentication.
However, if client_identity can be bound to the client's registration record
(i.e., the identity will not change during the lifetime of the record),
then an implementation SHOULD incorporate client_identity alongside the
password as input to the OPRF. Furthermore, it is RECOMMENDED to incorporate
server_identity alongside the password as input to the OPRF. These
additions provide domain separation for clients and servers; see
Section 10.2.¶
9.2. Handling Online Guessing Attacks
Online guessing attacks (against any aPAKE) can be done from
both the client side and the server side. In particular, a malicious server can
attempt to simulate honest responses to learn the client's password.
While this constitutes an exhaustive online attack (as expensive as a guessing
attack from the client side), it can be mitigated when the channel between
client and server is authenticated, e.g., using server
Additionally, note that a client participating in the online login stage
will learn whether or not authentication is successful after receiving the
KE2 message. This means that the server should treat any client which fails to
send a subsequent KE3 message as an authentication failure. This can be handled
in applications that wish to track authentication failures by, for example,
assuming by default that any client authentication attempt is a failure unless a KE3
message is received by the server and passes ServerFinish without error.¶
9.3. Error Considerations
Some functions included in this specification are fallible. For example, the authenticated key exchange protocol may fail because the client's password was incorrect or the authentication check failed, yielding an error. The explicit errors generated throughout this specification, along with conditions that lead to each error, are as follows:¶
Beyond these explicit errors, OPAQUE implementations can produce implicit errors.
For example, if protocol messages sent between client and server do not match
their expected size, an implementation should produce an error. More generally,
if any protocol message received from the peer is invalid, perhaps because the
message contains an invalid public key (indicated by the AKE Deserialize
The errors in this document are meant as a guide for implementors. They are not an exhaustive list of all the errors an implementation might emit. For example, an implementation might run out of memory.¶
10. Security Considerations
OPAQUE is defined as the composition of two functionalities
10.1. Notable Design Differences
The specification as written here differs from the original cryptographic design in [JKX18] and the corresponding CFRG document [Krawczyk20], both of which were used as input to the CFRG PAKE competition. This section describes these differences, including their motivation and explanation as to why they preserve the provable security of OPAQUE based on [JKX18].¶
The following list enumerates important functional differences that were made as part of the protocol specification process to address application or implementation considerations.¶
The following list enumerates notable differences and refinements from the original
cryptographic design in [JKX18] and the corresponding CFRG document
[Krawczyk20] that were made to make this specification
suitable for interoperable implementations
10.2. Security Analysis
Jarecki et al. [JKX18] proved the security of OPAQUE (modulo the design differences outlined in Section 10.1) in a strong aPAKE model that ensures security against precomputation attacks and is formulated in the UC framework [Canetti01] under the random oracle model. This assumes security of the OPRF function and the underlying key exchange protocol.¶
OPAQUE's design builds on a line of work initiated in the seminal paper of Ford and Kaliski [FK00] and is based on the HPAKE protocol of Xavier Boyen [Boyen09] and the (1,1)-PPSS protocol from Jarecki et al. [JKKX16]. None of these papers considered security against precomputation attacks or presented a proof of aPAKE security (not even in a weak model).¶
The KCI property required from AKE protocols for use with OPAQUE
states that knowledge of a party's private key does not allow an attacker
to impersonate others to that party. This is an important security
property achieved by most public
In [JKX18], security is proven for one instance (i.e., one key) of the OPAQUE protocol, and without batching. There is currently no security analysis available for the OPAQUE protocol described in this document in a setting with multiple server keys or batching.¶
As stated in Section 9.1, incorporating client_identity
adds domain separation, particularly against servers that choose the same
OPRF key for multiple clients. The client_identity as input to the OPRF
also acts as a key identifier that would be required for a proof of the
protocol in the multi-key setting; the OPAQUE analysis in [JKX18] assumes
single server-key instances. Adding server_identity to the OPRF input
provides domain separation for clients that reuse the same client_identity
across different server instantiations.¶
10.3. Identities
AKE protocols generate keys that need to be uniquely and verifiably bound to a pair
of identities. In the case of OPAQUE, those identities correspond to client_identity and server_identity.
Thus, it is essential for the parties to agree on such identities, including an
agreed bit representation of these identities as needed.¶
Note that the method of transmission of client_identity from client to server is outside
the scope of this protocol and it is up to an application to choose how this identity
should be delivered (for instance, alongside the first OPAQUE message or agreed upon before
the OPAQUE protocol begins).¶
Applications may have different policies about how and when identities are
determined. A natural approach is to tie client_identity to the identity the server uses
to fetch the envelope (determined during password registration) and tie server_identity
to the server identity used by the client to initiate an offline password
registration or online authenticated key exchange session. server_identity and client_identity can also
be part of the envelope or tied to the parties' public keys. In principle, identities
may change across different sessions as long as there is a policy that
can establish if the identity is acceptable or not to the peer. However, we note
that the public keys of both the server and the client must always be those defined
at the time of password registration.¶
The client identity (client_identity) and server identity (server_identity) are
optional parameters that are left to the application to designate as aliases for
the client and server. If the application layer does not supply values for these
parameters, then they will be omitted from the creation of the envelope
during the registration stage. Furthermore, they will be substituted with
client_identity = client and server_identity = server during
the authenticated key exchange stage.¶
The advantage of supplying a custom client_identity and server_identity (instead of simply relying
on a fallback to client and server) is that the client can then ensure that any
mappings between client_identity and client (and server_identity and server)
are protected by the authentication from the envelope. Then, the client can verify that the
client_identity and server_identity contained in its envelope match the client_identity
and server_identity supplied by the server.¶
However, if this extra layer of verification is unnecessary for the application, then simply
leaving client_identity and server_identity unspecified (and using client and
server instead) is acceptable.¶
10.4. Export Key Usage
The export key can be used (separately from the OPAQUE protocol) to provide confidentiality and integrity to other data that only the client should be able to process. For instance, if the client wishes to store secrets with a third party, then this export key can be used by the client to encrypt these secrets so that they remain hidden from a passive adversary that does not have access to the server's secret keys or the client's password.¶
10.5. Static Diffie-Hellman Oracles
While one can expect the practical security of the OPRF function (namely, the hardness of computing the function without knowing the key) to be in the order of computing discrete logarithms or solving Diffie-Hellman, Brown and Gallant [BG04] and Cheon [Cheon06] show an attack that slightly improves on generic attacks. For typical curves, the attack requires an infeasible number of calls to the OPRF or results in insignificant security loss; see Section 7.2.3 of [RFC9497] for more information. For OPAQUE, these attacks are particularly impractical as they translate into an infeasible number of failed authentication attempts directed at individual users.¶
10.6. Random-Key Robust MACs
The random-key robustness property for a MAC states
that, given two random keys k1 and k2, it is infeasible to find a message m
such that MAC(k1, m) = MAC(k2, m). Note that in general, not every MAC function
is key-robust. In particular, GMAC (which underlies GCM) does not satisfy
key-robustness, whereas HMAC with a collision
An application can choose to use a non-key-robust MAC within the AKE portion of
the protocol described in Section 6.4, but it MUST use a key-robust MAC
for the creation of the auth_tag parameter in Section 4.1.2.¶
10.7. Input Validation
Both client and server MUST validate the other party's public key(s) used for the execution of OPAQUE. This includes the keys shared during the registration phase, as well as any keys shared during the online key agreement phase. The validation procedure varies depending on the type of key. For example, for OPAQUE instantiations using 3DH with P-256, P-384, or P-521 as the underlying group, validation is as specified in Section 5.6.2.3.4 of [keyagreement]. This includes checking that the coordinates are in the correct range, that the point is on the curve, and that the point is not the point at infinity. Additionally, validation MUST ensure the Diffie-Hellman shared secret is not the point at infinity.¶
10.8. OPRF Key Stretching
Applying a key stretching function to the output of the OPRF greatly increases the cost of an offline attack upon the compromise of the credential file on the server. Applications SHOULD select parameters for the KSF that balance cost and complexity across different client implementations and deployments. Note that in OPAQUE, the key stretching function is executed by the client as opposed to the server in common password hashing scenarios. This means that applications must consider a tradeoff between the performance of the protocol on clients (specifically low-end devices) and protection against offline attacks after a server compromise.¶
10.9. Client Enumeration
Client enumeration refers to attacks where the attacker tries to learn whether
a given user identity is registered with a server or whether a reregistration
or change of password was performed for that user. OPAQUE counters these
attacks by requiring servers to act with unregistered client identities in a
way that is indistinguishabCredential as specified in
Section 6.3.2.2 for unregistered users and encrypting
Credential using a masking key. In this way, real and fake Credential
messages are indistinguishabCredential is less than that of the
client's cost of generating a Credential. Server implementations
may choose to forego the construction of a simulated credential response
message for an unregistered client if these client enumeration attacks can
be mitigated through other application
OPAQUE does not prevent this type of attack during the registration flow. Servers necessarily react differently during the registration flow between registered and unregistered clients. This allows an attacker to use the server's response during registration as an oracle for whether a given client identity is registered. Applications should mitigate against this type of attack by rate limiting or otherwise restricting the registration flow.¶
Finally, applications that do not require protection against
client enumeration attacks can choose to derive independent OPRF keys for different
clients. The advantage to using independentlyoprf_seed value across different clients, which, if leaked, would
compromise the security for all clients reliant on oprf_seed as noted in [DL24].¶
10.10. Protecting the Registration Masking Key
The user enumeration prevention method described in this document uses a
symmetric encryption key, masking_key, generated and sent to the server
by the client during registration. This requires a confidential channel
between client and server during registration, e.g., using TLS [RFC8446].
If the channel is only authenticated (this is a requirement for correct
identification of the parties), a confidential channel can be established
using public-key encryption, e.g., with HPKE [RFC9180]. However, the details
of this mechanism are out of scope for this document.¶
10.11. Password Salt and Storage Implications
In OPAQUE, the OPRF key acts as the secret salt value that ensures the infeasibility
of precomputation attacks. No extra salt value is needed. Also, clients never
disclose their passwords to the server, even during registration. Note that a corrupted
server can run an exhaustive offline dictionary attack to validate guesses for the client's
password; this is inevitable in any (single-server) aPAKE protocol. It can be avoided in
the case of OPAQUE by resorting to a multi-server threshold OPRF implementation,
e.g., [TOPPSS]. Furthermore, if the server does not
sample the PRF seed with sufficiently high entropy, or if it is not kept hidden from an
adversary, then any derivatives from the client's password may also be susceptible to an
offline dictionary attack to recover the original password.¶
Some applications may require learning the client's password to enforce password rules. Doing so invalidates this important security property of OPAQUE and is NOT RECOMMENDED unless it is not possible for applications to move such checks to the client. Note that limited checks at the server are possible to implement, e.g., detecting repeated passwords upon reregistrations or password change.¶
In general, passwords should be selected with sufficient entropy to avoid being susceptible to recovery through dictionary attacks, both online and offline.¶
10.12. AKE Private Key Storage
Server implementations of OPAQUE do not need access to the raw AKE private key. They only require
the ability to compute shared secrets as specified in Section 6.4.2. Thus, applications
may store the server AKE private key in a Hardware Security Module (HSM) or
similar. Upon compromise of oprf_seed and client envelopes, this would prevent an
attacker from using this data to mount a server spoofing attack. Supporting implementations
need to consider allowing separate AKE and OPRF algorithms in cases where the HSM is
incompatible with the OPRF algorithm.¶
10.13. Client Authentication Using Credentials
For scenarios in which the client has access to private state that can be persisted across
registration and login, the client can back up the randomized variable (as
computed in Section 5.2.3) so that upon a future login attempt, the client can
authenticate to the server using randomized instead of the original password.
This can be achieved by supplying an arbitrary password as input to
Create in the login phase, and then using randomized from
the backup in Recover (invoked by GenerateKE3) rather than computing it from
the password.¶
This provides an advantage over the regular authentication flow for login
in that if randomized is compromised, an adversary cannot use this value to
successfully impersonate the server to the client during login. The drawback is that it is
only applicable to settings where randomized can be treated as a credential
that can be stored securely after registration and retrieved upon login.¶
11. IANA Considerations
This document has no IANA actions.¶
12. References
12.1. Normative References
- [RFC2104]
-
Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, DOI 10
.17487 , , <https:///RFC2104 www >..rfc -editor .org /info /rfc2104 - [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC4086]
-
Eastlake 3rd, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, DOI 10
.17487 , , <https:///RFC4086 www >..rfc -editor .org /info /rfc4086 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC9497]
-
Davidson, A., Faz-Hernandez, A., Sullivan, N., and C. A. Wood, "Oblivious Pseudorandom Functions (OPRFs) Using Prime-Order Groups", RFC 9497, DOI 10
.17487 , , <https:///RFC9497 www >..rfc -editor .org /info /rfc9497
12.2. Informative References
- [BG04]
-
Brown, D. and R. Galant, "The Static Diffie-Hellman Problem", Cryptology ePrint Archive, Paper 2004/306, , <https://
eprint >..iacr .org /2004 /306 - [Boyen09]
-
Boyen, X., "HPAKE: Password Authentication Secure against Cross-Site User Impersonation", Cryptology and Network Security (CANS 2009), Lecture Notes in Computer Science, vol. 5888, pp. 279-298, DOI 10
.1007 , , <https:///978 -3 -642 -10433 -6 _19 doi >..org /10 .1007 /978 -3 -642 -10433 -6 _19 - [Canetti01]
-
Canetti, R., "Universally composable security: A new paradigm for cryptographic protocols", 42nd IEEE Symposium on Foundations of Computer Science, pp. 136-145, DOI 10
.1109 , , <https:///SFCS .2001 .959888 doi >..org /10 .1109 /SFCS .2001 .959888 - [Cheon06]
-
Cheon, J. H., "Security Analysis of the Strong Diffie-Hellman Problem", Advances in Cryptology - EUROCRYPT 2006, Lecture Notes in Computer Science, vol. 4004, pp. 1-11, DOI 10
.1007 , , <https:///11761679 _1 doi >..org /10 .1007 /11761679 _1 - [DL24]
-
Dayanikli, D. and A. Lehmann, "(Strong) aPAKE Revisited: Capturing Multi-User Security and Salting", Cryptology ePrint Archive, Paper 2024/756, , <https://
eprint >..iacr .org /2024 /756 - [FIPS202]
-
NIST, "SHA-3 Standard: Permutation
-Based Hash and Extendable , NIST FIPS 202, DOI 10-Output Functions" .6028 , , <https:///NIST .FIPS .202 nvlpubs >..nist .gov /nistpubs /FIPS /NIST .FIPS .202 .pdf - [FK00]
-
Ford, W. and B. S. Kaliski, Jr, "Server-assisted generation of a strong secret from a password", IEEE 9th International Workshops on Enabling Technologies: Infrastructure for Collaborative Enterprises (WET ICE 2000), pp. 176-180, DOI 10
.1109 , , <https:///ENABL .2000 .883724 doi >..org /10 .1109 /ENABL .2000 .883724 - [HJKW23]
-
Hesse, J., Jarecki, S., Krawczyk, H., and C. Wood, "Password
-Authenticated TLS via OPAQUE and Post-Handshake Authentication" , Advances in Cryptology - EUROCRYPT 2023, Lecture Notes in Computer Science, vol. 14008, pp. 98-127, DOI 10.1007 , , <https:///978 -3 -031 -30589 -4 _4 doi >..org /10 .1007 /978 -3 -031 -30589 -4 _4 - [HMQV]
-
Krawczyk, H., "HMQV: A High
-Performance Secure Diffie-Hellman Protocol" , Cryptology ePrint Archive, Paper 2005/176, , <https://eprint >..iacr .org /2005 /176 - [JKKX16]
-
Jarecki, S., Kiayias, A., Krawczyk, H., and J. Xu, "Highly
-Efficient and Composable Password , 2016 IEEE European Symposium on Security and Privacy (EuroS&P), pp. 276-291, DOI 10-Protected Secret Sharing (Or: How to Protect Your Bitcoin Wallet Online)" .1109 , , <https:///Euro SP .2016 .30 doi >..org /10 .1109 /Euro SP .2016 .30 - [JKX18]
-
Jarecki, S., Krawczyk, H., and J. Xu, "OPAQUE: An Asymmetric PAKE Protocol Secure Against Pre-Computation Attacks", Cryptology ePrint Archive, Paper 2018/163, , <https://
eprint >..iacr .org /2018 /163 - [keyagreement]
-
Barker, E., Chen, L., Roginsky, A., Vassilev, A., and R. Davis, "Recommendation for Pair-Wise Key
-Establishment Schemes Using Discrete Logarithm Cryptography" , DOI 10.6028 , NIST SP 800-56Ar3, , <https:///nist .sp .800 -56ar3 doi >..org /10 .6028 /nist .sp .800 -56ar3 - [Krawczyk20]
-
Krawczyk, H., "The OPAQUE Asymmetric PAKE Protocol", Work in Progress, Internet-Draft, draft
-krawczyk , , <https://-cfrg -opaque -06 datatracker >..ietf .org /doc /html /draft -krawczyk -cfrg -opaque -06 - [LGR20]
-
Len, J., Grubbs, P., and T. Ristenpart, "Partitioning Oracle Attacks", Cryptology ePrint Archive, Paper 2020/1491, , <https://
eprint >..iacr .org /2020 /1491 .pdf - [NISTCurves]
-
NIST, "Digital Signature Standard (DSS)", NIST FIPS 186-5, DOI 10
.6028 , , <https:///nist .fips .186 -5 doi >..org /10 .6028 /nist .fips .186 -5 - [RFC5869]
-
Krawczyk, H. and P. Eronen, "HMAC-based Extract
-and , RFC 5869, DOI 10-Expand Key Derivation Function (HKDF)" .17487 , , <https:///RFC5869 www >..rfc -editor .org /info /rfc5869 - [RFC7748]
-
Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves for Security", RFC 7748, DOI 10
.17487 , , <https:///RFC7748 www >..rfc -editor .org /info /rfc7748 - [RFC7914]
-
Percival, C. and S. Josefsson, "The scrypt Password-Based Key Derivation Function", RFC 7914, DOI 10
.17487 , , <https:///RFC7914 www >..rfc -editor .org /info /rfc7914 - [RFC8017]
-
Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, "PKCS #1: RSA Cryptography Specifications Version 2.2", RFC 8017, DOI 10
.17487 , , <https:///RFC8017 www >..rfc -editor .org /info /rfc8017 - [RFC8018]
-
Moriarty, K., Ed., Kaliski, B., and A. Rusch, "PKCS #5: Password-Based Cryptography Specification Version 2.1", RFC 8018, DOI 10
.17487 , , <https:///RFC8018 www >..rfc -editor .org /info /rfc8018 - [RFC8125]
-
Schmidt, J., "Requirements for Password
-Authenticated Key Agreement (PAKE) Schemes" , RFC 8125, DOI 10.17487 , , <https:///RFC8125 www >..rfc -editor .org /info /rfc8125 - [RFC8446]
-
Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10
.17487 , , <https:///RFC8446 www >..rfc -editor .org /info /rfc8446 - [RFC9106]
-
Biryukov, A., Dinu, D., Khovratovich, D., and S. Josefsson, "Argon2 Memory-Hard Function for Password Hashing and Proof-of-Work Applications", RFC 9106, DOI 10
.17487 , , <https:///RFC9106 www >..rfc -editor .org /info /rfc9106 - [RFC9180]
-
Barnes, R., Bhargavan, K., Lipp, B., and C. Wood, "Hybrid Public Key Encryption", RFC 9180, DOI 10
.17487 , , <https:///RFC9180 www >..rfc -editor .org /info /rfc9180 - [RFC9380]
-
Faz-Hernandez, A., Scott, S., Sullivan, N., Wahby, R. S., and C. A. Wood, "Hashing to Elliptic Curves", RFC 9380, DOI 10
.17487 , , <https:///RFC9380 www >..rfc -editor .org /info /rfc9380 - [RFC9496]
-
de Valence, H., Grigg, J., Hamburg, M., Lovecruft, I., Tankersley, G., and F. Valsorda, "The ristretto255 and decaf448 Groups", RFC 9496, DOI 10
.17487 , , <https:///RFC9496 www >..rfc -editor .org /info /rfc9496 - [SIGMA-I]
-
Krawczyk, H., "SIGMA: The 'SIGn-and-MAc' Approach to Authenticated Diffie-Hellman and its Use in the IKE Protocols", , <https://
www >..iacr .org /cryptodb /archive /2003 /CRYPTO /1495 /1495 .pdf - [TOPPSS]
-
Jarecki, S., Kiayias, A., Krawczyk, H., and J. Xu, "TOPPSS: Cost-Minimal Password
-Protected Secret Sharing based on Threshold OPRF" , Applied Cryptology and Network Security - ACNS 2017, Lecture Notes in Computer Science, vol. 10355, pp. 39-58, DOI 10.1007 , , <https:///978 -3 -319 -61204 -1 _3 doi >..org /10 .1007 /978 -3 -319 -61204 -1 _3 - [TripleDH]
-
Marlinspike, M., "Simplifying OTR deniability", Signal Blog, , <https://
signal >..org /blog /simplifying -otr -deniability - [WhatsAppE2E]
-
WhatsApp, "Security of End-to-End Encrypted Backups", WhatsApp Security Whitepaper, , <https://
www >..whatsapp .com /security /Whats App _Security _Encrypted _Backups _Whitepaper .pdf
Appendix A. Alternate Key Recovery Mechanisms
Client authentication material can be stored and retrieved using different key
recovery mechanisms. Any key recovery mechanism that encrypts data
in the envelope MUST use an authenticated encryption scheme with random
key-robustness (or key
We remark that export_key for authentication or encryption requires
no special properties from the authentication or encryption schemes
as long as export_key is used only after authentication material is successfully
recovered, i.e., after the MAC in Recover passes verification.¶
Appendix B. Alternate AKE Instantiations
It is possible to instantiate OPAQUE with other AKEs, such as HMQV [HMQV] and SIGMA-I [SIGMA-I]. HMQV is similar to 3DH but varies in its key schedule. SIGMA-I uses digital signatures rather than static DH keys for authentication. Specification of these instantiations is left to future documents. A sketch of how these instantiations might change is included in the next subsection for posterity.¶
OPAQUE may also be instantiated with any post-quantum (PQ) AKE protocol that has the message
flow above and security properties (KCI resistance and forward secrecy) outlined
in Section 10. Note that such an instantiation is not quantum-safe unless
the OPRF is quantum-safe. However, an OPAQUE instantiation where the AKE protocol is quantum-safe,
but the OPRF is not, would still ensure the confidentiality and integrity of application data encrypted
under session_key (or a key derived from it) with a quantum-safe encryption function.
However, the only effect of a break of the OPRF by a future quantum attacker would be
the ability of this attacker to run at that time an exhaustive dictionary
attack against the old user's password and only for users whose envelopes were
harvested while in use (in the case of OPAQUE run over a TLS channel with the
server, harvesting such envelopes requires targeted active attacks).¶
B.1. HMQV Instantiation Sketch
An HMQV instantiation would work similarly to OPAQUE-3DH, differing primarily in the key
schedule [HMQV]. First, the key schedule preamble value would use a different constant prefix
-- "HMQV" instead of "3DH" -- as shown below.¶
Second, the IKM derivation would change. Assuming HMQV is instantiated with a cyclic
group of prime order p with bit length L, clients would compute IKM as follows:¶
Likewise, servers would compute IKM as follows:¶
In both cases, u would be computed as follows:¶
Likewise, s would be computed as follows:¶
Hash is the same hash function used in the main OPAQUE protocol for key derivation. Its output length (in bits) must be at least L.¶
Both parties should perform validation (as in Section 10.7) on each other's public keys before computing the above parameters.¶
B.2. SIGMA-I Instantiation Sketch
A SIGMA-I [SIGMA-I] instantiation differs more drastically from OPAQUE-3DH since authentication
uses digital signatures instead of Diffie-Hellman. In particular, both KE2 and KE3
would carry a digital signature, computed using the server and client private keys
established during registration, respectively, as well as a MAC, where the MAC is
computed as in OPAQUE-3DH but it also covers the identity of the sender.¶
The key schedule would also change. Specifically, the key schedule preamble value would
use a different constant prefix -- "SIGMA-I" instead of "3DH" -- and the IKM computation
would use only the ephemeral public keys exchanged between client and server.¶
Appendix C. Test Vectors
This section contains real and fake test vectors for the OPAQUE-3DH specification. Each real test vector in Appendix C.1 specifies the configuration information, protocol inputs, intermediate values computed during registration and authentication, and protocol outputs.¶
Similarly, each fake test vector in Appendix C.2 specifies
the configuration information, protocol inputs, and protocol
outputs computed during the authentication of an unknown or unregistered user. Note that masking_key,
client, and client are used as additional inputs as described in
Section 6.3.2.2. client is used as the fake record's public key, and
masking_key is used for the fake record's masking key parameter.¶
All values are encoded in hexadecimal strings. The configuration information
includes the (OPRF, Hash, KSF, KDF, MAC, Group, Context) tuple, where the Group
matches that which is used in the OPRF. The KSF used for each test vector is the
identity function (denoted Identity), which returns as output the input message
supplied to the function without any modification, i.e., msg = Stretch(msg).¶
C.1. Real Test Vectors
Acknowledgments
We are indebted to the OPAQUE reviewers during CFRG's aPAKE selection process, particularly Julia Hesse and Bjorn Tackmann. This document has benefited from comments by multiple people. Special thanks to Richard Barnes, Dan Brown, Matt Campagna, Eric Crockett, Paul Grubbs, Fredrik Kuivinen, Stefan Marsiske, Payman Mohassel, Marta Mularczyk, Jason Resch, Greg Rubin, and Nick Sullivan. Hugo Krawczyk wishes to thank his OPAQUE co-authors Stas Jarecki and Jiayu Xu, without whom this work would have not been possible.¶