Skip to content

Commit

Permalink
update blsful dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Huseby <dwh@linuxprogrammer.org>
  • Loading branch information
dhuseby committed Mar 26, 2024
1 parent 7910fa6 commit 79f1bfc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "multisig"
version = "0.3.1"
version = "0.3.2"
edition = "2021"
authors = ["Dave Huseby <dwh@linuxprogrammer.org>"]
description = "Multisig self-describing multicodec implementation for digital signatures"
Expand All @@ -12,7 +12,7 @@ license = "Apache-2.0"
default = ["serde"]

[dependencies]
blsful = "2.5"
blsful = { version = "2.5", git = "https://github.com/mikelodder7/blsful.git" }
elliptic-curve = "0.13"
multibase = "0.9"
multicodec = { version = "0.3", git = "https://github.com/cryptidtech/rust-multicodec.git" }
Expand Down
4 changes: 3 additions & 1 deletion src/ms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ impl Builder {
{
let scheme_type_id = SchemeTypeId::from(sig);
let sig_bytes: Vec<u8> = sig.as_raw_value().to_bytes().as_ref().to_vec();
println!("signature length: {}", sig_bytes.len());
let codec = match sig_bytes.len() {
48 => Codec::Bls12381G1Sig, // G1Projective::to_compressed()
96 => Codec::Bls12381G2Sig, // G2Projective::to_compressed()
Expand Down Expand Up @@ -334,7 +335,8 @@ impl Builder {
let scheme_type_id = SchemeTypeId::from(sigshare);
let sigshare = sigshare.as_raw_value();
let identifier = sigshare.identifier();
let value = sigshare.value().to_vec();
let value = sigshare.value_vec();
println!("sigshare len: {}", value.len());
let codec = match value.len() {
48 => Codec::Bls12381G1SigShare, // large pubkeys, small signatures
96 => Codec::Bls12381G2SigShare, // small pubkeys, large signatures
Expand Down

0 comments on commit 79f1bfc

Please sign in to comment.