|
| 1 | +ECC shared key |
| 2 | +============== |
| 3 | +Bob |
| 4 | + p a prime number |
| 5 | + E(a,b) where |
| 6 | + 0 < a and b < p |
| 7 | + -(4a3+27b2) != 0 |
| 8 | + y^2 = x^3 + ax + b |
| 9 | + P point in E |
| 10 | + n random integer => secret |
| 11 | + compute nP |
| 12 | + |
| 13 | + send E(a,b), P, nP to Alice |
| 14 | +Alice |
| 15 | + m random integer => secret |
| 16 | + compute mP |
| 17 | + send mP to Bob |
| 18 | + |
| 19 | +shared key = mnP = nmP |
| 20 | + |
| 21 | +ECC public key |
| 22 | +============== |
| 23 | + |
| 24 | +Bob |
| 25 | + p a prime namber |
| 26 | + E(a,b) where |
| 27 | + 0 < a and b < p |
| 28 | + -(4a3+27b2) != 0 |
| 29 | + y^2 = x^3 + ax + b |
| 30 | + P point in E |
| 31 | + n random integer => private key |
| 32 | + nP => public key |
| 33 | + |
| 34 | + share E(a,b), P, nP to Alice |
| 35 | +Alice |
| 36 | + want to send a M point to Bob |
| 37 | + m random integer => private key |
| 38 | + mP => public key |
| 39 | + send (mP, M + nmP) to Bob |
| 40 | + |
| 41 | +Bob |
| 42 | + nmP = n * mP |
| 43 | + M = M + nmP - nmP = M |
| 44 | + |
| 45 | + |
| 46 | +Chararters Mapping to Points |
| 47 | +============================ |
| 48 | + - E(): eleptic curve |
| 49 | + - P: point generator |
| 50 | + - S: set of mapping points |
| 51 | + - A: a non singular matrix |
| 52 | + - A-1: inverse of matrix A |
| 53 | + - m: bob's secret key |
| 54 | + - n: alice's secret key |
| 55 | + |
| 56 | +send msg = "hello" |
| 57 | + size = 5 not divisible by 3 (need to add 1 : $ for padding) |
| 58 | + size = 6 |
| 59 | + Coding: |
| 60 | + map msg character using S => [P(1,0), P(1,7), P(2,3), P(2,3), P(2,0), $] |
| 61 | + create a matrix M of 3 rows like so |
| 62 | + M = [ |
| 63 | + P(1,0) P(1,7) |
| 64 | + P(2,3) P(2,3) |
| 65 | + P(2,0) $ |
| 66 | + ] |
| 67 | + |
| 68 | + choose A as a non singular matrix of 3*3 |
| 69 | + result S = AM |
| 70 | + S = [ |
| 71 | + Q1(x,y) Q2(x2,y2) Q3(x3,y3) |
| 72 | + ... ... ... |
| 73 | + ... ... Qn(xn,yn) |
| 74 | + ] |
| 75 | + |
| 76 | + encryption points: C = (mP, Q + m(nP)) |
| 77 | + C = [ |
| 78 | + C1 C2 C3 |
| 79 | + .. .. .. |
| 80 | + .. .. Cn |
| 81 | + ] |
| 82 | + send(mP, Q + m(nP)) |
| 83 | + |
| 84 | + decryption points: D = Q + m(nP) - n(mP) = Q |
| 85 | + D = [ |
| 86 | + Q1 Q2 Q3 |
| 87 | + .. .. .. |
| 88 | + .. .. Qn |
| 89 | + ] |
| 90 | + Decoding: |
| 91 | + M = D * A-1 |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +Biobliographie |
| 96 | +============== |
| 97 | + + [1] http://en.wikipedia.org/wiki/Elliptic_curve_cryptography |
| 98 | + + [2] https://www.certicom.com/index.php/ecc-tutorial |
| 99 | + + [3] http://www.eccworkshop.org/ |
| 100 | + |
| 101 | + books: |
| 102 | + + [4] William Stalings |
| 103 | + |
| 104 | + |
0 commit comments