A symmetric cipher needs one secret that both sides hold. An asymmetric key comes as a pair, and only one half is shared. This set covers making each with openssl, and why real systems use both together rather than picking one.
Each one is marked as you go, and the explanation arrives straight after, which is
the part worth reading.
4 questions, marked as you go.
Tasks
These need your own device. Run the command in Termux, then paste what it printed.
The marking looks at what the output means, so spacing, version numbers and
ordering do not matter. If you have not installed anything yet, the
lesson covers the setup.
Make a symmetric key and an asymmetric pair
This prints a symmetric key, then makes an asymmetric key pair and prints the public half. Compare the two: the first is one value that both sides would share, and the second is the half of a pair that is safe to give away.
Run this in Termux
On your own device. Nothing on this page executes it. The command runs in
your terminal, and this box only reads what you paste back.
The symmetric key is one line of base64 ending in a single equals sign. The public key is the block between the BEGIN and END lines, and the private key stayed in the file.
a 32-byte symmetric key in base64
the private key was written to a file
the public half is printed, ready to share
the commands actually ran
What a good answer looks like
Three parts. First a single line of base64 text ending in one equals sign: 32 random bytes, the symmetric key, which both sides would have to hold. Then the words private key written, confirming the private key went into demo-key.pem and was not printed. Then a block that begins with -----BEGIN PUBLIC KEY----- and ends with -----END PUBLIC KEY-----, the half you can share. Notice that no command printed the private key itself.
Marking your own work
Both halves of this are checked in your browser, with no server involved, so nothing
stops you from pasting output you did not run. The tasks are written so that the
easiest way to pass one is to actually do it and read the result, which is the whole
intention.