crypto (1/?)

main
sudo pacman -Syu 2023-09-10 23:39:41 +07:00
parent 443419a9a9
commit d742a049a2
1 changed files with 13 additions and 0 deletions

View File

@ -16,3 +16,16 @@ authentication tag. **HMAC** is MAC using hash.
- A send B message with MAC (generate from message and A key).
- B double check message with MAC (generate from receive message and B key).
- A and B use same key.
```mermald
sequenceDiagram
participant alice
participant bob
alice ->> bob: send username, password
bob -->> alice: return alice|mac(private_key, alice)
alice ->> bob: send alice|mac(private_key, alice)
bob -->> alice: return OK
alice ->> bob: send bob|mac(private_key, alice)
bob -->> alice: return ERROR
```