Skip to content

Commit

Permalink
update ecdsa patch fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
umadayal committed Dec 5, 2024
1 parent 43792f1 commit 459ac0f
Show file tree
Hide file tree
Showing 5 changed files with 398 additions and 362 deletions.
5 changes: 3 additions & 2 deletions crates/core/executor/src/hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use hashbrown::HashMap;
use sp1_curves::{
ecdsa::RecoveryId as ecdsaRecoveryId,
k256::{Invert, RecoveryId, Signature, VerifyingKey},
p256::{Signature as p256Signature, VerifyingKey as p256VerifyingKey},
p256::{Invert as p256Invert, Signature as p256Signature, VerifyingKey as p256VerifyingKey},

Check failure on line 9 in crates/core/executor/src/hook.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

unused import: `Invert`

Check warning on line 9 in crates/core/executor/src/hook.rs

View workflow job for this annotation

GitHub Actions / Cargo Check

unused import: `Invert`

Check warning on line 9 in crates/core/executor/src/hook.rs

View workflow job for this annotation

GitHub Actions / Test (x86-64)

unused import: `Invert`

Check warning on line 9 in crates/core/executor/src/hook.rs

View workflow job for this annotation

GitHub Actions / Test (ARM)

unused import: `Invert`
};

use crate::Executor;
Expand Down Expand Up @@ -223,7 +223,8 @@ pub fn hook_r1_ecrecover(_: HookEnv, buf: &[u8]) -> Vec<Vec<u8>> {
return vec![vec![0]];
};

let bytes = recovered_key.to_sec1_bytes();
let recovered_key_encoded = recovered_key.to_encoded_point(true);
let bytes = recovered_key_encoded.as_bytes();

let (_, s) = sig.split_scalars();
let s_inverse = s.invert();
Expand Down
Loading

0 comments on commit 459ac0f

Please sign in to comment.