The invention provides a high-
throughput SHA-1 (
Secure Hash Algorithm) based on an FPGA. The method comprises the steps of S1, judging whether length of input message data exceeds 512 bits or not; S2, carrying out bit compensation on the message data until the length is integer multiples of the 512 bits if the length of input message data exceeds 512 bits; S3, segmenting the message data after bit compensation into multiple data blocks, wherein each data block is 512 bits, and segmenting each data block into 16 characters, wherein each character is 32 bits; S4, carrying out
loop unrolling on an original iteration operation formula, thereby forming a
loop unrolling structure; S5, determining pipeline series, and forming a pipeline structure by an intermediate register and the
loop unrolling structure; and S6, inputting each character into the pipeline structure, thereby obtaining a SHA-1 calculation result. According to the
algorithm, the iteration operation is simplified, an
intermediate variable is added, therefore, a key path is shortened, and a calculation speed is improved. Moreover, through adoption of a pipeline
processing mode, the
data processing quantity is increased, and the
throughput is improved.