Skip to content

Commit

Permalink
Comment about public key
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoog committed Dec 12, 2024
1 parent 4f247ba commit 5a4b174
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/src/SystemConfigGlobal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ contract SystemConfigGlobal is OwnableUpgradeable, ISemver, NitroValidator {

require(ptrs.timestamp + MAX_AGE > block.timestamp, "attestation too old");

// The publicKey is encoded in the form specified in section 4.3.6 of ANSI X9.62, which is a
// 0x04 byte followed by the x and y coordinates of the public key. We ignore the first byte.
bytes32 publicKeyHash = attestationTbs.keccak(ptrs.publicKey.start() + 1, ptrs.publicKey.length() - 1);
address enclaveAddress = address(uint160(uint256(publicKeyHash)));
validSigners[enclaveAddress] = true;
Expand Down

0 comments on commit 5a4b174

Please sign in to comment.