authentication
Both sides share a secret (say, a password)
Sender:
- appends the secret to its message
- calculates an SHA-1 hash
- replaces the secret with the SHA-1
Receiver:
- Saves the SHA-1
- Replaces the SHA-1 with the secret
- Calculates the SHA-1 (should match)
Sequence numbers to prevent replay attacks
Note: this is authentication, not encryption