Oblivious pseudorandom function: Difference between revisions

Content deleted Content added
m Sample OPRF Protocol: added reference to RFC 9380
Added syntax highlighting to server, fixed code sample for client
Line 64:
 
// Send request to server to obtain response
ECPoint server responseserverResponse = sendRequest(blindedInput);
// Compute multiplicative inverse of b
Line 70:
// Unblind the response to produce the result
ECPoint result = ECMultiply(responseserverResponse, i);
 
// 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 outputresult to ensure the OPRF output is [[Discrete_uniform_distribution|uniform]], completely [[pseudorandom]], and non-invertible.
 
 
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