Skip to content

brave/sta-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

54973c8 · Mar 13, 2025
Mar 13, 2025
Oct 11, 2024
Mar 13, 2025
Nov 9, 2023
Mar 13, 2025
Mar 13, 2025
Mar 10, 2022
Sep 14, 2021
Sep 18, 2023
Apr 21, 2022
Aug 2, 2023
May 17, 2022
Sep 29, 2023
Apr 5, 2022

Repository files navigation

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.