From a1a87ff2278562a89e35b9d4e68c59cbc41e2e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 10 Aug 2026 20:49:08 +0200 Subject: [PATCH] crypto: Drop unused ecc declarations The ValueT-templated ecc::Point, the InvFn function-pointer alias and ExtFieldElem::zero() have no users: curve points are represented by AffinePoint and ProjPoint, and the zero value is spelled as default-initialization everywhere. --- lib/evmone_precompiles/ecc.hpp | 13 ------------- lib/evmone_precompiles/pairing/field_template.hpp | 2 -- 2 files changed, 15 deletions(-) diff --git a/lib/evmone_precompiles/ecc.hpp b/lib/evmone_precompiles/ecc.hpp index f322dca69d..e71d2b6241 100644 --- a/lib/evmone_precompiles/ecc.hpp +++ b/lib/evmone_precompiles/ecc.hpp @@ -129,16 +129,6 @@ class FieldElement static constexpr auto one() noexcept { return FieldElement{1}; } }; -/// The affine (two coordinates) point on an Elliptic Curve over a prime field. -template -struct Point -{ - ValueT x = {}; - ValueT y = {}; - - friend constexpr Point operator-(const Point& p) noexcept { return {p.x, -p.y}; } -}; - /// The affine (two coordinates) point on an Elliptic Curve over a prime field. template struct AffinePoint @@ -217,9 +207,6 @@ struct ProjPoint friend constexpr ProjPoint operator-(const ProjPoint& p) noexcept { return {p.x, -p.y, p.z}; } }; -template -using InvFn = IntT (*)(const ModArith&, const IntT& x) noexcept; - /// Converts a projected point to an affine point. template inline AffinePoint to_affine(const ProjPoint& p) noexcept diff --git a/lib/evmone_precompiles/pairing/field_template.hpp b/lib/evmone_precompiles/pairing/field_template.hpp index ef66258738..88c9fd3a79 100644 --- a/lib/evmone_precompiles/pairing/field_template.hpp +++ b/lib/evmone_precompiles/pairing/field_template.hpp @@ -50,8 +50,6 @@ struct ExtFieldElem return res; } - static constexpr ExtFieldElem zero() noexcept { return ExtFieldElem{}; } - constexpr ExtFieldElem inv() const noexcept { return inverse(*this); } friend constexpr ExtFieldElem operator+(const ExtFieldElem& e1, const ExtFieldElem& e2) noexcept