Skip to content

Noir complete passport program#115

Merged
RyanCao7 merged 62 commits into
mainfrom
noir-sha256-debugging
Jul 7, 2025
Merged

Noir complete passport program#115
RyanCao7 merged 62 commits into
mainfrom
noir-sha256-debugging

Conversation

@RyanCao7
Copy link
Copy Markdown
Collaborator

@RyanCao7 RyanCao7 commented May 29, 2025

Age check for Noir US-based passport program

  • Primary passport check files can be found at noir-examples/noir-passport-examples/complete-age-check/
  • Noir-native implementation of SHA-256 can be found at noir-examples/noir-passport-examples/noir-native-sha256
  • To run the R1CS compiler test, cargo test --release complete_age_check.

Note

  • The Noir compiler currently produces a few error messages about underconstrained functions. The ones in the Noir-native SHA-256 are covered by their respective verify_msg_block() functions, but I'm not sure about the ones in the Noir BigNum library.

vishady721 and others added 30 commits April 11, 2025 13:24
Blackbox range function (WIP)
…noir-program-which-does-signature-check-dg1

[WIP] Noir passport program + "native" Noir SHA-256 impl
@RyanCao7 RyanCao7 changed the title [WIP] Noir complete passport program + Noir bug debugging Noir complete passport program Jun 23, 2025
@RyanCao7 RyanCao7 requested review from Dzejkop and recmo June 23, 2025 19:02
Copy link
Copy Markdown
Contributor

@recmo recmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there is some debug code committed. It's a large PR that ideally should be split into several smaller ones, but we can forgive this still.

Comment thread Cargo.toml
Comment thread noir-examples/noir-passport-examples/complete_age_check/src/main.nr Outdated
Comment thread noir-examples/noir-passport-examples/complete_age_check/src/main.nr
Comment thread noir-examples/noir-passport-examples/rust_sha256_rsa_gen/src/main.rs Outdated
Comment thread noir-r1cs/src/r1cs.rs Outdated
Comment thread noir-r1cs/src/r1cs_matrices.rs Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file for? It seems redudant with r1cs.rs ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was accidentally re-added during the merge; file is now removed.

Comment thread noir-r1cs/src/solver.rs Outdated
Comment thread noir-r1cs/src/solver.rs Outdated
Comment thread noir-r1cs/src/test_programs/read-only-memory/target/main.gz
Copy link
Copy Markdown
Contributor

@recmo recmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the noir-r1cs/noir-passport-examples and noir-r1cs/test_programs folders for?

They contain a lot of generated data (including /target folders) that maybe should not be committed?

Otherwise LGTM!

);

// Check that the ID is not expired.
check_expiry(dg1, current_date.as_bytes());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in principle also part of passport validity. (So I guess DG1 contents should be part of PassportValidityContents).

But let's not worry about that to much right now. It's more than good enough for an example.

@RyanCao7 RyanCao7 merged commit 77304a3 into main Jul 7, 2025
1 of 2 checks passed
dcbuild3r pushed a commit that referenced this pull request May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E2E Passport age check program

3 participants