From 2d919387ac9b56bca1c65a9a8a1c33bd1cf31439 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 8 Jun 2022 15:33:49 +0200 Subject: [PATCH] Explain that ecrecover only accepts v={27,28} (#860) * Explain that ecrecover only accepts v={27,28} * Update Paper.tex Co-authored-by: Alex Beregszaszi * Update Paper.tex Co-authored-by: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com> Co-authored-by: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com> --- Paper.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Paper.tex b/Paper.tex index ce16b735..7c1c0fc1 100644 --- a/Paper.tex +++ b/Paper.tex @@ -1640,10 +1640,10 @@ \section{Precompiled Contracts}\label{app:precompiled} \begin{eqnarray} \Xi_{\mathtt{ECREC}} &\equiv& \Xi_{\mathtt{PRE}} \quad \text{where:} \\ g_{\mathrm{r}} &=& 3000\\ -\lVert \mathbf{o} \rVert &=& \begin{cases} 0 & \text{if} \quad \mathtt{ECDSARECOVER}(h, v, r, s) = \varnothing\\ 32 & \text{otherwise} \end{cases}\\ +\lVert \mathbf{o} \rVert &=& \begin{cases} 0 & \text{if} \quad \mathtt{v} \neq 27 \wedge \mathtt{v} \neq 28 \\ 0 & \text{if} \quad \mathtt{ECDSARECOVER}(h, v - 27, r, s) = \varnothing\\ 32 & \text{otherwise} \end{cases}\\ \text{if} \quad \lVert \mathbf{o} \rVert = 32: &&\\ \mathbf{o}[0..11] &=& 0 \\ -\mathbf{o}[12..31] &=& \mathtt{KEC}\big(\mathtt{ECDSARECOVER}(h, v, r, s)\big)[12..31] \quad \text{where:}\\ +\mathbf{o}[12..31] &=& \mathtt{KEC}\big(\mathtt{ECDSARECOVER}(h, v - 27, r, s)\big)[12..31] \quad \text{where:}\\ \mathbf{d}[0..(\lVert \hyperlink{I__d}{I_{\mathbf{d}}} \rVert-1)] &=& I_{\mathbf{d}}\\ \mathbf{d}[\lVert I_{\mathbf{d}} \rVert..] &=& (0, 0, ...) \\ h &=& \mathbf{d}[0..31]\\