5

Derivation of an Encryption Key from a Password

In this chapter, we will learn about deriving symmetric encryption keys from passwords or passphrases. As we have learned in Chapter 2, Symmetric Encryption and Decryption, symmetric encryption algorithms do not encrypt with a password, but with an encryption key. Hence, in order to use a password for encryption, an encryption key must be derived from the password and then used for encryption.

This chapter features an overview of the key derivation functions supported by OpenSSL. In the practical part of the chapter, we will learn how to derive an encryption key from a password, using both the command line and C code.

We are going to cover the following topics in this chapter:

  • Understanding ...

Get Demystifying Cryptography with OpenSSL 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.