From 3e271785b79ee1f4d00c0550cb111a72da030aed Mon Sep 17 00:00:00 2001 From: motemotech Date: Sun, 20 Oct 2024 01:34:56 +0900 Subject: [PATCH] delete pubkey reveal --- contracts/contracts/OpenPassportVerifier.sol | 12 ------------ .../libraries/OpenPassportAttributeSelector.sol | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/contracts/contracts/OpenPassportVerifier.sol b/contracts/contracts/OpenPassportVerifier.sol index fcf4ce92..199dd03e 100644 --- a/contracts/contracts/OpenPassportVerifier.sol +++ b/contracts/contracts/OpenPassportVerifier.sol @@ -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]; diff --git a/contracts/contracts/libraries/OpenPassportAttributeSelector.sol b/contracts/contracts/libraries/OpenPassportAttributeSelector.sol index 972c1b45..e2cb5cd1 100644 --- a/contracts/contracts/libraries/OpenPassportAttributeSelector.sol +++ b/contracts/contracts/libraries/OpenPassportAttributeSelector.sol @@ -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) {