Oblivious pseudorandom function: Difference between revisions

Content deleted Content added
m Updated syntax highlighting
Tags: Mobile edit Mobile web edit
Line 49:
The following code represents calculations performed by the client, or the first-party.
 
<syntaxhighlight lang="java">
<pre>
 
byte[] computeOPRF(byte[] input) {
Line 73:
// Hash the unblinded result to complete OPRF calculation
return hash(result);
</syntaxhighlight>
</pre>
 
Notes:
Line 89:
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>
<pre>
ECPoint processRequest(ECPoint blindedInput, Scalar secret) {
// Apply secret to compute the response
Line 95:
return response;
}
</syntaxhighlight>
</pre>
 
It then returns the response, which is the blinded output, to the client.