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

feat: add BLS12-381 #1

Closed
Closed
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Cargo.lock
**/*.rs.bk
.vscode
**/*.html
**/*.html
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "halo2curves"
version = "0.3.1"
version = "0.3.2"
authors = [
"Sean Bowe <[email protected]>",
"Jack Grigg <[email protected]>",
Expand All @@ -16,6 +16,7 @@ description = "Elliptic curve implementations and wrappers for halo2 library"
criterion = { version = "0.3", features = ["html_reports"] }
rand_xorshift = "0.3"
ark-std = { version = "0.3", features = ["print-trace"] }
pretty_assertions = "1.3.0"

[dependencies]
subtle = "2.4"
Expand Down
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nightly
7 changes: 7 additions & 0 deletions src/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ pub(crate) const fn adc(a: u64, b: u64, carry: bool) -> (u64, bool) {
a.carrying_add(b, carry)
}

/// Compute a + b + carry, returning the result and the new carry as a u64.
#[inline(always)]
pub(crate) const fn adc_u64(a: u64, b: u64, carry: u64) -> (u64, u64) {
let ret = (a as u128) + (b as u128) + (carry as u128);
(ret as u64, (ret >> 64) as u64)
}

/// Compute a - b - borrow, returning the result and the new borrow.
#[inline(always)]
pub(crate) const fn sbb(a: u64, b: u64, borrow: bool) -> (u64, bool) {
Expand Down
Loading