1 Answers
📚 Topic Summary
In AP Computer Science A (Java), proper password management is crucial for building secure applications. This involves not storing passwords in plain text, using strong hashing algorithms like SHA-256 or bcrypt to store password hashes, implementing salting to prevent rainbow table attacks, and following secure coding practices to protect against vulnerabilities like SQL injection. By adhering to these guidelines, you can create robust and secure authentication systems. It's all about protecting user data and making your programs resistant to attacks. Remember, security is not just an afterthought; it should be integrated into every stage of development.
🧠 Part A: Vocabulary
Match the term to the correct definition:
| Term | Definition |
|---|---|
| 1. Hashing | A. Random data added to each password before hashing to prevent rainbow table attacks. |
| 2. Salting | B. A one-way function that transforms a password into a fixed-size string of characters. |
| 3. Rainbow Table | C. A type of attack that exploits vulnerabilities in password storage to gain unauthorized access. |
| 4. SQL Injection | D. A precomputed table used to reverse password hashes. |
| 5. Authentication | E. The process of verifying a user's identity. |
Answers: 1-B, 2-A, 3-D, 4-C, 5-E
📝 Part B: Fill in the Blanks
Fill in the blanks with the appropriate word:
When storing passwords, never store them in _______ text. Instead, use a _______ algorithm such as SHA-256 or _______. Adding a _______ to each password before hashing makes your system more secure against _______ table attacks. Always validate user input to prevent _______ _______.
Answers: plain, hashing, bcrypt, salt, rainbow, SQL injection
🤔 Part C: Critical Thinking
Explain why storing passwords in plain text is a major security risk and describe an alternative approach.
Join the discussion
Please log in to post your answer.
Log InEarn 2 Points for answering. If your answer is selected as the best, you'll get +20 Points! 🚀