Skip to content

Commit e27df87

Browse files
Rename SHA-256 to SHA-2
1 parent e927567 commit e27df87

File tree

50 files changed

+231
-211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+231
-211
lines changed

.github/workflows/extension-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- { name: "rv32im", path: "rv32im" }
2929
- { name: "native", path: "native" }
3030
- { name: "keccak256", path: "keccak256" }
31-
- { name: "sha256", path: "sha256" }
31+
- { name: "sha2", path: "sha2" }
3232
- { name: "bigint", path: "bigint" }
3333
- { name: "algebra", path: "algebra" }
3434
- { name: "ecc", path: "ecc" }

.github/workflows/primitives.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
paths:
99
- "crates/circuits/primitives/**"
1010
- "crates/circuits/poseidon2-air/**"
11-
- "crates/circuits/sha-air/**"
11+
- "crates/circuits/sha2-air/**"
1212
- "crates/circuits/mod-builder/**"
1313
- "Cargo.toml"
1414
- ".github/workflows/primitives.yml"
@@ -47,8 +47,8 @@ jobs:
4747
run: |
4848
cargo nextest run --cargo-profile fast --features parallel
4949
50-
- name: Run tests for sha-air
51-
working-directory: crates/circuits/sha-air
50+
- name: Run tests for sha2-air
51+
working-directory: crates/circuits/sha2-air
5252
run: |
5353
cargo nextest run --cargo-profile fast --features parallel
5454

Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ members = [
5151
"extensions/keccak256/transpiler",
5252
"extensions/keccak256/guest",
5353
"extensions/keccak256/tests",
54-
"extensions/sha256/circuit",
55-
"extensions/sha256/transpiler",
56-
"extensions/sha256/guest",
57-
"extensions/sha256/tests",
54+
"extensions/sha2/circuit",
55+
"extensions/sha2/transpiler",
56+
"extensions/sha2/guest",
57+
"extensions/sha2/tests",
5858
"extensions/ecc/circuit",
5959
"extensions/ecc/transpiler",
6060
"extensions/ecc/guest",
@@ -112,7 +112,7 @@ openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", ta
112112
openvm-sdk = { path = "crates/sdk", default-features = false }
113113
openvm-mod-circuit-builder = { path = "crates/circuits/mod-builder", default-features = false }
114114
openvm-poseidon2-air = { path = "crates/circuits/poseidon2-air", default-features = false }
115-
openvm-sha-air = { path = "crates/circuits/sha-air", default-features = false }
115+
openvm-sha2-air = { path = "crates/circuits/sha2-air", default-features = false }
116116
openvm-sha-macros = { path = "crates/circuits/sha-macros", default-features = false }
117117
openvm-circuit-primitives = { path = "crates/circuits/primitives", default-features = false }
118118
openvm-circuit-primitives-derive = { path = "crates/circuits/primitives/derive", default-features = false }
@@ -141,9 +141,9 @@ openvm-native-recursion = { path = "extensions/native/recursion", default-featur
141141
openvm-keccak256-circuit = { path = "extensions/keccak256/circuit", default-features = false }
142142
openvm-keccak256-transpiler = { path = "extensions/keccak256/transpiler", default-features = false }
143143
openvm-keccak256-guest = { path = "extensions/keccak256/guest", default-features = false }
144-
openvm-sha256-circuit = { path = "extensions/sha256/circuit", default-features = false }
145-
openvm-sha256-transpiler = { path = "extensions/sha256/transpiler", default-features = false }
146-
openvm-sha256-guest = { path = "extensions/sha256/guest", default-features = false }
144+
openvm-sha2-circuit = { path = "extensions/sha2/circuit", default-features = false }
145+
openvm-sha2-transpiler = { path = "extensions/sha2/transpiler", default-features = false }
146+
openvm-sha2-guest = { path = "extensions/sha2/guest", default-features = false }
147147
openvm-bigint-circuit = { path = "extensions/bigint/circuit", default-features = false }
148148
openvm-bigint-transpiler = { path = "extensions/bigint/transpiler", default-features = false }
149149
openvm-bigint-guest = { path = "extensions/bigint/guest", default-features = false }
@@ -212,7 +212,7 @@ rrs-lib = "0.1.0"
212212
rand = { version = "0.8.5", default-features = false }
213213
hex = { version = "0.4.3", default-features = false }
214214
serde-big-array = "0.5.1"
215-
ndarray = "0.16.1"
215+
ndarray = { version = "0.16.1", default-features = false }
216216

217217
# default-features = false for no_std for use in guest programs
218218
itertools = { version = "0.14.0", default-features = false }

benchmarks/programs/kitchen-sink/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ openvm-pairing-guest = { path = "../../../extensions/pairing/guest", default-fea
1818
"bls12_381",
1919
] }
2020
openvm-keccak256-guest = { path = "../../../extensions/keccak256/guest", default-features = false }
21-
openvm-sha256-guest = { path = "../../../extensions/sha256/guest", default-features = false }
21+
openvm-sha2-guest = { path = "../../../extensions/sha2/guest", default-features = false }
2222
openvm-bigint-guest = { path = "../../../extensions/bigint/guest", default-features = false }
2323
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
2424
serde = "1.0"

benchmarks/programs/kitchen-sink/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{hint::black_box, mem::transmute};
33
use openvm_algebra_guest::IntMod;
44
use openvm_bigint_guest::I256;
55
use openvm_keccak256_guest::keccak256;
6-
use openvm_sha256_guest::sha256;
6+
use openvm_sha2_guest::sha256;
77
#[allow(unused_imports)]
88
use {
99
openvm_ecc_guest::{

benchmarks/src/bin/kitchen_sink.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn main() -> Result<()> {
3030
.rv32m(Default::default())
3131
.io(Default::default())
3232
.keccak(Default::default())
33-
.sha256(Default::default())
33+
.sha2(Default::default())
3434
.bigint(Default::default())
3535
.modular(ModularExtension::new(vec![
3636
BigUint::from_str("1000000000000000003").unwrap(),

book/src/custom-extensions/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ You can seamlessly integrate certain performance-optimized extensions maintained
55
In this chapter, we will explain how to use the following existing extensions:
66

77
- [`openvm-keccak-guest`](./keccak.md) - Keccak256 hash function.
8-
- [`openvm-sha256-guest`](./sha256.md) - SHA2-256 hash function.
8+
- [`openvm-sha2-guest`](./sha2.md) - SHA2 hash functions.
99
- [`openvm-bigint-guest`](./bigint.md) - Big integer arithmetic for 256-bit signed and unsigned integers.
1010
- [`openvm-algebra-guest`](./algebra.md) - Modular arithmetic and complex field extensions.
1111
- [`openvm-ecc-guest`](./ecc.md) - Elliptic curve cryptography.
1212
- [`openvm-pairing-guest`](./pairing.md) - Elliptic curve optimal Ate pairings.
1313

14-
Some extensions such as `openvm-keccak-guest`, `openvm-sha256-guest`, and `openvm-bigint-guest` can be enabled without specifying any additional configuration.
14+
Some extensions such as `openvm-keccak-guest`, `openvm-sha2-guest`, and `openvm-bigint-guest` can be enabled without specifying any additional configuration.
1515

1616
On the other hand certain arithmetic operations, particularly modular arithmetic, can be optimized significantly when the modulus is known at compile time. This approach requires a framework to inform the compiler about all the moduli and associated arithmetic structures we intend to use. To achieve this, three steps are involved:
1717

File renamed without changes.

crates/circuits/sha-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ itertools = "0.14"
1313
proc-macro2 = "1.0"
1414

1515
[dev-dependencies]
16-
openvm-sha-air = { workspace = true }
16+
openvm-sha2-air = { workspace = true }
1717
openvm-circuit-primitives-derive = { workspace = true }
1818
ndarray.workspace = true
1919

crates/circuits/sha-macros/tests/flags.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use openvm_sha_air::{Sha256Config, ShaConfig};
1+
use openvm_sha2_air::{Sha256Config, Sha2Config};
22
use openvm_sha_macros::ColsRef;
33

44
#[repr(C)]
55
#[derive(Clone, Copy, Debug, ColsRef)]
6-
#[config(ShaConfig)]
6+
#[config(Sha2Config)]
77
pub struct ShaFlagsCols<T, const ROW_VAR_CNT: usize> {
88
pub is_round_row: T,
99
/// A flag that indicates if the current row is among the first 4 rows of a block

0 commit comments

Comments
 (0)