Try   HackMD

密碼學簡介(二)_Cryptography

這次和大家介紹進入密碼學世界前,需要知道的最基本數學工具。我們將會講到 Group(群)、Ring (環)、 Field(體)、模運算(modular arithmetic)。本文會以數學語言來描述,需要基本的集合論,會對於符號比較能理解。


Group (群)

A group G is a set together with a binary operation, denoted "*" having the
following properties,

1.
Associativity

a,b,cG,(ab)c=a(bc)

2.
Identity

eaG,ea=ae=a

3.
Inverse

aG,bab=ba=e, where e is identity element.

We say G is abelian group if

a,bG,ab=ba

以上是群的數學定義。最簡單的例子便是整數集合

(Z,+)配上加法運算,其中加法具有交換率,也有identity 0元素,反元素更是明顯的。甚至
(Z,+)
還是Abelian group ! 注意交換率並不是一定會有的,例如矩陣的乘法不能交換。


Ring (環)

A ring is a set R equipped with two binary operations "+" , (addition) and "⋅"
(multiplication) satisfying,

1.
R is an abelian group under addition

2.

a,b,cR,(ab)c=a(bc)

3.

eaR,ea=ae=a

4.

a,b,cR,(a+b)c=ac+bc

5.

a,b,cR,a(b+c)=ac+bc

簡單來說Ring附帶兩個運算,加法底下成abelin group,在乘法下滿足乘法交換率、分配律、單位元素等,最簡單的例子依然是

(Z,+,),有興趣的人可以嘗試驗證看看,非常簡單。


Field (體)

A commutative ring such that the subset ofnonzero elements form a 
group under multiplication is called a field.

簡單來說體可以說是環的進階版本,首先它是一個交換環乘法運算可以交換,所有非零元素都存在著反元素,這邊可以注意到

(Z,+,)現在就不會滿足field的數學結構了(反元素是分數不落在整數集合),但
(R,+,)
就會是一個field的例子。

往後我們有機會的話將會介紹 Galois Field,跟AES 有著很大的關係,或者是ECC、Shortest vector problem、closet vector problem、lattice 、NTRU,都跟代數有很大的關係。

群、環、體,是代數最基本的基礎。代數學的領域非常廣泛,課程就有大學部代數、研究所近世代數、李代數、代數幾何、微分幾何等等。


Modulo Operation

Leta,r,mZ(where Z is a set of all integers) andm>0.We write
ar mod m

if m divides a-r. m is called the modulus and r is called the remainder

數學的符號看起來可能很複雜,但簡單來說

x
mod
m
,就是把
x
拿去除以
m
,並取剩下的餘數。例如
15
mod
7
=
1
,因為
15
7
1

接下來我們得介紹一個特殊的Ring


Integer ring

The integer ring
Zm
consists of

1.

Zm={0,1,,m1}

2.
Two operations “+” and “×” for all a,b ∈
Zm
such that:

a+bc mod m, (cZm)

a×bc mod m, (cZm)

基本的介紹到這邊,補充一個小定理,有興趣的人可以自己驗證(Hint: Euclidean Algorithm)。

Zp
is a field
p is a prime

代數書籍(簡單列舉兩本)

  • [1] Undergraduate Algebra, Serge Lang
  • [2]Abstract Algebra, 3rd Edition, David S. Dummit (Author), Richard M. Foote

tags: Cryptography 密碼學 Algebra 代數 Group Ring Field