feat: update readme, add encrypt/decrypt by smart card(yubikey)

This commit is contained in:
2023-09-26 00:51:01 +08:00
parent 84453c2142
commit 1465e80091

View File

@@ -42,3 +42,26 @@ Encrypt config `~/.tinyencrypt/config-rs.json`:
}
}
```
Smart Card(Yubikey) protected ECDH Encryption description:
```text
┌───────────────────┐ ┌───────────────────────────┐
│Tiny Encrypt │ │Smart Card (Yubikey) │
│ │ Get Public Key(P) │ │
│ │ ◄───────────────────┤ Private Key d │
│ │ │ P = kG │
│ │ Temp Private Key k │ │
└───────────────────┘ G = kG └───────────────────────────┘
Shared Secret = kP = kdG
Store Q, Encrypt using derived key from Shared Secret
Send Q to Smart Card
─────────────────►
Shared Secret = kQ = kdG
Decrypt using derived key from restored Shared Secret
```