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