| Crates.io | sssui-mpc-rs |
| lib.rs | sssui-mpc-rs |
| version | 0.2.0 |
| created_at | 2025-09-20 20:41:11.62828+00 |
| updated_at | 2025-09-21 01:10:10.656099+00 |
| description | shamir-secret-sharing for SUI chain |
| homepage | |
| repository | https://github.com/chemonoworld/sssui |
| max_upload_size | |
| id | 1848174 |
| size | 82,009 |
A Rust implementation of Shamir Secret Sharing (SSS) for Multi-Party Computation (MPC) specifically designed for SUI chain integration. This crate provides secure and efficient cryptographic primitives for distributed secret sharing across multiple elliptic curves.
sssui-mpc-rs is the core Rust implementation that powers the SSSui cryptographic library. It implements Shamir Secret Sharing algorithms with support for multiple elliptic curves, enabling secure secret distribution and reconstruction in distributed systems.
sss module)split(): Splits a 32-byte secret into threshold sharescombine(): Reconstructs the original secret from sufficient sharessss_ed25519 module)keyshares module)KeysharePoints: Container for managing distributed key sharespoint module)Point256: 32-byte x,y coordinate representationmath module)Add this to your Cargo.toml:
[dependencies]
sssui-mpc-rs = "0.1.0"
[dependencies]
sssui-mpc-rs = { version = "0.1.0", features = ["k256", "p256"] }
k256: Enable secp256k1 support (default)p256: Enable secp256r1/NIST P-256 support (default)use sssui_mpc_rs::sss::{split, combine};
use sssui_mpc_rs::Secp256k1;
// Split a secret into 3 shares with threshold 2
let secret = [1u8; 32];
let point_xs = vec![[1u8; 32], [2u8; 32], [3u8; 32]];
let threshold = 2;
let shares = split::<Secp256k1>(secret, point_xs, threshold)?;
// Reconstruct secret from 2 shares
let reconstructed = combine::<Secp256k1>(&shares[0..2])?;
assert_eq!(secret, reconstructed);
use sssui_mpc_rs::keyshares::KeysharePoints;
use sssui_mpc_rs::point::Point256;
let points = vec![
Point256 { x: [1u8; 32], y: [2u8; 32] },
Point256 { x: [3u8; 32], y: [4u8; 32] },
];
let keyshares = KeysharePoints::new(points)?;
frost-ed25519, frost-core: FROST protocol implementationsk256, p256: Elliptic curve implementationselliptic-curve: Generic curve traits and utilitiesserde: Serialization supportrand_core: Secure random number generationThis project is licensed under the MIT License.