Type Alias hotshot_types::signature_key::BLSPubKey

source ·
pub type BLSPubKey = VerKey;
Expand description

BLS public key used to verify a signature

Aliased Type§

struct BLSPubKey(/* private fields */);

Trait Implementations§

source§

impl SignatureKey for BLSPubKey

source§

type PrivateKey = SignKey

The private key type for this signature algorithm
source§

type StakeTableEntry = StakeTableEntry<VerKey>

The type of the entry that contain both public key and stake value
source§

type QcParams = QcParams<VerKey, <BLSOverBN254CurveSignatureScheme as SignatureScheme>::PublicParameter>

The type of the quorum certificate parameters used for assembled signature
source§

type PureAssembledSignatureType = <BLSOverBN254CurveSignatureScheme as SignatureScheme>::Signature

The type of the assembled signature, without BitVec
source§

type QcType = (<VerKey as SignatureKey>::PureAssembledSignatureType, BitVec)

The type of the assembled qc: assembled signature + BitVec
source§

type SignError = SignatureError

Type of error that can occur when signing data
source§

fn validate( &self, signature: &Self::PureAssembledSignatureType, data: &[u8], ) -> bool

Validate a signature
source§

fn sign( sk: &Self::PrivateKey, data: &[u8], ) -> Result<Self::PureAssembledSignatureType, Self::SignError>

Produce a signature Read more
source§

fn from_private(private_key: &Self::PrivateKey) -> Self

Produce a public key from a private key
source§

fn to_bytes(&self) -> Vec<u8>

Serialize a public key to bytes
source§

fn from_bytes(bytes: &[u8]) -> Result<Self, SerializationError>

Deserialize a public key from bytes Read more
source§

fn generated_from_seed_indexed( seed: [u8; 32], index: u64, ) -> (Self, Self::PrivateKey)

Generate a new key pair
source§

fn stake_table_entry(&self, stake: u64) -> Self::StakeTableEntry

get the stake table entry from the public key and stake value
source§

fn public_key(entry: &Self::StakeTableEntry) -> Self

only get the public key from the stake table entry
source§

fn public_parameter( stake_entries: Vec<Self::StakeTableEntry>, threshold: U256, ) -> Self::QcParams

get the public parameter for the assembled signature checking
source§

fn check(real_qc_pp: &Self::QcParams, data: &[u8], qc: &Self::QcType) -> bool

check the quorum certificate for the assembled signature
source§

fn sig_proof( signature: &Self::QcType, ) -> (Self::PureAssembledSignatureType, BitVec)

get the assembled signature and the BitVec separately from the assembled signature
source§

fn assemble( real_qc_pp: &Self::QcParams, signers: &BitSlice, sigs: &[Self::PureAssembledSignatureType], ) -> Self::QcType

assemble the signature from the partial signature and the indication of signers in BitVec
source§

fn genesis_proposer_pk() -> Self

generates the genesis public key. Meant to be dummy/filler