Cryptography is a fundamental part of modern software. It's nice to learn and understand the underlying principles and their applications.
1. JOSE: JSON Object Signing and Encryption
1.1. Keys
Here you can generate a public and private key pairing. Obviously this is a demo, so the keys are deliberately exposed to you. Private keys should never be shared in actual usage.
In short, the generated public key is derived from the private key. Let's generate 2 key pairings simulating 2 servers with a bidirectional communication channel.
The key pairings generated will be used in the proceeding steps.