Skip to content

Commit

Permalink
crypto (1/?)
Browse files Browse the repository at this point in the history
  • Loading branch information
haunt98 committed Sep 10, 2023
1 parent 443419a commit d742a04
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions posts/2023-08-23-real-world-crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit d742a04

Please sign in to comment.