Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Benoit Viguier
coq-verif-tweetnacl
Commits
66856523
Commit
66856523
authored
Feb 03, 2020
by
Benoit Viguier
Browse files
xladderstep
parent
97e3d59b
Changes
1
Hide whitespace changes
Inline
Side-by-side
paper/2.1-Montgomery.tex
View file @
66856523
...
...
@@ -38,11 +38,10 @@ We consider \xcoord-only operations. Throughout the computation,
these
$
x
$
-coordinates are kept in projective representation
$
(
X : Z
)
$
, with
$
x
=
X
/
Z
$
; the point at infinity is represented as
$
(
1
:
0
)
$
.
See
\sref
{
subsec:ECC-projective
}
for more details.
We define t
wo
operation
s
:
We define t
he
op
p
eration:
\begin{align*}
\texttt
{
xADD
}
&
: (x
_{
Q-P
}
, (X
_
P:Z
_
P), (X
_
Q:Z
_
Q))
\mapsto
\\
&
(X
_{
P + Q
}
:Z
_{
P + Q
}
)
\\
\texttt
{
xDBL
}
&
: (X
_
P:Z
_
P)
\mapsto
(X
_{
2
\cdot
P
}
:Z
_{
2
\cdot
P
}
)
\texttt
{
xladderstep
}
&
: (x
_{
Q-P
}
, (X
_
P:Z
_
P), (X
_
Q:Z
_
Q))
\mapsto
\\
&
((X
_{
2
\cdot
P
}
:Z
_{
2
\cdot
P
}
), (X
_{
P + Q
}
:Z
_{
P + Q
}
))
\end{align*}
In the Montgomery ladder,
% notice that
the arguments of
\texttt
{
xADD
}
and
\texttt
{
xDBL
}
...
...
@@ -64,8 +63,9 @@ computing a \xcoord-only scalar multiplication (see \aref{alg:montgomery-ladder}
\STATE
$
R
=
(
X
_
R:Z
_
R
)
\leftarrow
(
x
_
P:
1
)
$
\FOR
{$
k
$
:=
$
m
$
down to
$
1
$}
\STATE
$
(
Q,R
)
\leftarrow
\texttt
{
CSWAP
}
((
Q,R
)
, k
^{
\text
{
th
}}
\text
{
bit of
}
n
)
$
\STATE
$
Q
\leftarrow
\texttt
{
xDBL
}
(
Q
)
$
\STATE
$
R
\leftarrow
\texttt
{
xADD
}
(
x
_
P,Q,R
)
$
% \STATE $Q \leftarrow \texttt{xDBL}(Q)$
% \STATE $R \leftarrow \texttt{xADD}(x_P,Q,R)$
\STATE
$
(
Q,R
)
\leftarrow
\texttt
{
xladderstep
}
(
x
_
P,Q,R
)
$
\STATE
$
(
Q,R
)
\leftarrow
\texttt
{
CSWAP
}
((
Q,R
)
, k
^{
\text
{
th
}}
\text
{
bit of
}
n
)
$
\ENDFOR
\RETURN
$
X
_
Q
/
Z
_
Q
$
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment