Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to hash-to-curve draft 16, with some API adjustments #90

Merged
merged 6 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rustdoc-args = [ "--html-in-header", "katex-header.html" ]
[dev-dependencies]
csv = ">= 1.0, < 1.2" # csv 1.2 has MSRV 1.60
criterion = "0.3"
hex = "0.4"
hex-literal = "0.3"
rand_xorshift = "0.3"
sha2 = "0.9"
sha3 = "0.9"
Expand Down Expand Up @@ -69,7 +69,7 @@ bits = ["ff/bits"]
groups = ["group"]
pairings = ["groups", "pairing"]
alloc = ["group/alloc"]
experimental = ["digest"]
experimental = ["digest", "groups"]
nightly = ["subtle/nightly"]

[[test]]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you want to propose "substantial" changes to this crate, please
* `alloc` (on by default): Enables APIs that require an allocator; these include pairing optimizations.
* `nightly`: Enables `subtle/nightly` which tries to prevent compiler optimizations that could jeopardize constant time operations. Requires the nightly Rust compiler.
* `experimental`: Enables experimental features. These features have no backwards-compatibility guarantees and may change at any time; users that depend on specific behaviour should pin an exact version of this crate. The current list of experimental features:
* Hashing to curves ([Internet Draft v12](https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-12))
* Hashing to curves ([Internet Draft v16](https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-16))

## [Documentation](https://docs.rs/bls12_381)

Expand Down
8 changes: 4 additions & 4 deletions benches/hash_to_curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn criterion_benchmark(c: &mut Criterion) {
move |b| {
b.iter(|| {
<G1Projective as HashToCurve<ExpandMsgXmd<sha2::Sha256>>>::encode_to_curve(
black_box(message),
[black_box(message)],
black_box(dst),
)
})
Expand All @@ -29,7 +29,7 @@ fn criterion_benchmark(c: &mut Criterion) {
c.bench_function(&format!("{} hash_to_curve SSWU SHA-256", name), move |b| {
b.iter(|| {
<G1Projective as HashToCurve<ExpandMsgXmd<sha2::Sha256>>>::hash_to_curve(
black_box(message),
[black_box(message)],
black_box(dst),
)
})
Expand All @@ -47,7 +47,7 @@ fn criterion_benchmark(c: &mut Criterion) {
move |b| {
b.iter(|| {
<G2Projective as HashToCurve<ExpandMsgXmd<sha2::Sha256>>>::encode_to_curve(
black_box(message),
[black_box(message)],
black_box(dst),
)
})
Expand All @@ -56,7 +56,7 @@ fn criterion_benchmark(c: &mut Criterion) {
c.bench_function(&format!("{} hash_to_curve SSWU SHA-256", name), move |b| {
b.iter(|| {
<G2Projective as HashToCurve<ExpandMsgXmd<sha2::Sha256>>>::hash_to_curve(
black_box(message),
[black_box(message)],
black_box(dst),
)
})
Expand Down
Loading
Loading