GithubHelp home page GithubHelp logo

isabella232 / star-randsrv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brave/star-randsrv

0.0 0.0 0.0 47 KB

Go wrapper service for the STAR randomness server.

License: Mozilla Public License 2.0

C 3.78% Go 53.06% Rust 29.16% Makefile 8.70% Dockerfile 5.29%

star-randsrv's Introduction

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": [
    "90aaa9713616607aed7a0eb685511c5862e4c3a2fecf21a748bce5b33077492e",
    "a4e0b94d2cb2d93ac397caaf0bb1798224fbec29da4ebce6cd134d3970d2de0e",
    "8297f13c55137c9bca743eb1e46ef8543f41c5d6f779fb0760937477bbeed171"
  ]
}

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

Output

The randomness server's response contains the same 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:

{
  "points": [
    "36c597dd76699a38adfd7f05a7ce48f756ea15a1f256895c96bbe7b597a94362",
    "24116ce3b99a7c0aa438aa3de952af76f493033f1c4ce0336f9f0715d55a4c41",
    "9617887e50ec4d5f1a525fe2cd10214c2e7949eaa2db0e6366435c902988ca1a"
  ]
}

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.

star-randsrv's People

Contributors

rillian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.