A.4 Related Plaintext Attack rrp = {}; b = 3; While[b < 10, nbits = 2∧ nbits = 2 b; ∧ nbits = 2 b; ∧b; i = 3; g = 50; nlist = {}; primos = {}; While[Length[nlist] < g, e = Prime[RandomInteger[{2, 5}]]; p = RandomPrime[{2∧ (nbits − 1), 2∧ p = RandomPrime[{2 nbits − 1}]; ∧ (nbits − 1), 2∧ p = RandomPrime[{2 nbits − 1}]; ∧ (nbits − 1), 2∧nbits − 1}]; q = RandomPrime[{2∧ (nbits − 1), 2∧ q = RandomPrime[{2 nbits − 1}]; ∧ (nbits − 1), 2∧ q = RandomPrime[{2 nbits − 1}]; ∧ (nbits − 1), 2∧nbits − 1}]; While[Intersection[{p}, primos] = = = {}, p = RandomPrime[{2∧ (nbits − 1), 2∧ p = RandomPrime[{2 nbits − 1}]; ]; ∧ (nbits − 1), 2∧ p = RandomPrime[{2 nbits − 1}]; ]; ∧ (nbits − 1), 2∧nbits − 1}]; ]; While[Intersection[{q}, primos] = = = {}p {}p {}p == q, q = RandomPrime[{2∧ (nbits − 1), 2∧ q = RandomPrime[{2 nbits − 1}]; ]; ∧ (nbits − 1), 2∧ q = RandomPrime[{2 nbits − 1}]; ]; ∧ (nbits − 1), 2∧nbits − 1}]; ]; n = p ∗ q; neuler = (p − 1)(q − 1); If[GCD[e, neuler] == 1, nlist = Append[nlist, {e, n}]; primos = Append[primos, p]; primos = Append[primos, q], nbits = nbits + 1; ]; ]; l = Max[Table[nlist[[i, 1]] ∗ 2, {i, 1, g}]]; coef = Table[{RandomInteger[{0, 2}], i}, {i, 1, l}]; poli = Function[{i, m}, Mod[m∧ Mod[m coef[[i, 1]] + coef[[i, 2]], nlist[[i, 2]]] ∧ Mod[m coef[[i, 1]] + coef[[i, 2]], nlist[[i, 2]]] ∧coef[[i, 1]] + coef[[i, 2]], nlist[[i, 2]]] ]; deg = Function[i, coef[[i, 1]]]; max = Max[Table[nlist[[i, 1]] ∗ deg[i], {i, 1, l}]]; i = 2; n0 = nlist[[1, 2]]; 59
While[i ≤ 23, n0 = Min[n0, nlist[[i, 2]]]; i++; ]; i = 2; n = nlist[[1, 2]]; While[i ≤ 23, n = n ∗ nlist[[i, 2]]; i++; ]; m = RandomInteger[n0 − 1]; clist = Table[PowerMod[poli[i, m], nlist[[i, 1]], nlist[[i, 2]]], {i, 1, l}]; rrp = Append[rrp, {BitLength[n], Timing[ sigma = Max[Table[nlist[[i, 1]] ∗ deg[i], {i, 1, l}]]; h = Table[sigma − deg[i] ∗ nlist[[i, 1]], {i, 1, l}]; gpoli = Function[{i, m}, Mod[PowerMod[m, h[[i]], nlist[[i, 2]]]∗ (PowerMod[poli[i, m], nlist[[i, 1]], nlist[[i, 2]]] − clist[[i]]), nlist[[i, 2]]] ]; mlist = Table[n/nlist[[i, 2]], {i, 1, l}]; minv = Table[PowerMod[mlist[[i]], −1, nlist[[i, 2]]], {i, 1, l}]; gcrt = Function[m, r = 0; i = 1; While[i ≤ l, r = r + gpoli[i, m]mlist[[i]]minv[[i]]; i++; ]; Mod[r, n] ]; ][[1]]}]; b++; 60
- Page 1 and 2:
A Survey of Cryptanalytic Attacks o
- Page 3 and 4:
Palavras Chave: RSA, criptanálise,
- Page 5 and 6:
Contents 1 Introduction 1 1.1 Crypt
- Page 7 and 8:
List of Tables 1 Notation . . . . .
- Page 9 and 10:
messages, Alice and Bob needed a se
- Page 11 and 12:
key, have lead to restrictions over
- Page 13 and 14:
1.5.2 Time Complexity In cryptograp
- Page 15 and 16: Definition 8. Given an integer N >
- Page 17 and 18: If we want to solve a system of lin
- Page 19 and 20: 1.5.5 Continued Fractions The conti
- Page 21 and 22: 1.6 RSA Definition We are now in co
- Page 23 and 24: calculates these roots (though, as
- Page 25 and 26: not the case regarding RSA as we ha
- Page 27 and 28: 1.8.3 Common Prime RSA For the Comm
- Page 29 and 30: So if we use contrapositive of this
- Page 31 and 32: The consequence of this theorem is
- Page 33 and 34: 2.1.4 AKS Test In 2004, a major bre
- Page 35 and 36: We will begin with an old method cr
- Page 37 and 38: Theorem 18. Let N > 1 be an integer
- Page 39 and 40: e reduced. Regarding the GNFS, it s
- Page 41 and 42: factorization of N. That is, each u
- Page 43 and 44: Table 3: DeLaurentis Attack’s Exp
- Page 45 and 46: Notice that gi(m) ∼ = 0 (mod Ni)
- Page 47 and 48: ecovery exponent l to reveal the pl
- Page 49 and 50: y fN(x) = 2 −k1e ((m22 k2 + x2 k1
- Page 51 and 52: Theorem 25. Let two plain texts m1,
- Page 53 and 54: Theorem 28. Given an RSA modulus N
- Page 55 and 56: increment m by one and start again.
- Page 57 and 58: avoided. It should be noted that, o
- Page 59 and 60: 5 Bibliography [1] Kamilah Abdullah
- Page 61 and 62: [27] Arjen K. Lenstra, Primality Te
- Page 63 and 64: A Implementations of the attacks fr
- Page 65: q = RandomPrime[{2∧ (nbits − 1)
- Page 69 and 70: B Implementations of the attacks fr
- Page 71 and 72: C Implementation of Wiener’s atta