Building Block: Symmetric Encryption
%%{init: {"flowchart": {"rankSpacing": 70}}}%%
flowchart LR
m([m]) --> E["E"]
k1([k]) --> E
E -->|"E(k,m) = c"| Net((Network))
Net -->|c| gap((" ")):::hidden
gap --> D["D"]
k2([k]) --> D
D -->|"D(k,c) = m"| out([m])
subgraph Alice
E
k1
end
subgraph Bob
D
k2
end
classDef hidden fill:none,stroke:none;
E,D: cipherk: secret key (e.g. 128 bits (2¹²⁸ ≈ 3.4 × 10³⁸ possible keys) )m,c: plaintext, ciphertext
Encryption algorithm is publicly known
- Never use a proprietary cipher