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 the differences between a password and an encryption key
- What is a key derivation function?
- Overview of key derivation functions supported by OpenSSL
- Deriving a key from a password on the command line
- Deriving a key from...