2db1bc8efa
* Save to disk coconut keypair * Check verification keys of the other signers * Post verification key to chain * Add multisig propose/vote for vks * Execute the proposal * Parse announce address argument * Gateway uses chain data * Network requester uses chain data * Native&socks5 clients use chain data * Credential client signature uses chain data * Remove redundant api endpoints * Undo debugging logging * Fix some tests * Fix clippy * Fix wasm client and contract test * More contract clippy * Update CHANGELOG * Use a bigger expiry period then the testing one
58 lines
1.6 KiB
Rust
58 lines
1.6 KiB
Rust
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
use std::convert::TryInto;
|
|
|
|
use bls12_381::Scalar;
|
|
|
|
pub use crate::traits::Bytable;
|
|
pub use elgamal::elgamal_keygen;
|
|
pub use elgamal::ElGamalKeyPair;
|
|
pub use elgamal::PublicKey;
|
|
pub use error::CoconutError;
|
|
pub use scheme::aggregation::aggregate_signature_shares;
|
|
pub use scheme::aggregation::aggregate_verification_keys;
|
|
pub use scheme::issuance::blind_sign;
|
|
pub use scheme::issuance::prepare_blind_sign;
|
|
pub use scheme::issuance::BlindSignRequest;
|
|
pub use scheme::keygen::ttp_keygen;
|
|
pub use scheme::keygen::KeyPair;
|
|
pub use scheme::keygen::SecretKey;
|
|
pub use scheme::keygen::VerificationKey;
|
|
pub use scheme::setup::setup;
|
|
pub use scheme::setup::Parameters;
|
|
pub use scheme::verification::check_vk_pairing;
|
|
pub use scheme::verification::prove_bandwidth_credential;
|
|
pub use scheme::verification::verify_credential;
|
|
pub use scheme::verification::Theta;
|
|
pub use scheme::BlindedSignature;
|
|
pub use scheme::Signature;
|
|
pub use scheme::SignatureShare;
|
|
pub use traits::Base58;
|
|
pub use utils::hash_to_scalar;
|
|
|
|
pub mod elgamal;
|
|
mod error;
|
|
mod impls;
|
|
mod proofs;
|
|
mod scheme;
|
|
pub mod tests;
|
|
mod traits;
|
|
mod utils;
|
|
|
|
pub type Attribute = Scalar;
|
|
pub type PrivateAttribute = Attribute;
|
|
pub type PublicAttribute = Attribute;
|
|
|
|
impl Bytable for Attribute {
|
|
fn to_byte_vec(&self) -> Vec<u8> {
|
|
self.to_bytes().to_vec()
|
|
}
|
|
|
|
fn try_from_byte_slice(slice: &[u8]) -> Result<Self, CoconutError> {
|
|
Ok(Attribute::from_bytes(slice.try_into().unwrap()).unwrap())
|
|
}
|
|
}
|
|
|
|
impl Base58 for Attribute {}
|