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
f01fc3f8
Commit
f01fc3f8
authored
Aug 17, 2019
by
Benoit Viguier
Browse files
fix typos
parent
ae94c40a
Changes
3
Hide whitespace changes
Inline
Side-by-side
paper/CSM.tex
View file @
f01fc3f8
...
...
@@ -128,21 +128,21 @@ Definition Zclamp (n : Z) : Z :=
(* x
^{
p - 2
}
*)
Definition ZInv25519 (x:Z) : Z := Z.pow x (Z.pow 2 255 - 21).
(* instan
c
iate over Z *)
(* instan
t
iate over Z *)
Instance Z
_
Ops : (Ops Z Z modP) :=
{}
.
Proof.
apply Mid.A. (* instan
c
iate + *)
apply Mid.M. (* instan
c
iate * *)
apply Mid.Zub. (* instan
c
iate - *)
apply Mid.Sq. (* instan
c
iate x
^
2 *)
apply Mid.C
_
0. (* instan
c
iate Const 0 *)
apply Mid.C
_
1. (* instan
c
iate Const 1 *)
apply Mid.C
_
121665. (* instan
c
iate (a-2)/4 *)
apply Mid.Sel25519. (* instan
c
iate CSWAP *)
apply Mid.getbit. (* instan
c
iate ith bit *)
apply Mid.A. (* instan
t
iate + *)
apply Mid.M. (* instan
t
iate * *)
apply Mid.Zub. (* instan
t
iate - *)
apply Mid.Sq. (* instan
t
iate x
^
2 *)
apply Mid.C
_
0. (* instan
t
iate Const 0 *)
apply Mid.C
_
1. (* instan
t
iate Const 1 *)
apply Mid.C
_
121665. (* instan
t
iate (a-2)/4 *)
apply Mid.Sel25519. (* instan
t
iate CSWAP *)
apply Mid.getbit. (* instan
t
iate ith bit *)
Defined.
(* instan
c
iate montgomery
_
rec with Z
_
Ops *)
(* instan
t
iate montgomery
_
rec with Z
_
Ops *)
Definition ZCrypto
_
Scalarmult n p :=
let t := montgomery
_
rec
255 (* iterate 255 times *)
...
...
paper/conclusion.tex
View file @
f01fc3f8
...
...
@@ -58,7 +58,7 @@ o[i] = aux1 + aux2;
\subsection
{
Corrections in TweetNaCl
}
As a result of this verification, we removed superflous code.
As a result of this verification, we removed superfl
u
ous code.
Indeed the upper 64 indexes of the
\TNaCle
{
i64 x[80]
}
intermediate variable of
\TNaCle
{
crypto
_
scalarmult
}
were adding unnecessary complexity to the code, we fixed it.
...
...
paper/coq.tex
View file @
f01fc3f8
~
\\
~
\\
~
\\
\subsection
{
Coq definitions
}
\label
{
appendix:coq
}
...
...
@@ -141,7 +138,7 @@ Definition Zclamp (n : Z) : Z :=
Definition ZInv25519 (x:Z) : Z :=
Z.pow x (Z.pow 2 255 - 21).
(* instan
c
iate over Z *)
(* instan
t
iate over Z *)
Instance Z
_
Ops : (Ops Z Z modP) :=
{}
.
Proof.
apply Mid.A. (* instantiate + *)
...
...
@@ -155,7 +152,7 @@ Proof.
apply Mid.getbit. (* instantiate ith bit *)
Defined.
(* instan
c
iate montgomery
_
rec with Z
_
Ops *)
(* instan
t
iate montgomery
_
rec with Z
_
Ops *)
Definition ZCrypto
_
Scalarmult n p :=
let t := montgomery
_
rec
255 (* iterate 255 times *)
...
...
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