From: Christoph Fuerst Date: Fri, 31 Mar 2017 17:13:44 +0000 (+0200) Subject: Added contents on Left-To-Right Exponentation X-Git-Url: http://git.risc.jku.at/gitweb/?a=commitdiff_plain;h=ef15e30fb1aa36f6c9a84ad030b86d9bc3bec2ba;p=cfuerst%2Fformal-numbers.git Added contents on Left-To-Right Exponentation --- diff --git a/report/formal.pdf b/report/formal.pdf index 06923ca..aae5a1f 100644 Binary files a/report/formal.pdf and b/report/formal.pdf differ diff --git a/report/formal.tex b/report/formal.tex index 72af0e3..59cdcb0 100644 --- a/report/formal.tex +++ b/report/formal.tex @@ -24,6 +24,9 @@ \numberwithin{equation}{section} + +\renewcommand{\thesection}{\arabic{section}} +\renewcommand{\thealgorithm}{\arabic{section}.\arabic{algorithm}} %opening \title{Formal Verification of Algorithms arising in Cryptography} @@ -56,7 +59,7 @@ Throughout this paper, let $\mathbb{N}$ denote the non-negative integers including zero, i.e. $\mathbb{N} = \{0,1,2,\ldots\}$. One of the most fundamental notions in mathematics is without doubt the term \emph{divisor}, we say for $a,c\in\mathbb{N}$, -that \emph{$a$ divides $c$}, and write $a|c$, if there is a number $b\in\mathbb{N}$ +that \emph{$a$ divides $c$}, and write $a|c$, if there is a number $b\in\mathbb{Z}$ such that $c = a\cdot b$. Every number $n\in\mathbb{N}$ has at least two divisors, a \emph{prime number} $p\in\mathbb{N}$ is a number $p$ that has exactly two divisors, $1$ and $p$. Let now be given two numbers @@ -83,15 +86,23 @@ While the classic examples, the field of real numbers $\mathbb{R}$ and the complex numbers $\mathbb{C}$, are infinite fields, the focus in cryptographic applications is on \emph{finite fields}. A finite field with $p$ elements, where $p$ is prime, is usually written as $\mathbb{Z}_p = \mathbb{Z}/p\mathbb{Z}$, -and consists of the elements $\{0,1,\ldots,p-1\}$. The number $p$ is called the -\emph{characteristic} of $\mathbb{Z}_p$. In fact, the characteristic of every -finite field is a prime power. Throughout this paper, we restrict our attention -to the set $\mathbb{Z}_p$, i.e. the integers modulo a prime $p$ (rather than -a prime power).\\ - -Let $p$ be a prime. In finite sets of the form $\mathbb{Z}_p$, addition, subtraction -and multiplication are performed modulo residue classes, i.e. if we denote the residue of -$a\in\mathbb{Z}$ modulo a prime $p$ by $[a]_p$, then we have +and consists of the elements $\{0,1,\ldots,p-1\}$. The classic operations are +carried out modulo $p$, and hence, instead of $a\in\mathbb{Z}$, +we consider the residue class, denoted by $[a]_p := \{a+k\cdot p: 0\leq a < p \wedge k\in\mathbb{Z}\}$. +For residue classes, there are two representations available, either +$$ +\left\{-\frac{p-1}{2},-\frac{p-3}{2}\ldots,\frac{p-3}{2},\frac{p-1}{2}\right\}\qquad \text{ or }\qquad \{0,\ldots,p-1\} = \mathbb{Z}_p, +$$ +which carry equivalent information. We focus on the second representation, i.e. +we demand the result of the operation modulo $p$ to be in $\mathbb{Z}_p = \{0,\ldots,p-1\}$.\\ + +The number $p$ is called the \emph{characteristic} of $\mathbb{Z}_p$. In fact, +the characteristic of every finite field is a prime power. Throughout this paper, +we restrict our attention to the set $\mathbb{Z}_p$, i.e. the integers modulo a prime $p$ +(rather than a prime power).\\ + +Let $p$ be an odd prime. In finite sets of the form $\mathbb{Z}_p$, addition, subtraction +and multiplication are performed modulo a prime $p$ by $[a]_p$, and we have $$ [a]_p \pm [b]_p := [a\pm b]_p,\qquad [a]_p\cdot [b]_p := [ab]_p. $$ @@ -102,14 +113,9 @@ $$ [a\div b]_p := [a\cdot b^{-1}]_p. $$ Hence, the finite set $\mathbb{Z}_p$ with the operations of addition, subtraction, multiplication -and division as defined above, forms a finite field.\\ +and division as defined above, forms a finite field. + -For residue classes, there are two representations available, either -$$ -\left\{-\frac{p-1}{2},\ldots,\frac{p-1}{2}\right\}\qquad \text{ or }\qquad \{0,\ldots,p-1\} = \mathbb{Z}_p, -$$ -which carry equivalent information. We focus on the second representation, i.e. -we demand the result of the operation modulo $p$ to be in $\mathbb{Z}_p = \{0,\ldots,p-1\}$. \subsection{Elementary Number Theory} With the preliminaries introduced in the last subsection, we can already formulate the @@ -195,18 +201,18 @@ TODO: Baby Step Giant Step Algorithm \subsection{The RSA cryptosystem} At the RSA cryptosystem, named after its authors Rivest, Shamir and Adleman, the two protagonists \textbf{A}lice and \textbf{B}ob want to exchange secret messages. To that -end, Alice generates two primes $p$ and $q$ which are approximately of the same size. -Then, Alice calculates the product $n=pq$ and $\phi(n) = (p-1)(q-1)$, and proceeds by +end, A generates two primes $p$ and $q$ which are approximately of the same size. +Then, A calculates the product $n=pq$ and $\phi(n) = (p-1)(q-1)$, and proceeds by choosing $1