mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 22:08:30 +00:00
Update BLS library
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use super::PublicKey;
|
||||
use bls_aggregates::AggregatePublicKey as RawAggregatePublicKey;
|
||||
use milagro_bls::AggregatePublicKey as RawAggregatePublicKey;
|
||||
|
||||
/// A BLS aggregate public key.
|
||||
///
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use super::*;
|
||||
use bls_aggregates::{
|
||||
use cached_tree_hash::cached_tree_hash_ssz_encoding_as_vector;
|
||||
use milagro_bls::{
|
||||
AggregatePublicKey as RawAggregatePublicKey, AggregateSignature as RawAggregateSignature,
|
||||
};
|
||||
use cached_tree_hash::cached_tree_hash_ssz_encoding_as_vector;
|
||||
use serde::de::{Deserialize, Deserializer};
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use serde_hex::{encode as hex_encode, HexVisitor};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
extern crate bls_aggregates;
|
||||
extern crate milagro_bls;
|
||||
extern crate ssz;
|
||||
|
||||
#[macro_use]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::{SecretKey, BLS_PUBLIC_KEY_BYTE_SIZE};
|
||||
use bls_aggregates::PublicKey as RawPublicKey;
|
||||
use cached_tree_hash::cached_tree_hash_ssz_encoding_as_vector;
|
||||
use milagro_bls::PublicKey as RawPublicKey;
|
||||
use serde::de::{Deserialize, Deserializer};
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use serde_hex::{encode as hex_encode, HexVisitor};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::BLS_SECRET_KEY_BYTE_SIZE;
|
||||
use bls_aggregates::SecretKey as RawSecretKey;
|
||||
use hex::encode as hex_encode;
|
||||
use milagro_bls::SecretKey as RawSecretKey;
|
||||
use serde::de::{Deserialize, Deserializer};
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use serde_hex::HexVisitor;
|
||||
@@ -16,7 +16,7 @@ pub struct SecretKey(RawSecretKey);
|
||||
|
||||
impl SecretKey {
|
||||
pub fn random() -> Self {
|
||||
SecretKey(RawSecretKey::random())
|
||||
SecretKey(RawSecretKey::random(&mut rand::thread_rng()))
|
||||
}
|
||||
|
||||
/// Returns the underlying point as compressed bytes.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use super::{PublicKey, SecretKey, BLS_SIG_BYTE_SIZE};
|
||||
use bls_aggregates::Signature as RawSignature;
|
||||
use cached_tree_hash::cached_tree_hash_ssz_encoding_as_vector;
|
||||
use hex::encode as hex_encode;
|
||||
use milagro_bls::Signature as RawSignature;
|
||||
use serde::de::{Deserialize, Deserializer};
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use serde_hex::HexVisitor;
|
||||
|
||||
Reference in New Issue
Block a user