Skip to content

Commit

Permalink
delete pubkey reveal
Browse files Browse the repository at this point in the history
  • Loading branch information
motemotech committed Oct 19, 2024
1 parent 73e2e46 commit 3e27178
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
12 changes: 0 additions & 12 deletions contracts/contracts/OpenPassportVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -303,18 +303,6 @@ contract OpenPassportVerifier is IOpenPassportVerifier {
}
}

// TODO: Need to add function to convert field elements to readable pubkey
// if ((attribute_selector & AttributeSelector.PUBKEY_SELECTOR) != 0) {
// if (p_proof.signatureType == IGenericVerifier.SignatureType.RSA) {
// attrs.pubkey = p_proof.publicSignalsRSA[PROVE_RSA_PUBKEY_INDEX];
// } else if (p_proof.signatureType == IGenericVerifier.SignatureType.ECDSA) {
// attrs.pubkey = p_proof.publicSignalsECDSA[PROVE_ECDSA_PUBKEY_INDEX];
// } else {
// revert INVALID_SIGNATURE_TYPE();
// }
// }

// TODO: Need to add function to convert field elements to readable forbidden countries
if ((attribute_selector & AttributeSelector.FORBIDDEN_COUNTRIES_SELECTOR) != 0) {
if (p_proof.signatureType == IGenericVerifier.SignatureType.RSA) {
attrs.forbiddenCountries = p_proof.publicSignalsRSA[PROVE_RSA_FORBIDDEN_COUNTRIES_INDEX];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ library OpenPassportAttributeSelector {
uint256 public constant EXPIRY_DATE_SELECTOR = 1 << 6;
uint256 public constant OLDER_THAN_SELECTOR = 1 << 7;
uint256 public constant OFAC_RESULT_SELECTOR = 1 << 8;
uint256 public constant PUBKEY_SELECTOR = 1 << 9;
uint256 public constant FORBIDDEN_COUNTRIES_SELECTOR = 1 << 10;
uint256 public constant FORBIDDEN_COUNTRIES_SELECTOR = 1 << 9;


function combineAttributeSelectors(uint256[] memory selectors) internal pure returns (uint256) {
Expand Down

0 comments on commit 3e27178

Please sign in to comment.