Creating an Encrypted Message
The following illustration depicts the individual tasks that must be accomplished to encrypt a message, as shown in the list that follows it.
To encrypt a message
-
Get a pointer to the plaintext message.
-
Generate a symmetric (session) key.
-
Using the symmetric key and specified encryption algorithm, encrypt the message data.
-
Open a certificate store.
-
Get the recipient's certificate.
-
Get the public key from the recipient's certificate .
-
Using the recipient's public key, encrypt the symmetric key.
-
Get the recipient's ID from the recipient's certificate .
-
Include the following in the digitally enveloped message: the data encryption algorithm, the encrypted data, the encrypted symmetric key, and the recipient ID.