From 8fe78813008d10aadb192069499a4b314c38436e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ula=C5=9F=20Erdo=C4=9Fan?= Date: Thu, 21 Dec 2023 19:39:12 +0300 Subject: [PATCH 1/4] Update RIP: Add last call deadline for the rip --- RIPS/rip-7212.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RIPS/rip-7212.md b/RIPS/rip-7212.md index b93452c..fbc40c7 100644 --- a/RIPS/rip-7212.md +++ b/RIPS/rip-7212.md @@ -5,6 +5,7 @@ description: Proposal to add precompiled contract that performs signature verifi author: Ulaş Erdoğan (@ulerdogan), Doğan Alpaslan (@doganalpaslan) discussions-to: https://ethereum-magicians.org/t/eip-7212-precompiled-for-secp256r1-curve-support/14789 status: Last Call +last-call-deadline: 2024-01-04 type: Standards Track category: Core created: 2023-06-22 From 04e3933d549e68f5eb15c63662ef612badfe9566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ula=C5=9F=20Erdo=C4=9Fan?= Date: Thu, 21 Dec 2023 19:39:30 +0300 Subject: [PATCH 2/4] Update RIP: Change the implementation address of the precompile --- RIPS/rip-7212.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RIPS/rip-7212.md b/RIPS/rip-7212.md index fbc40c7..be05be2 100644 --- a/RIPS/rip-7212.md +++ b/RIPS/rip-7212.md @@ -31,7 +31,7 @@ Modern devices have these signing mechanisms that are designed to be more secure The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174. -As of `FORK_TIMESTAMP` in the integrated EVM chain, add precompiled contract `P256VERIFY` for signature verifications in the “secp256r1” elliptic curve at address `PRECOMPILED_ADDRESS` in `0x0b`. +As of `FORK_TIMESTAMP` in the integrated EVM chain, add precompiled contract `P256VERIFY` for signature verifications in the “secp256r1” elliptic curve at address `PRECOMPILED_ADDRESS` in `0x100` (indicates 0x00...00100). ### Elliptic Curve Information @@ -120,7 +120,7 @@ Another important difference is that the NIST FIPS 186-5 specification does not Wrapper libraries **SHOULD** add a malleability check by default, with functions wrapping the raw precompile call (exact NIST FIPS 186-5 spec, without malleability check) clearly identified. For example, `P256.verifySignature` and `P256.verifySignatureWithoutMalleabilityCheck`. Adding the malleability check is straightforward and costs minimal gas. -The `PRECOMPILED_ADDRESS` is chosen as `0x0b` as it is the next available address in the precompiled address set. +The `PRECOMPILED_ADDRESS` is chosen as `0x100` as `P256VERIFY` is the first precompiled contract presented as an RIP, and the address is the first available address in the precompiled address set that is reserved for the RIP precompiles. The gas cost is proposed by comparing the performance of the `P256VERIFY` and the `ECRECOVER` precompiled contract which is implemented in the EVM at `0x01` address. It is seen that “secp256r1” signature verification is ~15% slower (elaborated in [test cases](#test-cases)) than “secp256k1” signature recovery, so `3450` gas is proposed by comparison which causes similar “mgas/op” values in both precompiled contracts. From 8358b2a548a3acc2e4fd25b25786ef529e55e547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ula=C5=9F=20Erdo=C4=9Fan?= <58347304+ulerdogan@users.noreply.github.com> Date: Tue, 2 Jan 2024 20:14:19 +0300 Subject: [PATCH 3/4] Update rip-7212.md Co-authored-by: Ansgar Dietrichs --- RIPS/rip-7212.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RIPS/rip-7212.md b/RIPS/rip-7212.md index be05be2..ad417ac 100644 --- a/RIPS/rip-7212.md +++ b/RIPS/rip-7212.md @@ -5,7 +5,7 @@ description: Proposal to add precompiled contract that performs signature verifi author: Ulaş Erdoğan (@ulerdogan), Doğan Alpaslan (@doganalpaslan) discussions-to: https://ethereum-magicians.org/t/eip-7212-precompiled-for-secp256r1-curve-support/14789 status: Last Call -last-call-deadline: 2024-01-04 +last-call-deadline: 2024-01-10 type: Standards Track category: Core created: 2023-06-22 From dd10fae2150a9fed78f6ecf8586d4321023783ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ula=C5=9F=20Erdo=C4=9Fan?= <58347304+ulerdogan@users.noreply.github.com> Date: Tue, 2 Jan 2024 20:14:50 +0300 Subject: [PATCH 4/4] Update rip-7212.md Co-authored-by: Ansgar Dietrichs --- RIPS/rip-7212.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RIPS/rip-7212.md b/RIPS/rip-7212.md index ad417ac..de488c4 100644 --- a/RIPS/rip-7212.md +++ b/RIPS/rip-7212.md @@ -31,7 +31,7 @@ Modern devices have these signing mechanisms that are designed to be more secure The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174. -As of `FORK_TIMESTAMP` in the integrated EVM chain, add precompiled contract `P256VERIFY` for signature verifications in the “secp256r1” elliptic curve at address `PRECOMPILED_ADDRESS` in `0x100` (indicates 0x00...00100). +As of `FORK_TIMESTAMP` in the integrated EVM chain, add precompiled contract `P256VERIFY` for signature verifications in the “secp256r1” elliptic curve at address `PRECOMPILED_ADDRESS` in `0x100` (indicates 0x0000000000000000000000000000000000000100). ### Elliptic Curve Information