Crates.io | ark-secret-scalar |
lib.rs | ark-secret-scalar |
version | |
source | src |
created_at | 2025-01-24 19:15:18.19527+00 |
updated_at | 2025-01-24 19:15:18.19527+00 |
description | Secret scalars for non-constant-time fields and curves |
homepage | |
repository | https://github.com/w3f/ring-vrf/tree/master/ark-secret-scalar |
max_upload_size | |
id | 1529859 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Secret scalar split into the sum of two scalars, which randomly mutate but retain the same sum. Incurs 2x penalty in scalar multiplications, but provides side channel defenses.
We support &self
recievers throughout, like typical secret keys do.
We choose non-thread-safe interior mutability via UnsafeCell
which
avoids atomics, but makes SecretScalar
only Send
but !Sync
.
As Mutex<T: Send>: Send+Sync
, one should prefer Mutex<SecretKey>
over cloning SecretScalar
, simply to minimize clones of secret keys.