Rate This Document
Findability
Accuracy
Completeness
Readability

Calling the PIR Operator

  1. Configure KCAL settings, such as communication APIs and node IDs (node 0: server, and node 1: client), through DataGuard APIs.
  2. Initialize the function group for the PIR operator. This function group includes all the public APIs for the PIR operator.
  3. Apply the settings to KCAL.
  4. Set the information about all nodes.
  5. Select the appropriate compute node and call its corresponding API.
    Compute node 0 (server)
    1. Call the offlineCalculate function API to construct bucket data, which is used for query on the client in the online phase.
    2. Call the serverCalculate function API to respond to a query from the client and return a queried value.
    Compute node 1 (client)
    1. Once the offline calculation on the server is complete, call the clientCalculate function API and enter a key for query.
    2. Obtain the value corresponding to the key.

If either node (compute node 0 or 1) returns an error code when calling an API, the node needs to use a task scheduling mechanism to notify the other node to terminate the service process. For example, if compute node 1 returns an error code when calling the makeShare API and compute node 0 is waiting to receive shares, compute node 1, instead of the Software Development Kit (SDK) itself, needs to notify compute node 0 to stop receiving.