Content deleted Content added
Jasonkresch (talk | contribs) m →Sample OPRF Protocol: added reference to RFC 9380 |
Jasonkresch (talk | contribs) Added syntax highlighting to server, fixed code sample for client |
||
Line 64:
// Send request to server to obtain response
ECPoint
// Compute multiplicative inverse of b
Line 70:
// Unblind the response to produce the result
ECPoint result = ECMultiply(
// Hash the unblinded result to complete OPRF calculation
Line 80:
The client computes the multiplicative inverse of the blinding factor. This enables it to reverse the affect of the blinding factor on the result, and obtain the result the server would have returned had the client not blinded the input.
As a final step, to complete the OPRF, the client performs a [[Cryptographic_hash_function|one-way hash]] on the
Line 90:
The server receives the ''blinded input'' value from the client, and may perform authentication, access control, request throttling, or other security measures before processing the request. It then uses it's own secret, to compute:
<syntaxhighlight lang="java">
ECPoint processRequest(ECPoint blindedInput, Scalar secret) {
// Apply secret to compute the response
|