diff --git a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/private_validation_request_processor.nr b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/private_validation_request_processor.nr index 7fc2e3929d71..8cfa430a8a01 100644 --- a/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/private_validation_request_processor.nr +++ b/noir-projects/noir-protocol-circuits/crates/reset-kernel-lib/src/private_validation_request_processor.nr @@ -5,8 +5,7 @@ use dep::types::{ MAX_NEW_NOTE_HASHES_PER_TX, MAX_NEW_NULLIFIERS_PER_TX, MAX_NOTE_HASH_READ_REQUESTS_PER_TX, MAX_NULLIFIER_KEY_VALIDATION_REQUESTS_PER_TX, GENERATOR_INDEX__NSK_M }, - grumpkin_private_key::GrumpkinPrivateKey, keys::compute_siloed_nullifier_secret_key, - hash::poseidon2_hash, traits::is_empty + grumpkin_private_key::GrumpkinPrivateKey, hash::poseidon2_hash, traits::is_empty }; struct PrivateValidationRequestProcessor { diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/keys.nr b/noir-projects/noir-protocol-circuits/crates/types/src/keys.nr deleted file mode 100644 index 0e93ffe78417..000000000000 --- a/noir-projects/noir-protocol-circuits/crates/types/src/keys.nr +++ /dev/null @@ -1,26 +0,0 @@ -use crate::{address::AztecAddress, grumpkin_private_key::GrumpkinPrivateKey, hash::pedersen_hash}; - -fn field_to_grumpkin_private_key(val: Field) -> GrumpkinPrivateKey { - let bytes = val.to_be_bytes(32); - let mut v = 1; - let mut high = 0; - let mut low = 0; - - for i in 0..16 { - high = high + (bytes[15 - i] as Field) * v; - low = low + (bytes[16 + 15 - i] as Field) * v; - v = v * 256; - } - - GrumpkinPrivateKey { high, low } -} - -pub fn compute_siloed_nullifier_secret_key(secret_key: GrumpkinPrivateKey, contract_address: AztecAddress) -> GrumpkinPrivateKey { - // TODO: Temporary hack. Should replace it with a secure way to derive the secret key. - // Match the way keys are derived in circuits.js/src/keys/index.ts - let hash = pedersen_hash( - [secret_key.high, secret_key.low, contract_address.to_field()], - 0 - ); - field_to_grumpkin_private_key(hash) -} diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/lib.nr b/noir-projects/noir-protocol-circuits/crates/types/src/lib.nr index 5e7a03c0f962..5530e8313527 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/lib.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/lib.nr @@ -13,7 +13,6 @@ mod constants; mod contract_class_id; mod merkle_tree; mod contract_instance; -mod keys; mod messaging; mod mocked;