Data security is vital to the world we live in, and the foundation that secure communication is built upon is cryptography. Cryptography is a course that is regularly offered at colleges and universities. In our experience, computer science students find that understanding the sophisticated mathematics behind the crypto-systems is a daunting task, while math majors often get lost in the details of the complicated algorithms. Educators need to find a way to help students understand both what the algorithm does and why the algorithm does it. Visualization tools can be an effective way for educators to battle this challenge. This paper describes a tool, SHAvisual, which addresses this issue for the secure hash algorithm (SHA). SHA is a family of cryptographic hash functions that the National Institute of Standards and Technology began publishing in the early 1960's. SHAvisual is designed to help students learn and instructors teach the SHA-512 algorithm. It consists of three major components: Demo Mode, Practice Mode and Full Mode. A separate global view window helps highlight the current procedure in the algorithm pipeline. The Demo Mode provides a simplified SHA-512 visualization and is useful for the instructor to demonstrate important operations in the classroom. The Practice Mode is designed for students to learn the detailed computations step by step and perform selfstudy. A test report system also helps the instructor verify the learning effectiveness. The Full Mode is a full version of the SHA-512 cipher.SHAvisual was classroom tested in a Computer Security course. Major findings of this survey include the following: (1) students indicated SHAvisual helped them understand SHA better; (2) both the Demo Mode and Practice Mode had positive impact on student learning; and (3) a MANOVA analysis suggested that the student reactions were generally independent of the time spent on using the software. Write-in comments also verified that SHAvisual did help students learn and the instructor teach the SHA algorithm effectively.