Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZK circuits for OpenID Authenticator #583

Closed
wants to merge 33 commits into from
Closed

Conversation

mskd12
Copy link
Contributor

@mskd12 mskd12 commented May 5, 2023

Adds an NPM library within fastcrypto containing the circom circuits

@mskd12 mskd12 requested a review from benr-ml May 5, 2023 14:39
@mskd12 mskd12 marked this pull request as ready for review May 5, 2023 14:39
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/helpers/zkhasher.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/helpers/zkhasher.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/helpers/zkhasher.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/helpers/base64.circom Outdated Show resolved Hide resolved
Copy link
Contributor

@benr-ml benr-ml left a comment

Choose a reason for hiding this comment

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

The circuits look good, just a few comments on readability


// Checks on last char
var lastchar = actual_extended_nonce[extNonceLength - 1];
(lastchar - 44) * (lastchar - 125) === 0; // lastchar = ',' or '}'
Copy link
Contributor

Choose a reason for hiding this comment

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

let's make this test a template and use it everywhere? AssertEndOfValue

openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/helpers/base64.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/helpers/zkhasher.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/helpers/misc.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/helpers/strings.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
openid-zkp-auth/circuits/jwt_proof_ua.circom Outdated Show resolved Hide resolved
Copy link
Contributor

@benr-ml benr-ml left a comment

Choose a reason for hiding this comment

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

The circuits look good, just a few comments on readability

2. Refactor circuit input generation code in circuitutils.ts
3. Introduce CircuitConstants as a place to store all the circuit-related constants and simplify function signatures
1. Introduce ExtendedClaimParser to parse claim name and value for an arbitrary extended claim (with some JSON whitespaces)
2. Turned off NonceChecker temporarily
3. ExtendedClaimParser for sub implemented
@mskd12 mskd12 closed this Jun 9, 2023
@mskd12 mskd12 deleted the deepak/openid-circuits branch June 9, 2023 16:51
@mskd12 mskd12 restored the deepak/openid-circuits branch June 12, 2023 20:41
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.

3 participants