From 8205f027dbf212275b8fcd1b570407b552d2d9e9 Mon Sep 17 00:00:00 2001 From: David Rusu Date: Wed, 3 Jul 2024 02:15:11 +0000 Subject: [PATCH] fix risc0 patching --- cl/Cargo.toml | 5 ----- goas/methods/guest/Cargo.toml | 10 +++++++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cl/Cargo.toml b/cl/Cargo.toml index 3722186..5bfa4b3 100644 --- a/cl/Cargo.toml +++ b/cl/Cargo.toml @@ -17,10 +17,5 @@ rand_chacha = "0.3.1" lazy_static = "1.4.0" hex = "0.4.3" k256 = {version = "0.13.3", features = ["serde", "hash2curve"]} -# [dependencies.k256] -# git = "https://github.com/risc0/RustCrypto-elliptic-curves" -# tag = "k256/v0.13.3-risczero.0" - - diff --git a/goas/methods/guest/Cargo.toml b/goas/methods/guest/Cargo.toml index 6786a21..013102a 100644 --- a/goas/methods/guest/Cargo.toml +++ b/goas/methods/guest/Cargo.toml @@ -13,4 +13,12 @@ blake2 = "0.10" serde = { version = "1.0", features = ["derive"] } bincode = "1" common = { path = "../../common" } -cl = { path = "../../../cl" } \ No newline at end of file +cl = { path = "../../../cl" } + + +[patch.crates-io] +# Placing these patch statement in the workspace Cargo.toml will add RISC Zero SHA-256 and bigint +# multiplication accelerator support for all downstream usages of the following crates. +sha2 = { git = "https://github.com/risc0/RustCrypto-hashes", tag = "sha2-v0.10.8-risczero.0" } +k256 = { git = "https://github.com/risc0/RustCrypto-elliptic-curves", tag = "k256/v0.13.3-risczero.0" } +crypto-bigint = { git = "https://github.com/risc0/RustCrypto-crypto-bigint", tag = "v0.5.2-risczero.0" }