Crate blsful

Source
Expand description

This crate implements BLS signatures according to the IETF latest draft

for the Proof of Possession Cipher Suite

Since BLS signatures can use either G1 or G2 fields, there are two types of public keys and signatures.

Re-exports§

pub use vsss_rs;

Modules§

inner_types
The inner representation types

Structs§

Bls12381G1Hasher
The BLS12381 G1 hash to public key group
Bls12381G1Impl
Represents BLS signatures on the BLS12-381 curve where Signatures are in G1 and Public Keys are in G2 or i.e. signatures are small and public keys are large
Bls12381G2Hasher
The BLS12381 G1 hash to public key group
Bls12381G2Impl
Represents BLS signatures on the BLS12-381 curve where Signatures are in G2 and Public Keys are in G1 or i.e. signatures are large and public keys are small
BlsSignature
A BLS signature implementation
ElGamalCiphertext
An ElGamal ciphertext
ElGamalDecryptionKey
An ElGamal decryption key where the secret key is hidden or combined from shares that can decrypt ciphertext
ElGamalDecryptionShare
A public key share is a point on the curve Must be combined with other public key shares in order to decrypt a ciphertext
ElGamalProof
A Discrete Log Proof tied to a specific ElGamal ciphertext
InnerPointShareG1
The share type for points in G1
InnerPointShareG2
The share type for points in G2
MultiPublicKey
An accumulated public key
ProofCommitmentChallenge
The proof of knowledge challenge value generated by the server in step 2 of the proof generation process
ProofCommitmentSecret
A commitment secret used to create the proof of knowledge
ProofOfKnowledgeTimestamp
A signature proof of knowledge based on a timestamp
ProofOfPossession
A proof of possession of the secret key
PublicKey
A BLS public key
PublicKeyShare
A public key share is point on the curve. See Section 4.3 in https://eprint.iacr.org/2016/663.pdf Must be combined with other public key shares to produce the completed key, or used for creating partial signatures which can be combined into a complete signature
SecretKey
The secret key is field element 0 < x < r where r is the curve order. See Section 4.3 in https://eprint.iacr.org/2016/663.pdf
SecretKeyShare
A secret key share is field element 0 < x < r where r is the curve order. See Section 4.3 in https://eprint.iacr.org/2016/663.pdf Must be combined with other secret key shares to produce the completed key, or used for creating partial signatures which can be combined into a complete signature
SignCryptCiphertext
The ciphertext output from sign crypt encryption
SignCryptDecryptionKey
A Signcrypt decryption key where the secret key is hidden or combined from shares that can decrypt ciphertext
SignDecryptionShare
A public key share is point on the curve. See Section 4.3 in https://eprint.iacr.org/2016/663.pdf Must be combined with other public key shares to produce the completed key, or used for creating partial signatures which can be combined into a complete signature
TimeCryptCiphertext
The ciphertext output from time lock encryption

Enums§

AggregateSignature
Represents a BLS signature for multiple signatures that signed different messages
Bls12381
A convenience wrapper for the two BLS signature implementations that doesn’t require specifying the generics and can be used in trait object like situations.
BlsError
The error types generated by this library
MultiSignature
Represents a BLS signature for multiple signatures that signed different messages
ProofCommitment
The commitment portion of the signature proof of knowledge
ProofOfKnowledge
A signature proof of knowledge
SecretKeyEnum
A BLS secret key implementation that doesn’t expose the underlying curve and signature scheme and can be used in situations where the specific implementation is not known at compile time and where trait objects are desirable but can’t be used due to the lack of Sized trait. The downside is the type is now indicated with a byte or string for serialization and deserialization. If this is not desirable, then use SecretKey<C> instead.
Signature
A BLS signature wrapped in the appropriate scheme used to generate it
SignatureSchemes
The BLS signature algorithm schemes
SignatureShare
Represents a share of a signature

Constants§

SECRET_KEY_BYTES
Number of bytes needed to represent the secret key

Traits§

BlsElGamal
The methods for implementing ElGamal encryption and derived ZKPs
BlsMultiKey
A trait that defines the BLS schemes that support multi-signatures
BlsMultiSignature
A trait that defines the BLS schemes that support multi-signatures
BlsSerde
Serialization trait for inner types
BlsSignCrypt
The methods for implementing SignCryption as described in https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.119.1717&rep=rep1&type=pdf
BlsSignatureBasic
BLS signature basic trait
BlsSignatureCore
The core methods used by BLS signatures
BlsSignatureImpl
Types that implement BLS signatures
BlsSignatureMessageAugmentation
BLS signature augmentation trait
BlsSignaturePop
BLS signature proof of possession trait
BlsSignatureProof
Methods for creating a signature proof of knowledge as in https://miracl.com/assets/pdf-downloads/mpin4.pdf
BlsTimeCrypt
Implement time lock encryption
HashToPoint
The hash to curve point methods
HashToScalar
The hash to scalar methods
Pairing
Operations that support pairing trait

Type Aliases§

Bls12381G1
A BLS signature implementation using G1 for signatures and G2 for public keys
Bls12381G2
A BLS signature implementation using G2 for signatures and G1 for public keys
BlsResult
The result type generated by this library