star-randsrv

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2022 License: MPL-2.0 Imports: 17 Imported by: 0

README

STAR Randomness Server

This repository implements a service that serves as a front end to the randomness server that's proposed in the paper STAR: Distributed Secret Sharing for Private Threshold Aggregation Reporting. The actual randomness server implementation (written in Rust) can be found in the sta-rs repository; this repository merely implements a Go wrapper that can be run inside an AWS Nitro Enclave.

Installation

To test, lint, and build the randomness server, simply run:

make

To build a reproducible Docker image of the randomness server, run:

make docker

Input

The randomness server exposes an HTTP POST request handler at /randomness. The handler expects a JSON-formatted request body. Below is an example of a valid request body.

{
  "points": [
    "uqUmPbpGjpqaQcVnbn39PZGtL4DjfY+h9R+XqlKLuVc=",
    "CCBnmLsPR8hFzuxhRz0a05TAh+p0jFhebMCDgOcfdWk=",
    "bNQSygww5ykQpfsDMJXTiaX/MmpWW4qnfmuRpdR/1yY="
  ]
}

The JSON array points contains a list of one or more Base64-encoded Ristretto points.

Output

The randomness server's response contains a similar JSON structure but its points are punctured based on the client-provided input and the server's secret key. Refer to the STAR paper for details. Below is an example of the server's response:

{
  "epoch": 0,
  "points": [
    "qC3vaUizBSrNZCCkzD3jBhHqMEWZIuNj5IdNk57GGHY=",
    "rh7Tcr1LqwVQVtCEEIZqwUCPDvBOMM5bJPA8EfShnzI=",
    "Bq8LJ0KpfwQHgh1tkr8OP+ogmxPQz7lWHfAPuyVxXU0="
  ]
}

Note that the array's ordering matters. The point at index n of the server's response corresponds to the point at index n of the client's request.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL