From 5a4b174b940f7c7b18936945be36eb1be025d36d Mon Sep 17 00:00:00 2001 From: Michael de Hoog Date: Wed, 11 Dec 2024 18:59:50 -1000 Subject: [PATCH] Comment about public key --- contracts/src/SystemConfigGlobal.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts/src/SystemConfigGlobal.sol b/contracts/src/SystemConfigGlobal.sol index 737a99d..01bf099 100644 --- a/contracts/src/SystemConfigGlobal.sol +++ b/contracts/src/SystemConfigGlobal.sol @@ -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;