Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save BekaValentine/80f85f4e89878b8191cfc0c6ea62d333 to your computer and use it in GitHub Desktop.

Select an option

Save BekaValentine/80f85f4e89878b8191cfc0c6ea62d333 to your computer and use it in GitHub Desktop.
Alice wishes to get some information from Bob.
Both Alice and Bob each have a key pair:
```
pk_alice (Alice's public key), sk_alice (Alice's secret key)
pk_bob (Bob's public key), sk_bob (Bob's secret key)
```
To get the information, Alice sends Bob a message consisting of:
- The identifier of the information to retrieve
- A symmetric key `symk` which is encrypted with `pk_bob` and signed by `sk_alice`
Bob verifies that `symk` was signed by Alice using `pk_alice`.
Bob then replies with the requested data, encrypted with `symk`, and signed by `sk_bob`.
Alice verifies that the returned data was signed by Bob using `pk_bob`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment