ComSec講義:A Brief Introduction to Elliptic Curve Cryptography (ECC)

Jianshu支持公式太差了斜做。分享文檔在此:鏈接: https://pan.baidu.com/s/1jHJNGt4 密碼: rpvi 箭启。大家自己下載閱讀吧鹿寨。

Introdution

本文是簡單介紹橢圓曲線密碼學(xué)的基本內(nèi)容,目標(biāo)是直觀、簡化宅倒,忽略嚴(yán)謹(jǐn)性疫萤。切記圣絮,簡單是為了導(dǎo)向嚴(yán)肅而不是庸俗秕脓。

閱讀以下內(nèi)容,在有群論與密碼學(xué)的基礎(chǔ)上诱告,大概需要1個小時撵枢。如果沒有密碼學(xué)基礎(chǔ),可忽略密碼學(xué),而重點關(guān)注橢圓曲線的定義與相關(guān)計算锄禽。

Why we need ECC?

  • Efficiency
  • More properties

What exactly is an elliptic curve?

Definition

Let $$a ∈ ?$$, $$b ∈ ?$$, be constants such that $$4a^3 + 27b^2 ≠ 0$$. A non-singular elliptic curve is the set $$E$$ of solutions $$(x, y) ∈ ? \times ?$$ to the equation: $$y^2 = x^3 + ax + b$$ together with a special point $O$ called the point at infinity.

The solution set $$E$$ forms an Abelian group.

Graphical Representation

Elliptic curve

Addition of the Group E

Three cases:

Case1 x1 ≠ x2

Addition is defined as follows:

Let $$(x_1, y_1) + (x_2, y_2) = (x_3, y_3) ∈ E$$ where

$$x_3 = λ^2 - x_1 - x_2$$

$$y_3 = λ(x_1 – x_3) - y_1$$,

and $$λ = (y_2 – y_1) / (x_2 – x_1)$$

**Case2 x1 = x2 and y1 = - y2 **

Addition is defined as follows:

$$(x_1, y_1) + (x_2, y_2) = (x_3, y_3) ∈ E$$ where

$$(x, y) + (x, -y) = O$$, the point at infinity.

Case3 x1 = x2 and y1 = y2

Addition is defined as follows:

$$(x_1, y_1) + (x_2,y_2) = (x_3, y_3) ∈ E$$ where

$$x_3 = λ^2 - x_1 - x_2$$

$$y_3 = λ(x_1 – x_3) - y_1$$, and

$$λ = (3x_1^2 + a) / 2y_1$$

If you want to know why the computations are correct, please read Silverman's text: Rational Points on Elliptic Curves.

ECC mod p

Definition. Let $$p > 3$$ be prime. The elliptic curve $$y^2 = x^3 + ax + b$$ over $$?_p$$ is the set of solutions $$(x, y) \in ?_p \times ?_p$$ to the congruence: $$y^2 ≡ x^3 + ax + b ; (mod ; p) $$ where $$a \in ?_p$$, $$b \in ?_p$$, are constants such that $$4a^3 + 27b^2 ? 0 \quad (mod ; p)$$, together with a special point $$O$$ called the point at infinity.

Solutions still form an Abelian group.

Example

Let’s examine the following elliptic curve as an example:

$$y^2 = x^3 + x + 6$$ over $$?_{11}$$

X 0 1 2 3 4 5 6 7 8 9 10
$$y^2 = x^3 + x + 6$$ 6 8 5 3 8 4 8 4 9 7 4
QR? N N Y Y N Y N Y Y N Y
Y 4, 7 5, 6 2, 9 2, 9 3, 8 2, 9

Generating the group

Since the $$O(E)$$ is prime, the group is cyclic. We can generate the group by choosing any point other than the point at infinity. Let our generator be $$ g = (2, 7)$$

Generate the group by using the rules of addition we defined earlier where $$2g = g + g$$:

g 2g 3g 4g 5g 6g 7g 8g 9g 10g 11g 12g 13g
(2, 7) (5, 2) (8, 3) (10, 2) (3, 6) (7, 9) (7, 2) (3, 5) (10, 9) (8, 8) (5, 9) (2, 4) (0, 6)

Where $$\lambda = 8$$. You could check that.

Discrete logarithm problem on elliptic curve groups

Definition. (Informal!) Suppose $$E$$ is an elliptic curve and $$P \in E $$ . Given a multiple $$Q$$ of $$P$$, the elliptic curve discrete log problem(ECDLP) is to find $$n$$ such that $$nP = Q$$.

Example. Given $$g$$ and $$Q=(3, 5)$$, find $$n=8$$, s.t., $$ng = Q$$.

We believe ECDLP problem is hard, more rigorous results may be found here.

A real example from the NSA

Curve P-192

  • p = 62771017353866807638578942320766641608390870039024961279
  • r = 627710173538668076385789423176059013767194773182842284081
  • a = 3099d2bb bfcb2538 542dcd5f b078b6ef 5f3d6fe2 c745de65
  • b = 64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1
  • Gx = 188da89e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012
  • Gy = 07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811

ECC in Sage

Play with following simple code:

sage: p = 137
sage: F = FiniteField(p)
sage: E = EllipticCurve(F, [F.random_element(), F.random_element()])
sage: print E
Elliptic Curve defined by y^2 = x^3 + 112*x + 106 over Finite Field of size 137
sage: E.points()
[(0 : 1 : 0), (2 : 8 : 1), (2 : 129 : 1),......

Now, to visualize a EC, actually, it looks like that ...

sage: show(plot(E, hue=.9))
EC137.png

Diffie-Hellman in ECC

sage: p = next_prime(randrange(10^40))
sage: print p
sage: F = FiniteField(p)
sage: E = EllipticCurve(F, [F.random_element(), F.random_element()])
sage: P = E.random_element()
sage: print P
sage: b = randrange(1000); b
sage: B = b*P
sage: a = randrange(1000); a
sage: A = a*P
sage: if(a*B == b*A): print "We share a common secret."

Show me more...

2017年8月24日

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末潜必,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子沟绪,更是在濱河造成了極大的恐慌刮便,老刑警劉巖,帶你破解...
    沈念sama閱讀 218,284評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件绽慈,死亡現(xiàn)場離奇詭異恨旱,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)坝疼,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,115評論 3 395
  • 文/潘曉璐 我一進(jìn)店門搜贤,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人钝凶,你說我怎么就攤上這事仪芒。” “怎么了耕陷?”我有些...
    開封第一講書人閱讀 164,614評論 0 354
  • 文/不壞的土叔 我叫張陵掂名,是天一觀的道長。 經(jīng)常有香客問我哟沫,道長饺蔑,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,671評論 1 293
  • 正文 為了忘掉前任嗜诀,我火速辦了婚禮猾警,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘隆敢。我一直安慰自己发皿,他們只是感情好,可當(dāng)我...
    茶點故事閱讀 67,699評論 6 392
  • 文/花漫 我一把揭開白布拂蝎。 她就那樣靜靜地躺著穴墅,像睡著了一般。 火紅的嫁衣襯著肌膚如雪温自。 梳的紋絲不亂的頭發(fā)上玄货,一...
    開封第一講書人閱讀 51,562評論 1 305
  • 那天,我揣著相機(jī)與錄音捣作,去河邊找鬼誉结。 笑死鹅士,一個胖子當(dāng)著我的面吹牛券躁,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 40,309評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼也拜,長吁一口氣:“原來是場噩夢啊……” “哼以舒!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起慢哈,我...
    開封第一講書人閱讀 39,223評論 0 276
  • 序言:老撾萬榮一對情侶失蹤蔓钟,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后卵贱,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體滥沫,經(jīng)...
    沈念sama閱讀 45,668評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,859評論 3 336
  • 正文 我和宋清朗相戀三年键俱,在試婚紗的時候發(fā)現(xiàn)自己被綠了兰绣。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 39,981評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡编振,死狀恐怖缀辩,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情踪央,我是刑警寧澤臀玄,帶...
    沈念sama閱讀 35,705評論 5 347
  • 正文 年R本政府宣布,位于F島的核電站畅蹂,受9級特大地震影響健无,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜魁莉,卻給世界環(huán)境...
    茶點故事閱讀 41,310評論 3 330
  • 文/蒙蒙 一睬涧、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧旗唁,春花似錦畦浓、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,904評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至屎媳,卻和暖如春夺溢,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背烛谊。 一陣腳步聲響...
    開封第一講書人閱讀 33,023評論 1 270
  • 我被黑心中介騙來泰國打工风响, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人丹禀。 一個月前我還...
    沈念sama閱讀 48,146評論 3 370
  • 正文 我出身青樓状勤,卻偏偏與公主長得像鞋怀,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子持搜,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,933評論 2 355

推薦閱讀更多精彩內(nèi)容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 9,505評論 0 23
  • 有時候向男人主動點挺好密似,那種感覺很微妙,既然想念已久何必扭扭捏捏葫盼,既然喜歡何必在意那么多残腌。盡管也許這是最后一次抱你...
    亦涵閱讀 148評論 0 1
  • 1 表妹的初戀是他的初中同學(xué)抛猫。我見過那個小男孩十五六歲時的模樣,青澀孩灯、弱小邑滨。表妹在高中時的某個寒假期間,帶了一撥男...
    弋筠閱讀 2,758評論 1 4
  • 多給孩子一些鼓勵 鼓勵可以說是每一個人的自然需求钱反。誰能總是受著批評掖看、指責(zé)、埋怨仍保持喜氣洋洋面哥、斗志昂揚呢哎壳?孩子幼小...
    寇廷聚閱讀 722評論 0 0