Skip to content

Commit f18bd8a

Browse files
Fix lint
1 parent de5e835 commit f18bd8a

File tree

4 files changed

+6
-19
lines changed

4 files changed

+6
-19
lines changed

examples/ecc/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ pub fn main() {
3838
#[allow(clippy::op_ref)]
3939
let _p3 = &p1 + &p2;
4040

41-
let x1 = Ed25519Coord::from_be_bytes(&hex!(
41+
let x1 = Ed25519Coord::from_be_bytes_unchecked(&hex!(
4242
"216936D3CD6E53FEC0A4E231FDD6DC5C692CC7609525A7B2C9562D608F25D51A"
4343
));
44-
let y1 = Ed25519Coord::from_be_bytes(&hex!(
44+
let y1 = Ed25519Coord::from_be_bytes_unchecked(&hex!(
4545
"6666666666666666666666666666666666666666666666666666666666666658"
4646
));
4747
let p1 = Ed25519Point::from_xy(x1, y1).unwrap();
4848

4949
let x2 = Ed25519Coord::from_u32(2);
50-
let y2 = Ed25519Coord::from_be_bytes(&hex!(
50+
let y2 = Ed25519Coord::from_be_bytes_unchecked(&hex!(
5151
"1A43BF127BDDC4D71FF910403C11DDB5BA2BCDD2815393924657EF111E712631"
5252
));
5353
let p2 = Ed25519Point::from_xy(x2, y2).unwrap();

extensions/ecc/tests/programs/Cargo.toml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,6 @@ required-features = ["k256"]
8383
name = "sec1_decode"
8484
required-features = ["k256"]
8585

86-
[[example]]
87-
name = "ecdsa_recover_p256"
88-
required-features = ["p256"]
89-
90-
[[example]]
91-
name = "ecdsa_recover_k256"
92-
required-features = ["k256"]
93-
94-
[[example]]
95-
name = "sec1_decode"
96-
required-features = ["k256"]
97-
9886
[[example]]
9987
name = "edwards_ec"
10088
required-features = ["ed25519"]

extensions/ecc/tests/programs/examples/decompress.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ pub fn main() {
7575
test_impossible_sw_decompression::<CurvePoint1mod4>(&Fp1mod4::from_u8(1), rec_id);
7676

7777
// ed25519
78-
let x = Ed25519Coord::from_le_bytes(&bytes[192..224]);
79-
let y = Ed25519Coord::from_le_bytes(&bytes[224..256]);
78+
let x = Ed25519Coord::from_le_bytes_unchecked(&bytes[192..224]);
79+
let y = Ed25519Coord::from_le_bytes_unchecked(&bytes[224..256]);
8080
let rec_id = x.as_le_bytes()[0] & 1;
8181
test_possible_te_decompression::<Ed25519Point>(&x, &y, rec_id);
8282
// y = 2 is not on the y-coordinate of any point on the Ed25519 curve

extensions/ecc/tests/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ mod tests {
1414
utils::{air_test, air_test_with_min_segments},
1515
};
1616
use openvm_ecc_circuit::{
17-
CurveConfig, EccExtension, Rv32EccConfig, SwCurveCoeffs, ED25519_CONFIG, P256_CONFIG,
18-
SECP256K1_CONFIG,
17+
CurveConfig, Rv32EccConfig, SwCurveCoeffs, ED25519_CONFIG, P256_CONFIG, SECP256K1_CONFIG,
1918
};
2019
use openvm_ecc_transpiler::EccTranspilerExtension;
2120
use openvm_rv32im_transpiler::{

0 commit comments

Comments
 (0)