-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlearn_2.html
More file actions
193 lines (157 loc) · 9.21 KB
/
learn_2.html
File metadata and controls
193 lines (157 loc) · 9.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="learn.js" async></script>
<link rel="stylesheet" href="indexStyle.css">
<link rel="Shortcut Icon" type="image/x-icon" href="img/home.ico" />
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Rock+Salt&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Bodoni+Moda:wght@500&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Mr+De+Haviland&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Rosario:wght@600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Alice&display=swap" rel="stylesheet">
<title>InfoSec Learning</title>
<style>
footer{
display: block;
clear:both;
bottom: 0;
padding:5px;
text-align:center;
font-family: 'Noto Serif TC', serif;
}
p{
font-family: 'Noto Serif TC', serif;
font-size: 130%;
}
body{
margin-right:2em;
margin-left:2em;
}
</style>
</head>
<body style="background-color: #BCB8B1;" >
<br><br>
<header>
<div class="navbar">
<a href="index.html"><img src="img/logo.png" class="logo"></a>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="learn.html">Learning</a></li>
<li><a href="game.html">InfoSec Game</a></li>
<li><a href="html/about.html">About</a></li>
</ul>
</nav>
</div>
</header>
<h1 class="title">Information Security Knowledge</h1>
<div id="top" class="navbar">
<nav>
<ul style="text-align: right;">
<li class="title-a" style="width: 10%; text-align: center;">Navbar</li><br><br><br>
<li><a href="learn.html#P1">Plain text and Cipher text</a></li><br><br>
<li><a href="learn_2.html#P2">Cryptography</a></li><br><br>
<li><a href="learn_3.html#P3">This is password.</a></li><br><br>
<li><a href="learn_4.html#P4">Buffer Overflow</a></li><br><br>
<li><a href="learn_5.html#P5">Cross-Site Scripting</a></li><br><br>
<li><a href="learn_6.html#P6">Forensics</a></li><br><br>
</ul>
</nav>
</div>
<h1 id="P2" class="title-f">Cryptography</h1>
 <a href="#top"><img src="img/caret-quare-up.png" alt=""></a>
<div class="container">
<div class="box" style="width: 55%;">
<h1 class="title-a">ROT13</h1><br>
<p style="text-align: left;">
<br>
  ROT13 是一種位移值為13的簡單型替換式密碼演算法。由於其加密方式十分簡單易懂,適合密碼學初學者學習概念使用;
並不常使用於實務,而目前常使用的算法為<a class="word" href="#RSA">RSA</a>
及基於ECC<a target="_blank" href="https://ithelp.ithome.com.tw/articles/10251031"><sub>[1]</sub></a>
的ECDSA<a target="_blank" href="https://medium.com/cryptocow/%E6%A9%A2%E5%9C%93%E6%9B%B2%E7%B7%9A%E5%8A%A0%E5%AF%86%E6%BC%94%E7%AE%97%E6%B3%95-ecdsa-%E8%88%87-rfc6979-%E6%94%B9%E9%80%B2%E6%8F%90%E6%A1%88-dabeea17a8e3"><sub>[2]</sub></a>常用於數位簽章,其都含有數學難題的性質來保全其安全性。<br><br>
  此外,ROT13只對字母進行變換,其他字元不受加密。因此,衍伸出變形<a class="word" href="https://www.dcode.fr/rot-47-cipher" target="_blank">ROT47</a>,使用ASCII code 來進行變化。<br><br>
  ROT13(rotate by 13 places) is a algorithm of substitution cipher. The shift value is 13.<br>
</p>
</div>
</div>
<div class="container">
<div class="box">
<p style="align-content: center; margin-bottom: 3%;margin-top: 3%;">
<div class="box">
<p>
<img src="img/function.png" alt="" style="margin-top: 2%;"><br>
<p style="background-color: #999999;width: 50%;margin-left: 25%;">
<span style="color: white;margin-top: 3%; font-size: 150%;font-weight: 700;">Simulation</span><br>
<span style="color: white;">Enter your string:</span>
<input type="text" id="rot13_input"><br>
<span style="color: white;">Result: :</span>
<input type="text" style="color: red;" id="rot13_output" disabled="disabled"><br><br>
<button style="margin-left: 36%;font-size: 120%;" class="button" onclick="rot13();">submit</button>
</p>
</p>
</div>
<img class="img-rot13" src="img/rot13.png" alt="" width="40%">
</p>
</div>
</div>
<div class="container">
<div class="box" style="width: max-content;">
<h1 class="title-a" id="RSA">RSA</h1>
<p style="width: 70%; align-content: center; margin-bottom: 3%;margin-top: 3%;">
Ref: <a target="_blank" href="https://ithelp.ithome.com.tw/articles/10250721">[3]</a>
<ol style="text-align: left;list-style: upper-roman;font-size: 120%;">
<li><p id="rsa1">選出兩個較大的質數 p 和 q</p></li><br>
<li><p id="rsa2">計算兩個質數的乘積 n = p × q</p></li><br>
<li><p id="rsa3">計算出小於 n 且與 n 互質的整數個數  φ (n)= (p - 1)(q - 1)</p></li><br>
<li>
<p id="rsa4">選出一個整數 e(拿來當做公鑰)</p>
<img src="img/r1.png" alt="">
</li><br>
<li><p id="rsa5">計算 d (私鑰)</p>
<img src="img/r2.png" alt="">
</li><br>
<li><p>可得</p><img src="img/r3.png" alt=""></li><br>
</ol>
</p>
</div>
</div>
<div class="container">
<div class="box" style="width: 100%;">
<p>
<p style="background-color: #999999;width: 50%;margin-left: 25%;">
<span style="color: white;margin-top: 3%; font-size: 150%;font-weight: 700;">Simulation</span><br>
<span style="color: white;">Enter your a>0 <i>prime</i> number P:</span>
<input type="number" placeholder="prime" style="width: 20%;" id="rsaNum_p"><br>
<span style="color: white;">Enter your a>0 <i>prime</i> number Q:</span>
<input type="number" placeholder="prime" style="width: 20%;" id="rsaNum_q"><br>
⇩ 如下開始模擬RSA金鑰的產生過程 ⇩<br><br>
<span id="rsa_process"></span>
<span style="color: white;">Plain Text:</span>
<input type="number" style="color: red;" id="rsa_input" ><br><br>
<span style="color: white;">Cipher Text:</span>
<input type="text" style="color: red;" id="rsa_output" disabled="disabled"><br><br>
<button style="margin-left: 36%;font-size: 120%;" class="button" onclick="rsa();">submit</button>
</p>
</p>
</div>
</div>
<p style="text-align: right">
返回top <a href="#top"><img src="img/caret-quare-up.png" alt=""></a>
</p>
<br><br><br>
<footer>
<p><small>
<font size="5" face="serif">Takeda <br><a rel="license" href="http://creativecommons.org/licenses/by-nc/3.0/tw/"><img alt="創用 CC 授權條款" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/3.0/tw/88x31.png" /><a href=""></a><br>2021</font>
</small></p>
<font size="10">
<span style="font-family: 'Mr De Haviland', cursive;">Takeda NaNa</span>
</font>
</footer>
</body>
</html>