MCPcopy Index your code
hub / github.com/brave/sta-rs

github.com/brave/sta-rs @star-sharks-0.6.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release star-sharks-0.6.1 ↗ · + Follow
260 symbols 709 edges 27 files 36 documented · 14% updated 4d ago★ 6211 open issues

Browse by type

Functions 217 Types & classes 43
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

sta-rs

Rust workspace for implementing basic functionality of STAR: Distributed Secret-Sharing for Threshold Aggregation Reporting.

Disclaimer

WARNING the libraries present in this workspace have not been audited, use at your own risk! This code is under active development and may change substantially in future versions.

Crates

Quickstart

Build & test:

cargo build
cargo test

Benchmarks:

cargo bench

Open local copy of documentation:

cargo doc --open --no-deps

Example usage

WASM

See star-wasm for public API functions exposed by libraries.

  • The create_share function should be called by clients, and creates the share and tag sent in a STAR client message, as well as the encryption key used to encrypt data to the server. Once this function has been called, use key to encrypt the desired data into a ciphertext object (using a valid AES encryption method). The client should then send (ciphertext, share, tag) to the aggregation server.
  • The group_shares function takes in a collection of share objects and recovers the key object that the client used for encrypting ciphertext. This function only succeeds if the number of shares is higher than the prescribed threshold.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 130
Method 87
Class 40
Enum 2
Interface 1

Languages

Rust95%
TypeScript5%

Modules by API surface

ppoprf/src/ppoprf.rs47 symbols
star/src/lib.rs28 symbols
sharks/src/share_ff.rs27 symbols
ppoprf/src/ggm.rs22 symbols
adss/src/lib.rs22 symbols
sharks/src/lib.rs18 symbols
star/tests/e2e.rs16 symbols
star-wasm/www/index.js13 symbols
star/test-utils/src/lib.rs12 symbols
star/benches/bench.rs8 symbols
ppoprf/examples/server.rs8 symbols
star/src/strobe_rng.rs6 symbols

For agents

$ claude mcp add sta-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page