Skip to main content

Crate confium_tc_elgamal_p256

Crate confium_tc_elgamal_p256 

Source
Expand description

Threshold ElGamal over P-256.

Real implementation using P-256 group operations. Threshold variant: the secret key x is Shamir-shared among N parties; any T can decrypt collaboratively. The decryption produces the original shared secret point.

Used for medium-term sealed data (5-10 year appeals window in OIML CNML).

See TODO.roadmap/31-threshold-encryption.md for full spec.

Re-exports§

pub use keys::generate_keypair;
pub use shamir::Share;
pub use shamir::recover_secret;
pub use shamir::split_secret;

Modules§

keys
Keypair generation for threshold ElGamal-P256.
shamir
Real Shamir secret sharing over the P-256 scalar field.

Structs§

Ciphertext
Ciphertext: pair of EC points (c1, c2) per ElGamal.
DecryptionShare
Share of the secret key held by one party. The secret bytes field is zeroized on drop.
PartialDecryption
A partial decryption from one party.
PublicKey
Public key wrapping an affine P-256 point.

Enums§

ElGamalError
Errors during threshold ElGamal operations.

Constants§

ALGORITHM
Algorithm identifier.

Functions§

aggregate_partials
Aggregate T partial decryptions into the shared secret point.
encapsulate
Encapsulate a fresh shared secret to recipient_public_key.
partial_decrypt
Compute a partial decryption: share * c1.