電腦安全-L22
Secure E-mail
MIME
一種網路郵件格式:對 RFC 822 規範的擴展
RFC 822: Defines a simple heading with To, From, Subject
Assumes ASCII text format
提供新的標頭欄位: 定義郵件內容的資訊
S/MIME
安全/多用途網際網路郵件擴展 (Secure/Multipurpose Internet Mail Extension)
對 MIME 郵件格式的安全增強
Based on technology from RSA Data Security
提供對電子郵件進行簽名和加密的功能
比較
加密流程
S/MIME Functions
Enveloped data
加密的內容以及相關的金鑰 (用收件人的公鑰加密)
預設演算法是 AES 和 RSA
M → AES(M) → AES(M) + RSA(K)
M: 郵件內容 (Message)
K: 隨機生成的對稱密鑰 (pseudorandom secret key)
使用收件人的公鑰進行 RSA 來加密 K
...
電腦安全-L2
Confidentiality with Symmetric Encryption
Symmetric encryption
提供傳輸中或儲存資料的 confidentiality (機密性)
又稱為 Conventional encryption or single-key encryption
安全條件:
強大的加密演算法
在已知部分對應組合 (plaintext–ciphertext pairs) 以及演算法的情況下,仍無法解出明文 (ciphertext) 或是 金鑰 (key)
安全的金鑰分發與管理
Model (Five major components)
Attacking Symmetric Encryption
Cryptanalytic Attacks
利用:
演算法本身的特性
明文的一般特性
一些明文與密文的對應樣本 (plaintext–ciphertext pairs)
推導出特定的明文或加密金鑰
Brute-Force Attacks
利用:
對可能明文的了解
對某些密文嘗試所有可能的金鑰
直到產生可理解的明文
...
電腦安全-L1
Computer Security Concepts
CIA Triad
Confidentiality
Assurance
Data confidentiality: 私人或機密資訊不會洩漏給未經授權的人
Privacy: 個人可以控製或影響與其相關的信息是否被蒐集和儲存
Requirements
對資訊存取與揭露的授權限制
保護個人隱私與專有資訊的方法
Definition of Loss
資訊在未經授權的情況下被揭露
Integrity
Assurance
Data integrity: 資訊與程式只能以指定且經授權的方式被修改
System integrity: 系統能在未受損的狀態下,正常執行其預期功能
Requirements
防止資訊被不當修改或刪除
確保資訊的不可否認性與真實性
不可否認性 (non-repudiation): 送出訊息的人不能事後否認
Definition of Loss
資訊在被經授權的情況下被修改或刪除
Availability
Assurance
系統能夠即時運作,且不會拒絕授權使用者的服務請 ...
資料結構-堆疊&佇列
考研相關文章參考資料為 wjungle 大神提供的筆記
Stack
具有 LIFO 性質之有序串列,插入元素之操作為 push,刪除元素之操作為 push,且兩者發生於同一端,稱為頂端 (top)
Stack Permutation
給予 nnn 個資料依序 push 進入 stack,並且在過程中可以進行任意合法的 pop 將資料輸出,在此模式下所產生的所有輸出之排列組合
ex: a,b,ca,b,ca,b,c 之 Stack Permutation:
abc, acb, bac, bca, cab, cba
共 5 種
nnn 個資料之 Stack Permutation 個數:
1n+1Cn2n\frac{1}{n + 1}C_{n}^{2n}n+11Cn2n
與下列問題之個數相同 (卡塔蘭數):
nnn 個 nodes 可以形成的不同二元樹個數
nnn 組 “(” 及 “)” 之合法配對個數
(n+1)(n + 1)(n+1) 個 matrix 相乘之所有乘法組合個數
Infix, Postfix, Prefix 轉換
計算題型作法
括 ...
資料結構-時間複雜度
考研相關文章參考資料為 wjungle 大神提供的筆記
漸進式符號
Asymptotic Notations
表示時間函數的成長速率 (growth rate) 等級
符號
OOO
f(n)=O(g(n))f(n) = O(g(n))f(n)=O(g(n)) iff exist two positive constants ccc and n0n_0n0 such that f(n)≤c∗g(n)f(n) \leq c*g(n)f(n)≤c∗g(n), for all n≥n0n \geq n_0n≥n0
視為理論的 Upper-Bound
Ω\OmegaΩ
f(n)=Ω(g(n))f(n) = \Omega(g(n))f(n)=Ω(g(n)) iff exist two positive constants ccc and n0n_0n0 such that f(n)≥c∗g(n)f(n) \geq c*g(n)f(n)≥c∗g(n), for all n≥n0n \geq n_0n≥n0
視為理論的 Lower-Bound
Θ\ThetaΘ
f(n ...
資料結構-陣列&鏈結串列
考研相關文章參考資料為 wjungle 大神提供的筆記
Array 元素之位置
一維陣列
A:array[l...u]A: array[l...u]A:array[l...u] of items
共有 u−l+1u - l + 1u−l+1 格
起始位置: l0l_0l0
元素大小: ddd
A[i]A[i]A[i] 的位置: l0+(i−l)∗dl_0 + (i - l) * dl0+(i−l)∗d
二維陣列
A:array[l1...u1,l2...u2]A: array[l_1...u_1, l_2...u_2]A:array[l1...u1,l2...u2] of items
有 u1−l1+1u_1 - l_1 + 1u1−l1+1 列,u2−l2+1u_2 - l_2 + 1u2−l2+1 行
Row-major
A[i,j]=l0+[(i−l1)∗(u2−l2+1)+(j−l2)]∗dA[i, j] = l_0 + [(i - l_1) * (u_2 - l_2 + 1) + (j - l_2)] * dA[i,j]=l0+[( ...
資料結構-圖
考研相關文章參考資料為 wjungle 大神提供的筆記
Graph
令 G=<V,E>G = <V, E>G=<V,E> 代表圖形是由兩個非空集合組成:
VVV: 代表頂點 (Vertex)
EEE: 代表邊 (Edge)
根據邊的類型,可分為兩類:
Undirected Graph (無向圖)
邊不具有方向性
(i,j)=(j,i)(i,j) = (j,i)(i,j)=(j,i) 代表同一邊
Directed Graph (有向圖)
邊具有方向性
(i,j)≠(j,i)(i,j) \neq (j,i)(i,j)=(j,i)
相關術語
Eulerian cycle (尤拉 cycle)
從某點出發,經過每個邊各一次,又回到原點
充分必要條件: 每個頂點之 degree 為偶數
Eulerian chain
從某點出發,經過每個邊各一次,不一定要回到原點
充分必要條件: 有兩個頂點之 degree 為奇數,剩餘頂點之 degree 為偶數
Hamiltonian Path (漢米爾頓路徑)
從某點出發, ...
資料結構-雜湊
考研相關文章參考資料為 wjungle 大神提供的筆記
Hashing
一種資料儲存與搜尋的機制,當想要存入或取出資料時,先經過 Hashing Function 求出 Hashing Address,接著到 Hash Table 中對應的 Bucket 存入或取出資料 xxx
Hash Table 由 BBB 個 Bucket 組成
每個 Bucket 則由 SSS 個 Slots 組成
每個 Slot 可儲存一筆資料
優點:
資料搜尋前不用經過排序
在沒有 Collision 的情況下,資料搜尋時間為 O(n)O(n)O(n)
Worst case: O(n)O(n)O(n): Hashing Function 為定值
保密性、安全性高
不知道 Hashing Function 則無法存取資料
不可回推
常用於密碼學、資料壓縮
相關術語
Collision 碰撞
不同資料經過 Hashing Function 後得到相同 Hashing Address
Overflow 溢位
Collision 發生後對應的 Bucket 沒有多餘空間 ...
正規語言-L7
正規語言相關文章參考資料為陳穎平教授上課講義
L7 Time Complexity
Measuring Complexity
Definition
Let MMM be a deterministic Turing machine that halts on all inputs. The running time or time complexity of MMM is the function f:N→Nf : N → Nf:N→N , where f(n)f (n)f(n) is the maximum number of steps that MMM uses on any input of length nnn. If f(n)f (n)f(n) is the running time of MMM , we say that MMM runs in time f(n)f (n)f(n) and that MMM is an f(n)f (n)f(n) time Turing machine. Customarily we use nnn to represent the ...
正規語言-L5
正規語言相關文章參考資料為陳穎平教授上課講義
L5 Reducibility
If problem A reduces to problem B, we can use a solution to B to solve A.
When A is reducible to B, solving A cannot be harder than solving B because a solution to B gives a solution to A. Therefore, if A is reducible to B,
B is decidable ⇒ A is decidable;
A is undecidable ⇒ B is undecidable.
Undecidable Problems from Language Theory
定義 HALTTM={⟨M,w⟩ ∣ M is a TM and M halts on input w}HALT_{TM} = \{ ⟨M, w⟩~|~M~is~a~TM~and~M~halts~on~input~w \}HALTTM={⟨ ...









