Skip to content

Commit

Permalink
Explain that ecrecover only accepts v={27,28} (#860)
Browse files Browse the repository at this point in the history
* Explain that ecrecover only accepts v={27,28}

* Update Paper.tex

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>

* 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>
  • Loading branch information
axic and yperbasis authored Jun 8, 2022
1 parent b2d0dbf commit c44e0fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Paper.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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]\\
Expand Down

0 comments on commit c44e0fc

Please sign in to comment.