Final answer:
Key stretching is used to strengthen weak keys against brute force attacks by making the key generation process more time-consuming and resource-intensive.
Step-by-step explanation:
The purpose of key stretching is to strengthen weak keys against brute force attacks. Key stretching is a technique used in cryptography to make the process of generating keys more time-consuming and resource-intensive, thus increasing the complexity of a brute force attack. By using key stretching, the derived keys are longer and more unique, making them more resistant to cracking.