There are several types of
cryptographic algorithms.
The first is secret key cryptography.
Here, the same key is used for
encryption and decryption.
In other words, the sender and
the receiver of the confidential
message, must use the same key.
Another type of algorithm
is public key cryptography.
Here, there are two key
components that are paired or
linked together mathematically.
The public component is used for
encryption.
And a private component is used for
decryption.
For example, Alice can use Bob's
public key to encrypt a message,
that only Bob can decrypt.
Because only Bob has
the corresponding private key that
will decrypt the message properly.
The private key component is
also used for signing a message.
And then, the public key component
can be used to verify the signature.
For example, Alice can send
a message using her private key, and
anyone knowing her public
key can verify that.
Only Alice can produce
this proper signature.
