加密 / 解密原理
原始既加密,可以由一條公式去描述:
C = E(K, M)
當中
M 係 message,信息
K 係 key, 密鑰
E 係 encryption function, 加密函數
C 係 cipher text, 經加密後產生既一串字符
成句即係話,一條 key 同 信息內容經 E 處理後會得出 cipher text
之前係連登見到字不明字符就係 cipher text
而以下公式就描述緊一個解密過程:
M = D(K, C)
當中 D 係 decryption function, 解密函數
即係話將 cipher text 用 key 經過 D 既處理會還完信息內容
如果你有條 key, 你可以 copy 個堆不明字符然後解密

呢度既函數係指加密/解密法,分為兩大類:
private-key cryptography, 使用一條 key 加密同解密。例子:Vigenère Cipher
public-key cryptography, 使用 public key 加密,private key 解密。例子:RSA Algorithm
示範
我整左一個開源既加密同解密程式 vCipher。vCipher 所用既加密法改良自Vigenère Cipher,密鑰長度 255 ,字符範圍係 ASCII 32 至 126,現時僅支援英文。
程式代碼:https://github.com/clmaples/vcipher
應用程式:https://clmaples.github.io/vcipher
發佈者
首先,作為發佈者,你要 generate 一條 key:
按 New, 然後命名:


完成後會顯示在主畫面:

Copy 條 key, 然後用一個安全方法傳送畀你既接收者(注意,條 key 一定不可公開)

按 Encrypt,然後將你既 message 加密,完成後按 "Copy cipher"。
呢條 cipher text 就係你會係連登上面 post 出黎畀你既受眾

接收者
作為接收者,收到條 key 後,請 import 入去 vCipher 度:
你可以隨意命名,方便自己識別

要解密時,請搵出對應既 key, 然後打開。按 Decrypt, 貼上 cipher text,完成後按 OK,即可見到解密後既內容:

