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e3
`/'T'dU/,''
33/,,2/%/„ 33/,,2/%/„
33/,#/K 33/,#/K
zJ
‚X3,2/3'
‚X3,2/3/5
zJ
‚ih,2/'3
‚O(h,2//5
hD`/c!8/D.!"#$
!/D.!"#$&!"#$
*.
/
0123
/
&'4*56789
Hệ mã dịch chuyển:
)D8./GX%%O%4%)H%/!d
X__O_…
6L
G/2&6LM>†…H
: ; < = > ? @ A B C D E F
G H I J K L M N O G H I J K L M N GO G GG GH GI GJ GK O
• \2&
#
∈
X‡_G#‚'H)6L
∈
• e3
∈
‡#_G'H)6L
∈
X
Hệ mã Vigenera
+44./GX%%O%4%)H/!d
• [.'d
'_G'
%'
6
%'
;
%%'
H
• \2&
G#
%#
6
%#
;
%%#
H‡G
%
6
%
;
%%
H/!d
_G#
‚'
H)6L
• e3
G
%
6
%
;
%%
H‡G#
%#
6
%#
;
%%#
H/!d
10
#
_G
'
H)6L
Hệ mã thay thế (hoán vị toàn cục)
//`./GX%%O%4%)H/!d
• [.'
d6L:G%6%%6LH_ˆ
• \2&
#‡ˆG#H_
• e3
‡ˆ
GH_#
Hệ mã hoán vị cục bộ
-../GX%%O%4%)H%/!d
• [.'
d:G%6%%H_ˆ
• \2&
G#
%#
6
%#
;
%%#
H‡ˆG#
%#
6
%#
;
%%#
H_G
%
6
%
;
%%
H
• e3
G
%
6
%
;
%%
H‡ˆG
%
6
%
;
%%
H_G#
%#
6
%#
;
%%#
H
‰ g q B [ > [ g ˆG%6%;H‡G6%%;H
6 ;
g ‰ q B [ [ > g ˆ
G6%%;H‡G%6%;H
Hệ mã Affine
>bb4./GX%%O%4%)H%/!d
• [.'
'_G%H/!d
∈
Š
6L
GD5/"|D^6LH
• \2&
#
∈
X‡_GŠ#‚H)6L
∈
11
• e3
∈
‡#_GHŠ
)6L
∈
X
Hệ mã dòng (Stream Cipher)
)*./.GX%%O%\%l%4%)H%/!d
\/2&MD')*
l_‹!
"
#!
$
#%%%#!
Œ.1')*
!
&
O\
&'"
X
&'"
‡\
• \2&
_()$ _()$*`DX__…
6L
H
• e3
')$ G#_•)6L`DX__…
6L
H
.
/
0123
/
&'4*5.,P*8
Hệ mã khoá RSA:
• =?!@
o Ž&%•1"D5/"W/^
o ,_&Š•%•GH_G&HŠG•H
o Ž1"D5/"|D^•GH!/@/&h/N!3
G('H
o Ž!3:+,+"-G!3/4)D
-HG,2/H
+'2&
'3
• \2&
Ž X__…
^.,/%…
_‹S%%6%%Œ
∈
…
‡
+
∈
…
• e3
∈
…
‡
∈
…
e31N[hN>.//(!&/5'5/D(.>
[D"M,2//D%5/"W/1N)-'<=>
12
=D!Y9^/K!8>[/!c/(!&
Bước A B
\W61"D5/"^.#/
6 ,.,/0-.'",/'"
; Ž1"‘D5+ D5/"|
D^-V\qG+#-"
A ,/+
'"
-
C eNG+#H[
L q2G+#H/’>
P 1
+
Q q2/’[
R e31
!"
Ví dụ 123
4
<“=” ‰ g q B > g [ g
<“=” 6; Q ; 6 A P S Q Q
•=” 6 ; Q P R 6 C ; L ;
•u q = < m l q e q
Ví dụ 2&5
Ž_L''/’gXB<G/$'_G6%Q%C%P%A%PH
<“u 4/–/D–)–/
<“=” PA;–RAQ–RP6S–S6A–;Q6PAQ–PARS6A
•=” 6QCPAA6QCPAP6QCPAP6QCPA
G6$*+67H
•u —1•&—4b•1•—˜
13
G !"#$%&'()P()5.,P*8
#$#%#$"&'()*
)
*+,-*Q
d('.GX%%O%4%)H/!d
X\/2&MD3•GXDH
2&MD3G)4H
O\/2&MD'dGO4H
B\2&G4)4H#∈X_†_4
'
G#H∈
F\3G)4)4H∈_†#_)
'
GH∈X
!d'd2&O/D2//('2/"!9{Ž
('GXD'4&/11/4H
zJ/i#™/d('/5D8D2/<=>
)57R5789&7R50S,5T*%&'4*5.,P*8Q
7!8?3:d('#Y)KM/"1
`/'d2&O/D2//2&4
'
‘W/'d/!9{3%
/9}'d)&3'š&-./!.&$/&/,/W/^
"^•('!.32/`D_&Š•^O
!d/&3#Y)K9?//Ž/51"W/^&3
/,/!`€5/"!.d2
,32/:d(':`D)KM,2/'d
3O›_†+2'!"&9?`/!9{'dO›//'(i&3
/!c'dO›*&3/!c32&
!")*)
d<=>
5)0 89UQ
q./1"D5/"W/^q0/,:1"D5/"^'D
&%•Gq_&Š•HφGH_G&HŠG•H
14
\W.///D./7)9φGHD5/"|D^φGH$
V\qG%φGHH_
,/_
)φGH/$Š_)φGH/!d
\'d,2/G&/4H
\'d('G&DH
2&3#F|('!8d/4(/$
_#
)
3F|5G,2/H!83/4(/$#_
)
VAW7XQ
Các Bước A B
\W S6 / & • 1"
D5/"^
6 ,_&•
;
φGH_G&HŠG•H
A Ž1"‘D51
V\qG%φGHH_
C
,/_
)φGH
L eNG%H[ q2G%H
P d#_#
)
Q q2/’[ eN>
R e3#_
)
+, /012"3)
*)
Ž1"D5/"&_S•_S;
,/_&Š•_SŠS;_A;
,/φGH_G&HŠG•H_SSŠS6_6SS_6
L
ŠC
6
ŠP
="&3Ž1'(`/6%C%PŽ_;C;;
Od('G%H_GA;%6SSH
,/'d,2/Š;C;;_)6SS_†_LCPR
X™&2&4
'
G#H_#
;C;;
)A;
X™&3)
'
GH_
LCPR
)A;
15
Ž#_RP6L/d_CPL
H !"#$%&'()@A
45#6
e31N[hN>.//D#/5'5/D/((.>[
D"M,2//D/5!9}/D1N)-&9?&&d<=>
Bước A B
\W6/pqD5/"^
6
,n_&•œφ(n)_G&HG•H
; Ž 1" ‘D 5 b 1
V\qG%φGHH_
A
,/a_
)φGH
C eNG%H[ q2G%H
L d#y_#
)
P q2/’[ eN>
Q e3x_
)
#$#%#$"&'(748
<=>d/5W/’M!hD:9}&/<R41/%>S
\A)4
Yd('%*Žd)*e/'d('
'd,2/!9{/,/)K/51"D5/"^/4&9?&&/,
/)D
./:<=>&-/D.',/9^:&•1/!:^
!8&Y/,//’1"D}/"0/'d,2/'d/K
^/,!9?!
Od:<=>d./&hG'^dBd&hH
[3d/,!?/%/$/’./3•i1!9{./3d
"!.d2
+, /012
DE\W&_Pœ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%D5/"|
HGΦ
∈
%!3:/4
HGΦ
/('%*&%•%2/
Kí:
+^O_G%&%•%%H/!
@& )HG ==
Kiểm tra chữ kí:
HG)H%G
+
5
5 ≡⇔=
( )
∈%
23
AW7X5_Pc:Y&*,*Y
Chuẩn bị:
&1"D5/"1/}/5…&'dG1"D5
/"^
CS
S
H
Ž
Š
.∈
α
&h/ND5/D¡
Š
%
Š
−
×==
.
.
A .B
Ž
Š
.
∈
'',G,2/H
!
&HŒG)
H%%‹G&%
αββα
≡=
βα
%%.
('
Ž‘D5
−
∈
.
5
%'',6G2/H
Kí:
H%GH%G
δγ
=5
@&
^
.
5
)
αδ
=
%
H)G
HG −
−
−= .5
γδ
Kiểm tra kí:
^
.
∈
γ
%
−
∈
.
δ
/d
HG)H%%G .
55
α
δ
γ
γ
βδγ
≡⇔=
589&P)5 8%0,8_*:Y,*&*Y#!@A
Elgamal RSA
M ', '( /W/ ! ) Ž
‘D5
W/!
,32/)//
/}
F&Y/,//’1"
&%•
d6'2/ d'2/
M',@6/&h /&h
C@ ;C%"&B)@
+,)-<=>
24
Ž‘D561"D5/"&_P%•_P
/,_&•_P#P_R
/,φGH_G&HG•H_RL
Ž_C1V=\qG%φGHH_
/,_
)φGH_PP
^'2/_PP
'('_R
L !"#$AW7X5_P`12@A
45#6B)@
Chuẩn bị
_&•%&•1"D5/"X_>_…
!
O_‹G%&%•%%H_&•%&%•D5/"%
HHGG)G + Φ≡
Œ
HHGGHG −−=Φ /.
+ ∈
%D5/"|
HGΦ
∈
%!3:/4
HGΦ
/('%*&%•%2/
Kí:
+^O_G%&%•%%H/!
@& )HG ==
Kiểm tra chữ kí:
HG)H%G
+
5
5 ≡⇔=
( )
∈%
25