Kryptologi Opgave 5. Indledning. Øvelse 6.1. Øvelse Litteratur. Rune Højsgaard
|
|
- Coleen Randall
- 8 years ago
- Views:
Transcription
1 Kryptologi Opgave 5 Rune Højsgaard 6. marts 2007 Indledning Dette er besvarelsen af øvelsesopgave 5 på kurset Kryptologi 2007, Københavns Universitet. Opgaven består i at implementere og anvende to algoritmer fra [Sti95]. Disse er implementeret i C# og kan ndes i bilag A, En elektronisk udgave af dette dokument kan hentes fra http: //rune.hojsgaard.dk/datalogi/files/krypto07-opg5.pdf. Øvelse 6.1 Min implementation af Shanks algoritmen fra [Sti95, p. 237] ndes i bilag A linie 230. Ved hjælp af denne beregnes først log i Z : Shanks (24691, 106, 12375) = Hvilket bekræftes ved at tjekke at Så beregnes log i Z : (mod 24691) Shanks (458009, 6, ) = Hvilket bekræftes ved at tjekke at (mod ) Øvelse 6.5 Min implementation af Pohlig-Hellman algoritmen fra [Sti95, p. 243] ndes i bilag A linie 276. Ved hjælp af denne og metoden Exercise65 (linie 301) beregnes først log i Z : E x e r c i s e 6 5 (28703, 5, 8563) = 3909 Så beregnes log i Z : E x e r c i s e 6 5 (31153, 10, 12611) = Litteratur [Sti95] Douglas R. Stinson. Cryptography - Theory and Practice. CRC Press Inc,
2 A Kildekode 1 u s i n g System ; 2 u s i n g System. C o l l e c t i o n s. G e n e r i c ; 3 u s i n g System. Text ; 4 using xprocs.common. Converter ; // http ://www. codeproject.com/csharp/numberconvert. asp 5 6 namespace Kryptolog { 8 c l a s s Opgave5 9 { 10 /// <summary> 11 /// Calculates modulo. Built in won ' t do 12 /// </summary> 13 s t a t i c int mod( int b, int m) 14 { 15 return ( b % m < 0? (m + ( b % m) ) : b % m) ; 16 } /// <summary> 19 /// Calculates modulo. Built in won ' t do 20 /// </summary> 21 s t a t i c long mod( long b, long m) 22 { 23 return ( b % m < 0? (m + ( b % m) ) : b % m) ; 24 } /// <summary> 27 /// Creates an int array of the dim f i r s t primes 28 /// Based on h t t p ://www. o s i x. net /modules/ a r t i c l e /? id= /// </summary> 30 /// <param name="dim">number of primes</param> 31 /// <returns></returns> 32 p u b l i c s t a t i c int [ ] GeneratePrimes ( int dim ) 33 { 34 i f ( dim <= 0 ) 35 throw new ArgumentOutOfRangeException ( "Dim must be > 0" ) ; 36 else i f ( dim == 1 ) 37 return new int [ ] { 2 } ; 38 e l s e 39 { 40 int [ ] p = new int [ dim ] ; 41 int root ; 42 p [ 0 ] = 2 ; 43 p [ 1 ] = 3 ; 44 int k = 6 ; 45 int n ; 46 int n e e d l e = 1; 47 int index = 2 ; 48 bool prime = true ; 49 while ( i n d e x < dim ) 50 { 51 n = k + needle ; 52 r o o t = ( int ) System. Math. S q r t ( n ) + 1 ; 53 f o r ( int j = 0 ; j < index && p [ j ] <= root ; j++) 54 { 55 i f ( n % p [ j ] == 0 ) 56 { 57 // not prime 58 prime = f a l s e ; 59 break ; 60 } 61 } 62 i f ( prime ) 63 p [ i n d e x ++] = n ; // prime number 64 e l s e 65 prime = true ; 66 k = ( needle == 1? k + 6 : k ) ; 67 n e e d l e = 1; 68 } 69 return p ; 70 } 71 } /// <summary> 74 /// Array with the f i r s t 100 primes used by Factorize 75 /// </summary> 76 static int [ ] p = GeneratePrimes ( ) ; s t a t i c int prime = 0 ; 79 s t a t i c int power = 1 ; /// <summary> 82 /// Factorize an integer to i t s primes 83 /// Based on h t t p ://www. o s i x. net /modules/ a r t i c l e /? id= /// NOTE: Dependant on the int [ ] p containing the f i r s t p. Length primes 85 /// </summary> 86 /// <param name="n"></param> 87 /// <returns>i n t [ prime ] [ ] primes, i n t [ power ] [ ] powers</returns> 2
3 88 p u b l i c static int [ ] [ ] F a c t o r i z e ( int n ) 89 { 90 int [ ] Fact = new int [ ] ; Fact. I n i t i a l i z e ( ) ; 91 int [ ] Exp = new int [ ] ; Exp. I n i t i a l i z e ( ) ; 92 int count = 0 ; 93 i f ( n < 2 ) throw new ArgumentOutOfRangeException ( "n must be a p o s i t i v e number > 1 " ) ; 94 t r y 95 { 96 long r o o t = ( long ) System. Math. S q r t ( n ) + 1L ; 97 f o r ( int i = 0 ; p [ i ] <= r o o t ; i ++) 98 { 99 i f ( n % p [ i ] == 0 ) 100 { 101 n /= p [ i ] ; 102 Fact [ count ] = p [ i ] ; 103 Exp [ count ] = 1 ; 104 while ( n % p [ i ] == 0 ) 105 { 106 n /= p [ i ] ; 107 Exp [ count ]++; 108 } 109 count++; 110 r o o t = ( long ) System. Math. S q r t ( n ) + 1 ; 111 } 112 } 113 i f ( n!= 1 ) 114 { 115 Fact [ count ] = n ; 116 Exp [ count++] = 1 ; 117 } 118 } 119 c a t c h 120 { 121 throw new ArgumentOutOfRangeException ( "P not long enough to f a c t o r i z e " + n ) ; 122 } 123 int [ ] [ ] rv = new int [ 2 ] [ ] ; 124 int [ ] rvfact = new int [ count ] ; 125 int [ ] rvexp = new int [ count ] ; 126 f o r ( int i = 0 ; i < count ; i ++) 127 { 128 rvfact [ i ] = Fact [ i ] ; 129 rvexp [ i ] = Exp [ i ] ; 130 } 131 rv [ 0 ] = rvfact ; 132 rv [ 1 ] = rvexp ; 133 return rv ; 134 } /// <summary> 137 /// Used when c a l l i n g squareandmultiply 138 /// </summary> 139 /// <param name="i">number to convert </param> 140 /// <returns>binary r e p r e s e n t a t i o n of i </returns> 141 static int [ ] B i n a r y R e p r e s e n t a t i o n ( int i ) 142 { 143 Po s it i on a ln o ta t i on C on v er t e r p = new Po s it i on a ln o t at i on C on v e rt e r ( 2 ) ; 144 char [ ] c s = p. T o S t r i n g ( i ). ToCharArray ( ) ; 145 int [ ] bs = new int [ c s. Length ] ; 146 f o r ( int j = 0 ; j < cs. Length ; j++) 147 bs [ c s. Length j 1 ] = c s [ j ] ' 0 ' ; 148 return bs ; 149 } /// <summary> 152 /// Implementation of algorithm 5.3 " Multiplicative Inverse (a, b ) ", Stinson p /// </summary> 154 /// <remarks>may throw Exception ' b + " has no i n v e r s e modulo " + a'</remarks> 155 /// <param name="a"></param> 156 /// <param name="b"></param> 157 /// <returns>m u l t i p l i c a t i v e i n v e r s of a and b</returns> 158 s t a t i c int M u l t i p l i c a t i v e I n v e r s e ( int a, int b ) 159 { 160 int a0 = a ; 161 int b0 = b ; 162 int t0 = 0 ; 163 int t = 1 ; 164 int q = ( int ) Math. F l o o r ( ( double ) a0 / ( double ) b0 ) ; 165 int r = a0 q b0 ; 166 while ( r > 0 ) 167 { 168 int temp = mod ( ( ( int ) t 0 q t ), a ) ; 169 t 0 = t ; 170 t = temp ; 171 a0 = b0 ; 172 b0 = r ; 173 q = ( int ) Math. F l o o r ( ( double ) a0 / ( double ) b0 ) ; 174 r = a0 q b0 ; 175 } 176 i f ( b0!= 1 ) 177 throw new E x c e p t i o n ( b + " has no i n v e r s e modulo " + a ) ; 3
4 178 e l s e 179 return t ; 180 } /// <summary> 183 /// Implementation of algorithm 5.5 "Square and multiply (x, c, n) ", Stinson p /// </summary> 185 /// <param name="x"></param> 186 /// <param name="c">exponent, positive integer in binary representation </param> 187 /// <param name="n">modulo</param> 188 /// <returns>z = x^c mod n</returns> 189 s t a t i c long SquareAndMultiply ( int x, int [ ] c, int n ) 190 { 191 long z = 1 ; 192 f o r ( int i = c. Length 1 ; i >= 0 ; i ) 193 { 194 z = mod ( ( z z ), n ) ; 195 i f ( c [ i ] == 1 ) 196 z = mod ( ( z x ), n ) ; 197 } 198 return z ; 199 } /// <summary> 202 /// Implementation of \rho (a_1,..., a_n), Stinson p /// </summary> 204 /// <param name="a">(a_1,..., a_n)</param> 205 /// <param name="m">(m_1,...,m_n)</param> 206 /// <returns></returns> 207 s t a t i c int Rho ( int [ ] a, int [ ] m) 208 { 209 int sum = 0 ; 210 int M = 1 ; 211 f o r ( int i = 0 ; i < m. Length ; i++) 212 M = m[ i ] ; 213 f o r ( int i = 0 ; i < a. Length ; i++) 214 { 215 int Mi = M / m[ i ] ; 216 int y i = mod( M u l t i p l i c a t i v e I n v e r s e (m[ i ], Mi ), m[ i ] ) ; 217 sum += mod ( ( a [ i ] Mi y i ), M) ; 218 } 219 return sum ; 220 } // Stinson p /// <summary> 224 /// Implementation of algorithm 6.1 "Shanks (n, \alpha, \ beta ) ", Stinson p /// Input values are note checked! 226 /// </summary> 227 /// <param name="p">prime</param> 228 /// <param name="a">(\alpha ) primitive element modulo p</param> 229 /// <param name="b">log_a ( b ) in Z_p</param> 230 public s t a t i c int Shanks ( int p, int a, int b ) 231 { 232 int m = ( int ) Math. C e i l i n g ( Math. S q r t ( p 1 ) ) ; 233 SortedList <int, int> L1 = new SortedList <int, int >() ; 234 SortedList <int, int> L2 = new SortedList <int, int >() ; 235 int am = ( int ) SquareAndMultiply ( a, BinaryRepresentation (m), p ) ; 236 f o r ( int j = 0 ; j < m; j ++) 237 { 238 int l 1 v a l = ( int ) SquareAndMultiply (am, BinaryRepresentation ( j ), p ) ; 239 L1. Add( l 1 v a l, j ) ; 240 } 241 int a1 = ( int ) M u l t i p l i c a t i v e I n v e r s e ( p, a ) ; 242 f o r ( int i = 0 ; i < m; i ++) 243 { 244 int l 2 v a l = ( int )mod ( ( b SquareAndMultiply ( a1, B i n a r y R e p r e s e n t a t i o n ( i ), p ) ), p ) ; 245 L2. Add( l 2 v a l, i ) ; 246 } 247 int l 1 = 0, l 0 = 0 ; 248 b o o l match = f a l s e ; 249 f o r e a c h ( int k i n L1. Keys ) 250 { 251 i f ( L2. ContainsKey ( k ) ) 252 { 253 l 1 = L1 [ k ] ; 254 l 0 = L2 [ k ] ; 255 match = true ; 256 break ; 257 } 258 } 259 i f (! match ) 260 { 261 throw new E x c e p t i o n ( "No match... " ) ; 262 } 263 return mod ( (m l 1 + l 0 ), ( p 1 ) ) ; 264 } /// <summary> 4
5 267 /// Implementation of algorithm 6.3 "Pohlig Hellman (G, n, \alpha, \eta, q, c ) ", Stinson p /// </summary> 269 /// <param name="g">m u l t i p l i c a t i v e group</param> 270 /// <param name="n">order</param> 271 /// <param name="a">(\alpha ) element of order n in m u l t i p l i c a t i v e group G</param> 272 /// <param name="b">integer </param> 273 /// <param name="q">prime</param> 274 /// <param name="c">exponent</param> 275 /// <returns></returns> 276 s t a t i c int [ ] PohligHellman ( int G, int a, int b, int q, int c ) 277 { 278 int j = 0 ; 279 int [ ] b j = new int [ c + 1 ] ; 280 b j [ j ] = b ; 281 int d ; 282 int [ ] ac = new int [ c ] ; 283 int a1 = M u l t i p l i c a t i v e I n v e r s e (G, a ) ; 284 while ( j < c ) 285 { 286 int i = 0 ; 287 d = ( int )mod( SquareAndMultiply ( bj [ j ], BinaryRepresentation ( (G 1) / ( int ) Math. Pow( q, j + 1 ) ), G), G) ; 288 while ( d!= SquareAndMultiply ( a, BinaryRepresentation ( i (G 1) / q ), G) ) 289 i ++; 290 ac [ j ] = i ; 291 b j [ j + 1 ] = ( int )mod ( ( b j [ j ] SquareAndMultiply ( a1, 292 B i n a r y R e p r e s e n t a t i o n (ac [ j ] ( ( int ) Math. Pow( q, j ) ) ), G) ), G) ; 293 j ++; 294 } 295 return ac ; 296 } /// <summary> 299 /// C a l c ulations of Exercise 6.5, Stinson p /// </summary> 301 public s t a t i c int Exercise65 ( int p, int a, int b ) 302 { 303 int [ ] [ ] f a c t o r s = F a c t o r i z e ( p 1 ) ; 304 int [ ] pa = new int [ f a c t o r s [ prime ]. Length ] ; 305 int [ ] pm = new int [ f a c t o r s [ prime ]. Length ] ; 306 f o r ( int i = 0 ; i < f a c t o r s [ prime ]. Length ; i ++) 307 { 308 int [ ] ic = PohligHellman ( p, a, b, f a c t o r s [ prime ] [ i ], f a c t o r s [ power ] [ i ] ) ; 309 int sum = 0 ; 310 f o r ( int j = 0 ; j < ic. Length ; j++) 311 sum += ic [ j ] ( int ) Math. Pow( f a c t o r s [ prime ] [ i ], j ) ; 312 pa [ i ] = sum ; 313 pm[ i ] = ( int ) Math. Pow( f a c t o r s [ prime ] [ i ], f a c t o r s [ power ] [ i ] ) ; 314 } 315 int c a l c u l a t e d M o d = 1 ; 316 f o r e a c h ( int m i n pm) 317 c a l c u l a t e d M o d = m; 318 int rhoval = mod(rho (pa, pm), p 1) ; 319 return rhoval ; 320 } s t a t i c void Main ( s t r i n g [ ] a r g s ) 324 { 325 // Exercise 6.1 a 326 C onsole. WriteLine ( " E x e r c i s e 6. 1 a : " ) ; 327 Console. WriteLine ( " Shanks (24691, 106, 12375) = " + Shanks (24691, 106, 12375) + "\ r \n" ) ; // Exercise 6.1 b 330 C onsole. WriteLine ( " E x e r c i s e 6. 1 b : " ) ; 331 Console. WriteLine ( " Shanks (458009, 6, ) = " + Shanks (458009, 6, ) + "\ r \n" ) ; // Exercise 6.5 a 334 C onsole. WriteLine ( " E x e r c i s e 6. 5 a : " ) ; 335 Console. WriteLine ( " Exercise65 (28703, 5, 8563) = " + Exercise65 (28703, 5, 8563) + "\ r \n" ) ; // Exercise 6.5 b 338 C onsole. WriteLine ( " E x e r c i s e 6. 5 b : " ) ; 339 Console. WriteLine ( " Exercise65 (31153, 10, 12611) = " + Exercise65 (31153, 10, 12611) ) ; 340 C onsole. Read ( ) ; 341 } 342 } 343 } 5
CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Linda Shapiro Winter 2015
CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis Linda Shapiro Today Registration should be done. Homework 1 due 11:59 pm next Wednesday, January 14 Review math essential
More informationLecture 10: Distinct Degree Factoring
CS681 Computational Number Theory Lecture 10: Distinct Degree Factoring Instructor: Piyush P Kurur Scribe: Ramprasad Saptharishi Overview Last class we left of with a glimpse into distant degree factorization.
More informationMath 319 Problem Set #3 Solution 21 February 2002
Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod
More informationGroups in Cryptography
Groups in Cryptography Çetin Kaya Koç http://cs.ucsb.edu/~koc/cs178 koc@cs.ucsb.edu Koç (http://cs.ucsb.edu/~koc) ucsb cs 178 intro to crypto winter 2013 1 / 13 Groups in Cryptography A set S and a binary
More informationCryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur
Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Module No. # 01 Lecture No. # 12 Block Cipher Standards
More informationApplications of Fermat s Little Theorem and Congruences
Applications of Fermat s Little Theorem and Congruences Definition: Let m be a positive integer. Then integers a and b are congruent modulo m, denoted by a b mod m, if m (a b). Example: 3 1 mod 2, 6 4
More informationIntroduktion til distribuerede systemer uge 37 - fil og webserver
Introduktion til distribuerede systemer uge 37 - fil og webserver Rune Højsgaard 090678 1. delsstuderende 13. september 2005 1 Kort beskrivelse Implementationen af filserver og webserver virker, men håndterer
More information= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that
Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without
More informationZabin Visram Room CS115 CS126 Searching. Binary Search
Zabin Visram Room CS115 CS126 Searching Binary Search Binary Search Sequential search is not efficient for large lists as it searches half the list, on average Another search algorithm Binary search Very
More informationBig Data & Scripting Part II Streaming Algorithms
Big Data & Scripting Part II Streaming Algorithms 1, Counting Distinct Elements 2, 3, counting distinct elements problem formalization input: stream of elements o from some universe U e.g. ids from a set
More informationLecture Note 5 PUBLIC-KEY CRYPTOGRAPHY. Sourav Mukhopadhyay
Lecture Note 5 PUBLIC-KEY CRYPTOGRAPHY Sourav Mukhopadhyay Cryptography and Network Security - MA61027 Modern/Public-key cryptography started in 1976 with the publication of the following paper. W. Diffie
More informationFactorization Methods: Very Quick Overview
Factorization Methods: Very Quick Overview Yuval Filmus October 17, 2012 1 Introduction In this lecture we introduce modern factorization methods. We will assume several facts from analytic number theory.
More informationSecure Network Communication Part II II Public Key Cryptography. Public Key Cryptography
Kommunikationssysteme (KSy) - Block 8 Secure Network Communication Part II II Public Key Cryptography Dr. Andreas Steffen 2000-2001 A. Steffen, 28.03.2001, KSy_RSA.ppt 1 Secure Key Distribution Problem
More informationIntroduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC
Introduction to Programming (in C++) Loops Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Example Assume the following specification: Input: read a number N > 0 Output:
More informationExample. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification:
Example Introduction to Programming (in C++) Loops Assume the following specification: Input: read a number N > 0 Output: write the sequence 1 2 3 N (one number per line) Jordi Cortadella, Ricard Gavaldà,
More informationAn Overview of Integer Factoring Algorithms. The Problem
An Overview of Integer Factoring Algorithms Manindra Agrawal IITK / NUS The Problem Given an integer n, find all its prime divisors as efficiently as possible. 1 A Difficult Problem No efficient algorithm
More informationLecture 13 - Basic Number Theory.
Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted
More informationMathematics. (www.tiwariacademy.com : Focus on free Education) (Chapter 5) (Complex Numbers and Quadratic Equations) (Class XI)
( : Focus on free Education) Miscellaneous Exercise on chapter 5 Question 1: Evaluate: Answer 1: 1 ( : Focus on free Education) Question 2: For any two complex numbers z1 and z2, prove that Re (z1z2) =
More informationChapter Objectives. Chapter 9. Sequential Search. Search Algorithms. Search Algorithms. Binary Search
Chapter Objectives Chapter 9 Search Algorithms Data Structures Using C++ 1 Learn the various search algorithms Explore how to implement the sequential and binary search algorithms Discover how the sequential
More informationLUC: A New Public Key System
LUC: A New Public Key System Peter J. Smith a and Michael J. J. Lennon b a LUC Partners, Auckland UniServices Ltd, The University of Auckland, Private Bag 92019, Auckland, New Zealand. b Department of
More informationBreaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and
Breaking The Code Ryan Lowe Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and a minor in Applied Physics. As a sophomore, he took an independent study
More informationMBA Jump Start Program
MBA Jump Start Program Module 2: Mathematics Thomas Gilbert Mathematics Module Online Appendix: Basic Mathematical Concepts 2 1 The Number Spectrum Generally we depict numbers increasing from left to right
More informationThe Mathematics of the RSA Public-Key Cryptosystem
The Mathematics of the RSA Public-Key Cryptosystem Burt Kaliski RSA Laboratories ABOUT THE AUTHOR: Dr Burt Kaliski is a computer scientist whose involvement with the security industry has been through
More informationNEW DIGITAL SIGNATURE PROTOCOL BASED ON ELLIPTIC CURVES
NEW DIGITAL SIGNATURE PROTOCOL BASED ON ELLIPTIC CURVES Ounasser Abid 1, Jaouad Ettanfouhi 2 and Omar Khadir 3 1,2,3 Laboratory of Mathematics, Cryptography and Mechanics, Department of Mathematics, Fstm,
More informationComputing exponents modulo a number: Repeated squaring
Computing exponents modulo a number: Repeated squaring How do you compute (1415) 13 mod 2537 = 2182 using just a calculator? Or how do you check that 2 340 mod 341 = 1? You can do this using the method
More informationCrash Course in Java
Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is
More informationChapter 5 Functions. Introducing Functions
Chapter 5 Functions 1 Introducing Functions A function is a collection of statements that are grouped together to perform an operation Define a function Invoke a funciton return value type method name
More informationRSA Question 2. Bob thinks that p and q are primes but p isn t. Then, Bob thinks Φ Bob :=(p-1)(q-1) = φ(n). Is this true?
RSA Question 2 Bob thinks that p and q are primes but p isn t. Then, Bob thinks Φ Bob :=(p-1)(q-1) = φ(n). Is this true? Bob chooses a random e (1 < e < Φ Bob ) such that gcd(e,φ Bob )=1. Then, d = e -1
More informationComputing Cubic Fields in Quasi-Linear Time
Computing Cubic Fields in Quasi-Linear Time K. Belabas Département de mathématiques (A2X) Université Bordeaux I 351, cours de la Libération, 33405 Talence (France) belabas@math.u-bordeaux.fr Cubic fields
More informationCS 758: Cryptography / Network Security
CS 758: Cryptography / Network Security offered in the Fall Semester, 2003, by Doug Stinson my office: DC 3122 my email address: dstinson@uwaterloo.ca my web page: http://cacr.math.uwaterloo.ca/~dstinson/index.html
More informationCryptography and Network Security Chapter 8
Cryptography and Network Security Chapter 8 Fifth Edition by William Stallings Lecture slides by Lawrie Brown (with edits by RHB) Chapter 8 Introduction to Number Theory The Devil said to Daniel Webster:
More informationInformation og dokumentation Ledelsessystem for dokumentstyring Krav
Dansk standard DS/ISO 30301 1. udgave 2011-11-22 Information og dokumentation Ledelsessystem for dokumentstyring Krav Information and documentation Management systems for records Requirements DS/ISO 30301
More informationTHE NUMBER OF REPRESENTATIONS OF n OF THE FORM n = x 2 2 y, x > 0, y 0
THE NUMBER OF REPRESENTATIONS OF n OF THE FORM n = x 2 2 y, x > 0, y 0 RICHARD J. MATHAR Abstract. We count solutions to the Ramanujan-Nagell equation 2 y +n = x 2 for fixed positive n. The computational
More informationTwo Binary Algorithms for Calculating the Jacobi Symbol and a Fast Systolic Implementation in Hardware
Two Binary Algorithms for Calculating the Jacobi Symbol and a Fast Systolic Implementation in Hardware George Purdy, Carla Purdy, and Kiran Vedantam ECECS Department, University of Cincinnati, Cincinnati,
More informationIntroduction to Java. CS 3: Computer Programming in Java
Introduction to Java CS 3: Computer Programming in Java Objectives Begin with primitive data types Create a main class with helper methods Learn how to call built-in class methods and instance methods
More informationGeneric attacks and index calculus. D. J. Bernstein University of Illinois at Chicago
Generic attacks and index calculus D. J. Bernstein University of Illinois at Chicago The discrete-logarithm problem Define Ô = 1000003. Easy to prove: Ô is prime. Can we find an integer Ò ¾ 1 2 3 Ô 1 such
More informationECE 842 Report Implementation of Elliptic Curve Cryptography
ECE 842 Report Implementation of Elliptic Curve Cryptography Wei-Yang Lin December 15, 2004 Abstract The aim of this report is to illustrate the issues in implementing a practical elliptic curve cryptographic
More informationminimal polyonomial Example
Minimal Polynomials Definition Let α be an element in GF(p e ). We call the monic polynomial of smallest degree which has coefficients in GF(p) and α as a root, the minimal polyonomial of α. Example: We
More informationInformationsteknologi Serviceledelse Del 4: Procesreferencemodel
DS-information DS/ISO/IEC TR 20000-4 1. udgave 2010-12-14 Informationsteknologi Serviceledelse Del 4: Procesreferencemodel Information technology Service management Part 4: Process reference model DS/ISO/IEC
More informationCSCE 465 Computer & Network Security
CSCE 465 Computer & Network Security Instructor: Dr. Guofei Gu http://courses.cse.tamu.edu/guofei/csce465/ Public Key Cryptogrophy 1 Roadmap Introduction RSA Diffie-Hellman Key Exchange Public key and
More informationU.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra
U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory
More informationCryptography and Network Security Chapter 10
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown (with edits by RHB) Chapter 10 Other Public Key Cryptosystems Amongst the tribes of Central
More informationC / C++ Programming Lab manual
ECE114 L / 256 Manual Tim Lin & Saeed Monemi California State Polytechnic University at Pomona Department of Electrical and Computer Engineering C / C++ Programming Lab manual Dr. Tim Lin Dr. Saeed Monemi
More informationChapter 3. if 2 a i then location: = i. Page 40
Chapter 3 1. Describe an algorithm that takes a list of n integers a 1,a 2,,a n and finds the number of integers each greater than five in the list. Ans: procedure greaterthanfive(a 1,,a n : integers)
More informationDESIGN OF GATE NETWORKS
DESIGN OF GATE NETWORKS DESIGN OF TWO-LEVEL NETWORKS: and-or and or-and NETWORKS MINIMAL TWO-LEVEL NETWORKS KARNAUGH MAPS MINIMIZATION PROCEDURE AND TOOLS LIMITATIONS OF TWO-LEVEL NETWORKS DESIGN OF TWO-LEVEL
More informationData Structures. Algorithm Performance and Big O Analysis
Data Structures Algorithm Performance and Big O Analysis What s an Algorithm? a clearly specified set of instructions to be followed to solve a problem. In essence: A computer program. In detail: Defined
More informationCUDA Programming. Week 4. Shared memory and register
CUDA Programming Week 4. Shared memory and register Outline Shared memory and bank confliction Memory padding Register allocation Example of matrix-matrix multiplication Homework SHARED MEMORY AND BANK
More informationIntroduction to Finite Fields (cont.)
Chapter 6 Introduction to Finite Fields (cont.) 6.1 Recall Theorem. Z m is a field m is a prime number. Theorem (Subfield Isomorphic to Z p ). Every finite field has the order of a power of a prime number
More informationPublic Key Cryptography and RSA. Review: Number Theory Basics
Public Key Cryptography and RSA Murat Kantarcioglu Based on Prof. Ninghui Li s Slides Review: Number Theory Basics Definition An integer n > 1 is called a prime number if its positive divisors are 1 and
More informationCS 111 Classes I 1. Software Organization View to this point:
CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects
More informationSignature Schemes. CSG 252 Fall 2006. Riccardo Pucella
Signature Schemes CSG 252 Fall 2006 Riccardo Pucella Signatures Signatures in real life have a number of properties They specify the person responsible for a document E.g. that it has been produced by
More informationIntroduction to Cryptography CS 355
Introduction to Cryptography CS 355 Lecture 30 Digital Signatures CS 355 Fall 2005 / Lecture 30 1 Announcements Wednesday s lecture cancelled Friday will be guest lecture by Prof. Cristina Nita- Rotaru
More informationShort Programs for functions on Curves
Short Programs for functions on Curves Victor S. Miller Exploratory Computer Science IBM, Thomas J. Watson Research Center Yorktown Heights, NY 10598 May 6, 1986 Abstract The problem of deducing a function
More informationKogebogs HelloWorld øvelser i.net Remoting
Kogebogs HelloWorld øvelser i.net Remoting Denne øvelse viser hvordan en simpel.net Remoting client / server applikation kan konstrueres. Der arbejdes med et simpelt, men klassisk, HelleWorld program,
More informationThe Fast Fourier Transform
The Fast Fourier Transform Chris Lomont, Jan 2010, http://www.lomont.org, updated Aug 2011 to include parameterized FFTs. This note derives the Fast Fourier Transform (FFT) algorithm and presents a small,
More informationELEMENTARY THOUGHTS ON DISCRETE LOGARITHMS. Carl Pomerance
ELEMENTARY THOUGHTS ON DISCRETE LOGARITHMS Carl Pomerance Given a cyclic group G with generator g, and given an element t in G, the discrete logarithm problem is that of computing an integer l with g l
More informationArithmetic algorithms for cryptology 5 October 2015, Paris. Sieves. Razvan Barbulescu CNRS and IMJ-PRG. R. Barbulescu Sieves 0 / 28
Arithmetic algorithms for cryptology 5 October 2015, Paris Sieves Razvan Barbulescu CNRS and IMJ-PRG R. Barbulescu Sieves 0 / 28 Starting point Notations q prime g a generator of (F q ) X a (secret) integer
More informationElementary factoring algorithms
Math 5330 Spring 013 Elementary factoring algorithms The RSA cryptosystem is founded on the idea that, in general, factoring is hard. Where as with Fermat s Little Theorem and some related ideas, one can
More informationSome facts about polynomials modulo m (Full proof of the Fingerprinting Theorem)
Some facts about polynomials modulo m (Full proof of the Fingerprinting Theorem) In order to understand the details of the Fingerprinting Theorem on fingerprints of different texts from Chapter 19 of the
More informationInformationsteknologi Personlig identifikation ISO-overensstemmende kørekort Del 4: Prøvningsmetoder
Dansk standard DS/ISO/IEC 18013-4 1. udgave 2012-01-11 Informationsteknologi Personlig identifikation ISO-overensstemmende kørekort Del 4: Prøvningsmetoder Information technology Personal identification
More informationJ a v a Quiz (Unit 3, Test 0 Practice)
Computer Science S-111a: Intensive Introduction to Computer Science Using Java Handout #11 Your Name Teaching Fellow J a v a Quiz (Unit 3, Test 0 Practice) Multiple-choice questions are worth 2 points
More informationFuld Skolerapport for Søhusskolen, i Odense kommune, for skoleår 2013/2014 for klassetrin(ene) 9. med reference Tilsvarende klassetrin i kommunen
Side 1 af 41 Side 2 af 41 Side 3 af 41 Side 4 af 41 Side 5 af 41 Side 6 af 41 Side 7 af 41 Side 8 af 41 Side 9 af 41 Side 10 af 41 Side 11 af 41 Side 12 af 41 Side 13 af 41 Side 14 af 41 Side 15 af 41
More informationFuld Skolerapport for Hunderupskolen, i Odense kommune, for skoleår 2013/2014 for klassetrin(ene) 7. med reference Tilsvarende klassetrin i kommunen
Side 1 af 43 Side 2 af 43 Side 3 af 43 Side 4 af 43 Side 5 af 43 Side 6 af 43 Side 7 af 43 Side 8 af 43 Side 9 af 43 Side 10 af 43 Side 11 af 43 Side 12 af 43 Side 13 af 43 Side 14 af 43 Side 15 af 43
More informationRubber condoms Guidance on the use of ISO 4074 in the quality management of natural rubber latex condoms
Dansk standard DS/ISO 16038 1. udgave 2005-11-14 Kondomer Vejledning i brug af ISO 4074 ved kvalitetsstyring af latexkondomer Rubber condoms Guidance on the use of ISO 4074 in the quality management of
More informationProgramming in C# with Microsoft Visual Studio 2010
Course 10266A: Programming in C# with Microsoft Visual Studio 2010 Course Details Course Outline Module 1: Introducing C# and the.net Framework This module explains the.net Framework, and using C# and
More informationPRI-(BASIC2) Preliminary Reference Information Mod date 3. Jun. 2015
PRI-(BASIC2) Table of content Introduction...2 New Comment...2 Long variable...2 Function definition...3 Function declaration...3 Function return value...3 Keyword return inside functions...4 Function
More informationSoftware Engineering 1 EEL5881 Spring 2009. Homework - 2
Software Engineering 1 EEL5881 Spring 2009 Homework - 2 Submitted by Meenakshi Lakshmikanthan 04/01/2009 PROBLEM STATEMENT: Implement the classes as shown in the following diagram. You can use any programming
More informationPublic Key Cryptography. c Eli Biham - March 30, 2011 258 Public Key Cryptography
Public Key Cryptography c Eli Biham - March 30, 2011 258 Public Key Cryptography Key Exchange All the ciphers mentioned previously require keys known a-priori to all the users, before they can encrypt
More informationCopy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.
Algebra 2 - Chapter Prerequisites Vocabulary Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any. P1 p. 1 1. counting(natural) numbers - {1,2,3,4,...}
More informationSoftwareudvikling Kvalitetskrav til og evaluering af softwareprodukter (SQuaRE) Fælles industriformat (CIF) til brugbare testrapporter
Dansk standard DS/ISO/IEC 25062 1. udgave 2008-05-08 Softwareudvikling Kvalitetskrav til og evaluering af softwareprodukter (SQuaRE) Fælles industriformat (CIF) til brugbare testrapporter Software engineering
More informationInformationsteknologi Personlig identifikation ISO-overensstemmende kørekort Del 2: Maskinlæsbare teknologier
Dansk standard Rettelsesblad DS/ISO/IEC 18013-2/Corr. 1 1. udgave 2012-01-25 Informationsteknologi Personlig identifikation ISO-overensstemmende kørekort Del 2: Maskinlæsbare teknologier Information technology
More informationBuilding Java Programs
Building Java Programs Chapter 5 Lecture 5-2: Random Numbers reading: 5.1-5.2 self-check: #8-17 exercises: #3-6, 10, 12 videos: Ch. 5 #1-2 1 The Random class A Random object generates pseudo-random* numbers.
More informationThe Sieve Re-Imagined: Integer Factorization Methods
The Sieve Re-Imagined: Integer Factorization Methods by Jennifer Smith A research paper presented to the University of Waterloo in partial fulfillment of the requirement for the degree of Master of Mathematics
More informationCOMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012
Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about
More informationBinary Number System. 16. Binary Numbers. Base 10 digits: 0 1 2 3 4 5 6 7 8 9. Base 2 digits: 0 1
Binary Number System 1 Base 10 digits: 0 1 2 3 4 5 6 7 8 9 Base 2 digits: 0 1 Recall that in base 10, the digits of a number are just coefficients of powers of the base (10): 417 = 4 * 10 2 + 1 * 10 1
More informationExample of a Java program
Example of a Java program class SomeNumbers static int square (int x) return x*x; public static void main (String[] args) int n=20; if (args.length > 0) // change default n = Integer.parseInt(args[0]);
More informationPositional Numbering System
APPENDIX B Positional Numbering System A positional numbering system uses a set of symbols. The value that each symbol represents, however, depends on its face value and its place value, the value associated
More informationSome applications of LLL
Some applications of LLL a. Factorization of polynomials As the title Factoring polynomials with rational coefficients of the original paper in which the LLL algorithm was first published (Mathematische
More informationNew Hash Function Construction for Textual and Geometric Data Retrieval
Latest Trends on Computers, Vol., pp.483-489, ISBN 978-96-474-3-4, ISSN 79-45, CSCC conference, Corfu, Greece, New Hash Function Construction for Textual and Geometric Data Retrieval Václav Skala, Jan
More informationPrinciples of Public Key Cryptography. Applications of Public Key Cryptography. Security in Public Key Algorithms
Principles of Public Key Cryptography Chapter : Security Techniques Background Secret Key Cryptography Public Key Cryptography Hash Functions Authentication Chapter : Security on Network and Transport
More informationa 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.
Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given
More informationElements of Applied Cryptography Public key encryption
Network Security Elements of Applied Cryptography Public key encryption Public key cryptosystem RSA and the factorization problem RSA in practice Other asymmetric ciphers Asymmetric Encryption Scheme Let
More informationInteroperabilitetsspecifikationer for fælles ekstern strømforsyningsenhed (EPS) til dataoverførsel ved hjælp af mobiltelefon
Dansk standard DS/EN 62684 1. udgave 2011-02-09 Interoperabilitetsspecifikationer for fælles ekstern strømforsyningsenhed (EPS) til dataoverførsel ved hjælp af mobiltelefon Interoperability specifications
More informationwww.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk
CS506 Web Design and Development Solved Online Quiz No. 01 Which of the following is a general purpose container? JFrame Dialog JPanel JApplet Which of the following package needs to be import while handling
More informationStupid Divisibility Tricks
Stupid Divisibility Tricks 101 Ways to Stupefy Your Friends Appeared in Math Horizons November, 2006 Marc Renault Shippensburg University Mathematics Department 1871 Old Main Road Shippensburg, PA 17013
More informationCryptography and Network Security Number Theory
Cryptography and Network Security Number Theory Xiang-Yang Li Introduction to Number Theory Divisors b a if a=mb for an integer m b a and c b then c a b g and b h then b (mg+nh) for any int. m,n Prime
More informationNumber Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may
Number Theory Divisibility and Primes Definition. If a and b are integers and there is some integer c such that a = b c, then we say that b divides a or is a factor or divisor of a and write b a. Definition
More informationFaster deterministic integer factorisation
David Harvey (joint work with Edgar Costa, NYU) University of New South Wales 25th October 2011 The obvious mathematical breakthrough would be the development of an easy way to factor large prime numbers
More informationIVR Studio 3.0 Guide. May-2013. Knowlarity Product Team
IVR Studio 3.0 Guide May-2013 Knowlarity Product Team Contents IVR Studio... 4 Workstation... 4 Name & field of IVR... 4 Set CDR maintainence property... 4 Set IVR view... 4 Object properties view... 4
More informationTYPES Workshop, 12-13 june 2006 p. 1/22. The Elliptic Curve Factorization method
Ä ÙÖ ÒØ ÓÙ Ð ÙÖ ÒØ ÓÑ Ø ºÒ Ø TYPES Workshop, 12-13 june 2006 p. 1/22 ÄÇÊÁ ÍÒ Ú Ö Ø À ÒÖ ÈÓ Ò Ö Æ ÒÝÁ. The Elliptic Curve Factorization method Outline 1. Introduction 2. Factorization method principle 3.
More informationChapter 2: Elements of Java
Chapter 2: Elements of Java Basic components of a Java program Primitive data types Arithmetic expressions Type casting. The String type (introduction) Basic I/O statements Importing packages. 1 Introduction
More informationOn prime-order elliptic curves with embedding degrees k = 3, 4 and 6
On prime-order elliptic curves with embedding degrees k = 3, 4 and 6 Koray Karabina and Edlyn Teske University of Waterloo ANTS VIII, Banff, May 20, 2008 K. Karabina and E. Teske (UW) Prime-order elliptic
More informationNotes on Factoring. MA 206 Kurt Bryan
The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor
More informationFast Arithmetic Coding (FastAC) Implementations
Fast Arithmetic Coding (FastAC) Implementations Amir Said 1 Introduction This document describes our fast implementations of arithmetic coding, which achieve optimal compression and higher throughput by
More informationDigital Signatures. (Note that authentication of sender is also achieved by MACs.) Scan your handwritten signature and append it to the document?
Cryptography Digital Signatures Professor: Marius Zimand Digital signatures are meant to realize authentication of the sender nonrepudiation (Note that authentication of sender is also achieved by MACs.)
More informationCryptography and Network Security Chapter 9
Cryptography and Network Security Chapter 9 Fifth Edition by William Stallings Lecture slides by Lawrie Brown (with edits by RHB) Chapter 9 Public Key Cryptography and RSA Every Egyptian received two names,
More informationCS 2112 Spring 2014. 0 Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions
CS 2112 Spring 2014 Assignment 3 Data Structures and Web Filtering Due: March 4, 2014 11:59 PM Implementing spam blacklists and web filters requires matching candidate domain names and URLs very rapidly
More information