[−][src]Trait bls_sigs_ref_rs::BLSSigCore
BLS signature implementation
Associated Types
type PKType: CurveProjective<Engine = Self::Engine, Scalar = Self::Scalar> + SerDes
The type of the public key
Required methods
fn keygen<B: AsRef<[u8]>>(sk: B) -> (Self::Scalar, Self::PKType)
Generate secret exponent and public key
- input: the secret key as bytes
- output: the actual secret key x_prime, a.k.a, the secret scala
- output: the public key g^x_prime
fn core_sign<B: AsRef<[u8]>, C: AsRef<[u8]>>(
x_prime: Self::Scalar,
msg: B,
ciphersuite: C
) -> Self
x_prime: Self::Scalar,
msg: B,
ciphersuite: C
) -> Self
Sign a message
- input: the actual secret key x_prime
- input: the message as bytes
- input: the ciphersuite ID
- output: a signature
fn core_verify<B: AsRef<[u8]>, C: AsRef<[u8]>>(
pk: Self::PKType,
sig: Self,
msg: B,
ciphersuite: C
) -> bool
pk: Self::PKType,
sig: Self,
msg: B,
ciphersuite: C
) -> bool
Verify a signature
- input: public key, a group element
- input: signature, a group element
- input: the message as bytes
- input: ciphersuite ID
- output: if the signature is valid or not
fn core_aggregate_verify<B: AsRef<[u8]>, C: AsRef<[u8]>>(
pks: &[Self::PKType],
msgs: &[B],
sig: Self,
ciphersuite: C
) -> bool
pks: &[Self::PKType],
msgs: &[B],
sig: Self,
ciphersuite: C
) -> bool
Verify an aggregated signature
Provided methods
Loading content...Implementations on Foreign Types
impl BLSSigCore for G1
[src]
type PKType = G2
fn keygen<B: AsRef<[u8]>>(sk: B) -> (Fr, G2)
[src]
fn core_sign<B: AsRef<[u8]>, C: AsRef<[u8]>>(
x_prime: Fr,
msg: B,
ciphersuite: C
) -> G1
[src]
x_prime: Fr,
msg: B,
ciphersuite: C
) -> G1
fn core_verify<B: AsRef<[u8]>, C: AsRef<[u8]>>(
pk: G2,
sig: G1,
msg: B,
ciphersuite: C
) -> bool
[src]
pk: G2,
sig: G1,
msg: B,
ciphersuite: C
) -> bool
fn core_aggregate_verify<B: AsRef<[u8]>, C: AsRef<[u8]>>(
pks: &[G2],
msgs: &[B],
sig: G1,
ciphersuite: C
) -> bool
[src]
pks: &[G2],
msgs: &[B],
sig: G1,
ciphersuite: C
) -> bool
impl BLSSigCore for G2
[src]
type PKType = G1
fn keygen<B: AsRef<[u8]>>(sk: B) -> (Fr, G1)
[src]
fn core_sign<B: AsRef<[u8]>, C: AsRef<[u8]>>(
x_prime: Fr,
msg: B,
ciphersuite: C
) -> G2
[src]
x_prime: Fr,
msg: B,
ciphersuite: C
) -> G2
fn core_verify<B: AsRef<[u8]>, C: AsRef<[u8]>>(
pk: G1,
sig: G2,
msg: B,
ciphersuite: C
) -> bool
[src]
pk: G1,
sig: G2,
msg: B,
ciphersuite: C
) -> bool
fn core_aggregate_verify<B: AsRef<[u8]>, C: AsRef<[u8]>>(
pks: &[G1],
msgs: &[B],
sig: G2,
ciphersuite: C
) -> bool
[src]
pks: &[G1],
msgs: &[B],
sig: G2,
ciphersuite: C
) -> bool