Skip to content

Commit 04fa77e

Browse files
committed
Add .unwrap() disclaimer
1 parent d044e83 commit 04fa77e

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

packages/crypto/src/bls12_318/hash.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
//!
2+
//! Note about the usage of `.unwrap()` here:
3+
//!
4+
//! Since the underlying curve implementation, when implemented sanely, should never request 255 curve elements at the same time,
5+
//! the expansion will always finish without exiting with an error (since that is the only "ABORT" condition).
6+
//!
7+
//! Therefore we can conclude, if the implementation is done as defined in the IETF publication, won't ever error out.
8+
//!
9+
//! IETF doc in question: <https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-12#section-5.4.1>
10+
//!
11+
//! In addition to that I (@aumetra) skimmed through the tree of traits making up our hash-to-curve configuration,
12+
//! and I have not found a condition where an error is returned.
13+
//!
14+
//! ark crate versions that I looked at:
15+
//!
16+
//! - ark-bls12-381 v0.4.0
17+
//! - ark-ec v0.4.2
18+
//! - ark-ff v0.4.2
19+
//!
20+
121
use ark_bls12_381::{g1, g2};
222
use ark_ec::{
323
hashing::{

packages/std/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ cosmwasm_2_1 = ["cosmwasm_2_0"]
5959
base64 = "0.22.0"
6060
cosmwasm-derive = { version = "2.0.1", path = "../derive" }
6161
cosmwasm-core = { path = "../core", version = "2.0.1", features = ["std"] }
62+
cosmwasm-crypto = { version = "2.0.1", path = "../crypto" }
6263
derive_more = { version = "1.0.0-beta.6", default-features = false, features = ["debug"] }
6364
hex = "0.4"
6465
schemars = { workspace = true }

0 commit comments

Comments
 (0)