- Mastering Blockchain
- Imran Bashir
- 659字
- 2021-06-11 18:32:28
Mathematics
As the subject of cryptography is based on mathematics, this section will introduce some basic concepts that will help you understand the concepts presented later.
Modular arithmetic
Also known as clock arithmetic, numbers in modular arithmetic wrap around when they reach a certain fixed number. This fixed number is a positive number called modulus (sometimes abbreviated to mod), and all operations are performed concerning this fixed number.
Modular arithmetic is analogous to a 12-hour clock; there are numbers from 1 to 12. When 12 is reached, the numbers start from 1 again. Imagine that the time is 9:00 now; 4 hours from now, it will be 1:00 because the numbers wrap around at 12 and start from 1 again. In normal addition, this would be 9 + 4 = 13, but that is not the case on a 12-hour clock; it is 1:00.
In other words, this type of arithmetic deals with the remainders after the division operation. For example, 50 mod 11 is 6 because 50 / 11 leaves a remainder of 6.
Sets
These are collections of distinct objects, for example, X = {1, 2, 3, 4, 5}.
Fields
A field is a set in which all its elements form an additive and multiplicative group. It satisfies specific axioms for addition and multiplication. For all group operations, the distributive law is also applied.
The law dictates that the same sum or product will be produced, even if any of the terms or factors are reordered.
Finite fields
A finite field is one with a finite set of elements. Also known as Galois fields, these structures are of particular importance in cryptography as they can be used to produce accurate and error-free results of arithmetic operations. For example, prime finite fields are used in Elliptic Curve Cryptography (ECC) to construct discrete logarithm problems.
Prime fields
A prime field is a finite one with a prime number of elements. It has specific rules for addition and multiplication, and each non-zero element in the field has an inverse. Addition and multiplication operations are performed modulo p, that is, modulo a prime number.
Groups
A group is a commutative set with an operation that combines two elements of the set. The group operation is closed and associated with a defined identity element. Additionally, each element in the set has an inverse. Closure (closed) means that if, for example, elements A and B are in the set, then the resultant element after performing an operation on the elements is also in the set. Associative means that the grouping of elements does not affect the result of the operation.
Four group axioms must be satisfied for a set to qualify as a group. These group axioms include closure, associativity, an identity element, and an inverse element.
Abelian groups
An abelian group is formed when the operation on the elements of a set is commutative. The commutative law means that changing the order of the elements does not affect the result of the operation, for example, A X B = B X A.
The key difference is that in an abelian group, closure, associativity, identity element, inverse element, and commutativity abelian group axioms are satisfied, whereas in a group, only the first four axioms are required to be satisfied; that is, closure, associativity, an identity element, and an inverse element.
Rings
If more than one operation can be defined over an abelian group, that group becomes a ring. There are also specific properties that need to be satisfied. A ring must have closure and associative and distributive properties.
Cyclic groups
A cyclic group is a type of group that can be generated by a single element called the group generator.
Order
This is the number of elements in a field. It is also known as the cardinality of the field.
This completes a basic introduction to some mathematical concepts involved in cryptography. In the next section, you will be introduced to cryptography concepts.
- 電子商務(wù)客戶服務(wù)(微課版)
- 移動電商運(yùn)營(慕課版)
- Photoshop+Premiere淘寶天貓視覺營銷·網(wǎng)店美工·商品視頻制作從入門到精通
- 用戶增長方法論:找到產(chǎn)品長盛不衰的增長曲線
- 網(wǎng)絡(luò)營銷實(shí)務(wù)
- 區(qū)塊鏈實(shí)戰(zhàn):從技術(shù)創(chuàng)新到商業(yè)模式
- 零基礎(chǔ)玩轉(zhuǎn)小紅書
- 品牌依戀驅(qū)動下用戶在線評論信息生成機(jī)制
- 互聯(lián)網(wǎng)+:傳統(tǒng)企業(yè)的自我顛覆、組織重構(gòu)、管理進(jìn)化與互聯(lián)網(wǎng)轉(zhuǎn)型
- O2O實(shí)踐:互聯(lián)網(wǎng)+戰(zhàn)略落地的O2O方法
- 運(yùn)營無憂:淘寶天貓運(yùn)營與推廣實(shí)操
- 贏在云端:云計算與未來商機(jī)
- 微信視頻號全流程實(shí)戰(zhàn)
- 網(wǎng)店美工案例教程(全彩微課版)
- 實(shí)戰(zhàn)多平臺短視頻運(yùn)營:抖音、快手、微信視頻號等