Oblivious pseudorandom functions

OPRF-Ristretto255-SHA-512

Oblivious pseudorandom function over ristretto255 with SHA-512

unverified Root API only
Unverified tier.

Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About OPRF-Ristretto255-SHA-512

OPRF-Ristretto255-SHA-512 is an oblivious pseudorandom function from the OPRF (RFC 9497) family. It uses a 32-byte public key and a 32-byte secret key. Its registry entry cites RFC 9497 OPRF mode 0x00, ristretto255-SHA512. It is also known as oprf. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

Overview

An oblivious pseudorandom function lets a client obtain PRF(k, x) from a server holding key k, without the server learning x and without the client learning k. It is a building block for OPAQUE, Privacy Pass and private set intersection.

RFC 9497 instantiates OPRFs in prime-order groups. The client hashes its input to a group element and blinds it with a random scalar r. The server multiplies the blinded element by its secret key k and returns the result. The client removes the blind by multiplying by 1/r and hashes the input with the unblinded element to produce the output. The server sees only a uniformly random group element.

The RFC defines three modes: OPRF (mode 0x00), the basic protocol; VOPRF, which adds a zero-knowledge proof that the server used a committed key; and POPRF, which adds public input. Only the base mode is present here, so the client cannot verify which key the server used. One suite is present: ristretto255-SHA512, which uses the ristretto255 prime-order group and SHA-512 with RFC 9380 style hash-to-group.

History

2023–2023
  1. Specified in RFC 9497 OPRF mode 0x00

How it works

  1. Blind: the client maps input x to a group element P = H(x) and sends B = r*P.
  2. Evaluate: the server returns Z = k*B.
  3. Finalize: the client computes N = (1/r)*Z = k*P.
  4. The output is a hash of x and N.

Security notes

Base mode is not verifiable, so a malicious server could use different keys for different users to link them; use VOPRF where that matters. Not post-quantum.

Typical uses

Password hardening in OPAQUEPrivacy Pass anonymous tokensPrivate set intersection and private contact discovery

Sizes

FieldBytesMeaning
pk32Public key
sk32Secret key

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'unverified' is reachable from the root API only
info = root.info("oprf-ristretto255-sha512")

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Frequently asked questions

What is OPRF-Ristretto255-SHA-512?

OPRF-Ristretto255-SHA-512 is an OPRF in the OPRF (RFC 9497) family. An oblivious pseudorandom function lets a client obtain PRF(k, x) from a server holding key k, without the server learning x and without the client learning k. It is also known as oprf.

What are the OPRF-Ristretto255-SHA-512 sizes?

In NextSSL, OPRF-Ristretto255-SHA-512 uses: public key 32 bytes.

Who designed OPRF-Ristretto255-SHA-512 and when?

OPRF-Ristretto255-SHA-512 belongs to the OPRF (RFC 9497) family, first published in 2023 by Alex Davidson, Armando Faz-Hernández, Nick Sullivan, Christopher A. Wood. Its origin: IRTF CFRG, RFC 9497.

Which standards define OPRF-Ristretto255-SHA-512?

OPRF-Ristretto255-SHA-512 is referenced by RFC 9497 OPRF mode 0x00, ristretto255-SHA512.

Is OPRF-Ristretto255-SHA-512 safe to use?

OPRF-Ristretto255-SHA-512 is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).