Patent ID: 8275126

Claim:
An apparatus for hash cryptography, comprising: a message scheduler generating a plurality of first message data using a calculation data when a first hash calculation is performed and generating a plurality of second message data using the calculation data when a second hash calculation is performed, wherein the message scheduler includes: a memory receiving and storing N first message data when the first hash calculation is performed and receiving and storing N second message data when the second hash calculation is performed; a register storing and outputting the data inputted when the first hash calculation is performed and storing and outputting the data inputted when the second hash calculation is performed; a first logic calculator generating additional first message data by performing first logic calculation on the basis of the first message data and the data stored in the register; and a second logic calculator generating additional second message data by performing second logic calculation on the basis of the second message data and the data stored in the register, wherein the controller stores the first message data additionally generated by the first logic calculator in the memory and repeats the first logic calculation until M additional first message data are generated when the first hash calculation is performed, wherein the controller stores the second message data additionally generated by the second logic calculator in the memory and repeats the second logic calculation until L additional second message data are generated when the second hash calculation is performed, and wherein N, M, N, and L are positive integers; a message compressor calculating a first message digest by performing the first hash calculation by using the plurality of second message data when a first hash calculation is performed, and calculating a second message digest by performing the second hash calculation by using the plurality of second message data when the second hash calculation is performed; and a controller determining hash calculation to be performed with respect to the calculation data of the first and second hash calculations from a control command received from the outside, and determining the number of times to perform the hash calculation depending on the length of the calculation data to control the message scheduler and the message compressor depending on the determined hash calculation and the determined number of times.