Skip to content

Commit dccd0c2

Browse files
committed
chore: add more TODO(PR12) [skip-ci]
1 parent 9c490c8 commit dccd0c2

5 files changed

Lines changed: 8 additions & 3 deletions

File tree

rln-wasm/src/wasm_utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ impl Identity {
242242
pub fn generate() -> Identity {
243243
let (identity_secret, id_commitment) = keygen();
244244
Identity {
245+
// TODO(PR12): Leaking secret here, consider using a more secure approach to handle secrets in WASM.
245246
identity_secret: *identity_secret,
246247
id_commitment,
247248
}
@@ -252,6 +253,7 @@ impl Identity {
252253
let seed_vec = seed.to_vec();
253254
let (identity_secret, id_commitment) = seeded_keygen(&seed_vec);
254255
Identity {
256+
// TODO(PR12): Leaking secret here, consider using a more secure approach to handle secrets in WASM.
255257
identity_secret: *identity_secret,
256258
id_commitment,
257259
}

rln/src/ffi/ffi_utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,14 @@ pub fn ffi_poseidon_hash_pair(a: &CFr, b: &CFr) -> repr_c::Box<CFr> {
365365
#[ffi_export]
366366
pub fn ffi_key_gen() -> repr_c::Vec<CFr> {
367367
let (identity_secret, id_commitment) = keygen();
368+
// TODO(PR12): Leaking secret here, consider using a more secure approach to handle secrets in FFI.
368369
vec![CFr(*identity_secret), CFr(id_commitment)].into()
369370
}
370371

371372
#[ffi_export]
372373
pub fn ffi_seeded_key_gen(seed: &repr_c::Vec<u8>) -> repr_c::Vec<CFr> {
373374
let (identity_secret, id_commitment) = seeded_keygen(seed);
375+
// TODO(PR12): Leaking secret here, consider using a more secure approach to handle secrets in FFI.
374376
vec![CFr(*identity_secret), CFr(id_commitment)].into()
375377
}
376378

rln/src/hashers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::circuit::Fr;
1111

1212
/// These indexed constants hardcode the supported round parameters tuples (t, RF, RN, SKIP_MATRICES) for the Bn254 scalar field.
1313
/// SKIP_MATRICES is the index of the randomly generated secure MDS matrix.
14-
/// TODO: generate these parameters
14+
/// TODO: Generate these parameters
1515
const ROUND_PARAMS: [(usize, usize, usize, usize); 8] = [
1616
(2, 8, 56, 0),
1717
(3, 8, 57, 0),

rln/src/pm_tree.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use crate::hashers::PoseidonHash;
1818
/// The key used to store the metadata in database.
1919
const METADATA_KEY: [u8; 8] = *b"metadata";
2020

21+
//TODO: Export this constant from pmtree crate instead of hardcoding it here.
2122
/// Maximum tree depth, limited by `pmtree` crate.
2223
const MAX_DEPTH: usize = 31;
2324

@@ -213,7 +214,7 @@ impl<D, H> ZerokitMerkleTree for PmTree<D, H>
213214
where
214215
D: Database,
215216
D::Config: PmTreeBackendConfig,
216-
// TODO: unify the two hasher traits (utils `ZerokitHasher` + pmtree `Hasher`).
217+
// TODO: Unify the two hasher traits (utils `ZerokitHasher` + pmtree `Hasher`).
217218
H: ZerokitHasher + Hasher<Fr = FrOf<H>>,
218219
{
219220
type Proof = PmTreeProof<H>;

utils/src/poseidon/poseidon_hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl<F: PrimeField> Poseidon<F> {
2626
// poseidon_params is a vector containing tuples (t, RF, RP, skip_matrices)
2727
// where: t is the rate (input length + 1), RF is the number of full rounds, RP is the number of partial rounds
2828
// and skip_matrices is a (temporary) parameter used to generate secure MDS matrices (see comments in the description of find_poseidon_ark_and_mds)
29-
// TODO: implement automatic generation of round parameters
29+
// TODO: Implement automatic generation of round parameters
3030
pub fn from(poseidon_params: &[(usize, usize, usize, usize)]) -> Self {
3131
let mut read_params = Vec::<RoundParameters<F>>::with_capacity(poseidon_params.len());
3232

0 commit comments

Comments
 (0)