WO2023005083A1 - 一种安全散列算法的实现方法、系统、介质及设备 - Google Patents

一种安全散列算法的实现方法、系统、介质及设备 Download PDF

Info

Publication number
WO2023005083A1
WO2023005083A1 PCT/CN2021/134195 CN2021134195W WO2023005083A1 WO 2023005083 A1 WO2023005083 A1 WO 2023005083A1 CN 2021134195 W CN2021134195 W CN 2021134195W WO 2023005083 A1 WO2023005083 A1 WO 2023005083A1
Authority
WO
WIPO (PCT)
Prior art keywords
iteration
nth
permutation function
round
output data
Prior art date
Application number
PCT/CN2021/134195
Other languages
English (en)
French (fr)
Inventor
孙旭
周玉龙
杨琳琳
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2023005083A1 publication Critical patent/WO2023005083A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/12Details relating to cryptographic hardware or logic circuitry
    • H04L2209/122Hardware reduction or efficient architectures

Definitions

  • the present application relates to the field of algorithm technology, and in particular to a method, system, medium and equipment for implementing a secure hash algorithm.
  • the Secure Hash Algorithm is a family of cryptographic hash functions. It is a secure hash algorithm certified by FIPS. It can calculate a fixed-length string (also known as a message digest) corresponding to a digital message.
  • the five algorithms of the SHA family are SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512, and the latter four are sometimes referred to as SHA-2.
  • the length of the message digest value of the SHA-256 algorithm is 256 bits.
  • the SHA-256 algorithm supports plaintext input whose length is limited to 264 bits, the message packet length is 512 bits, and the message word length in the iterative compression process is 32 bits.
  • the SHA-256 algorithm often uses the method of arranging multi-stage pipelines in part of the calculations in the hardware implementation scheme, so that the calculation delays from the input to the output of each operation level are basically equal, and this method takes a lot of time. And it consumes a lot of resources.
  • the purpose of this application is to propose a method, system, medium and equipment for implementing a secure hash algorithm to solve the problem of time-consuming and resource-consuming hardware implementation of a secure hash algorithm in the prior art .
  • the present application provides an implementation method of a secure hash algorithm, including dividing the input data into several data blocks according to the first preset unit length, and dividing the data block into m according to the second preset unit length message words, perform the following steps for each data block:
  • the nth message word is input into the entry of the iterative algorithm hardware structure as the message word of the nth round of iteration, and the first permutation function and the first permutation function of the nth round of iteration are obtained based on the nth message word Two permutation functions;
  • the first permutation function and the second permutation function of the nth round of iteration are obtained based on several message words in the first m message words, and based on several message words and the first permutation function and the first permutation function of the nth round of iteration
  • the second permutation function obtains the message word of the nth round of iteration, and inputs the message word of the nth round of iteration into the entry of the iterative algorithm hardware structure;
  • the message word of the last round of iteration and its output data are added and spliced to obtain the output result of the secure hash algorithm.
  • the nth message word is input into the entry of the iterative algorithm hardware structure as the message word of the nth round iteration, and the first permutation function and the second iteration function of the nth round are obtained based on the nth message word Replacement functions include:
  • the first permutation function and the second permutation function of the nth iteration are obtained respectively.
  • the method also includes:
  • the first intermediate variable and the second intermediate variable of the nth iteration are obtained based on the output data of the n-1 iteration.
  • the output data of the nth round of iteration obtained based on the message word of the nth round of iteration, the first permutation function and the second permutation function, and the output data of the n-1th round of iteration include:
  • obtaining the output data of the nth round of iteration based on the message word of the nth round of iteration, the first permutation function and the second permutation function, and the output data of the n-1th round of iteration also includes:
  • the fourth output data of the n-th iteration is obtained based on the message word of the n-th iteration, the second permutation function, the first intermediate variable, and the first output data and the third output data of the n-1 iteration.
  • obtaining the output data of the nth round of iteration based on the message word of the nth round of iteration, the first permutation function and the second permutation function, and the output data of the n-1th round of iteration further includes:
  • the fifth output data of the n-th iteration is obtained based on the output data of the n-1 iteration.
  • dividing the input data into several data blocks according to the first preset unit length includes:
  • a system for implementing a secure hash algorithm including:
  • a data division module configured to divide the input data into several data blocks according to the first preset unit length, and divide the data block into m message words according to the second preset unit length;
  • Judgment module configured to judge whether the current iteration number n is greater than m
  • the first condition module is configured to respond to n being less than or equal to m, input the nth message word as the message word of the nth iteration into the entry of the iterative algorithm hardware structure, and obtain the nth round based on the nth message word iterative first permutation function and second permutation function;
  • the second condition module is configured to respond to n being greater than m, obtain the first permutation function and the second permutation function of the nth round of iterations based on a number of message words in the first m message words, and based on the number of message words and the nth round
  • the first permutation function and the second permutation function of the iteration obtain the message word of the nth round of iteration, and input the message word of the nth round of iteration into the entry of the iterative algorithm hardware structure;
  • An output data module configured to obtain the output data of the nth round of iteration based on the message word of the nth round of iteration, the first permutation function and the second permutation function, and the output data of the n-1th round of iteration;
  • the output result module is configured to perform additive splicing on the message word of the last iteration and its output data to obtain the output result of the secure hash algorithm in response to the current arrival of the last iteration.
  • a computer-readable storage medium which stores computer program instructions, and implements any one of the above-mentioned methods when the computer program instructions are executed.
  • a computer device including a memory and a processor, where a computer program is stored in the memory, and when the computer program is executed by the processor, any one of the above-mentioned methods is executed.
  • the secure hash algorithm of this application is realized by combining the hardware algorithm structure, the calculation time is optimized by using the method of generating message words in advance, and the critical path in the compression process is optimized by reducing the number of algorithm pipelines, finally based on the hardware algorithm
  • the structure When the structure is implemented, it can improve the overall performance of the algorithm module and reduce the consumption of hardware resources.
  • Fig. 1 is a schematic diagram of an implementation method of a secure hash algorithm provided according to an embodiment of the present application
  • Fig. 2 is a schematic diagram of the hardware structure of the single-round iterative algorithm of the SHA-256 algorithm provided according to the embodiment of the present application;
  • FIG. 3 is a schematic diagram of a data block module of a system for implementing a secure hash algorithm according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of a computer-readable storage medium for implementing a method for implementing a secure hash algorithm according to an embodiment of the present application
  • FIG. 5 is a schematic diagram of a hardware structure of a computer device implementing a method for implementing a secure hash algorithm according to an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an embodiment of a method for implementing a secure hash algorithm provided by the present application. As shown in Figure 1, the embodiment of the present application includes the following steps:
  • Step S100 divide the input data into several data blocks according to the first preset unit length, and divide the data block into m message words according to the second preset unit length, and perform the following steps for each data block:
  • Step S10 judging whether the current iteration number n is greater than m;
  • Step S20 in response to n being less than or equal to m, input the nth message word as the message word of the nth iteration into the entry of the iterative algorithm hardware structure, and obtain the first permutation of the nth iteration based on the nth message word function and the second permutation function;
  • Step S30 in response to n being greater than m, the first permutation function and the second permutation function of the nth round of iteration are obtained based on several message words in the first m message words, and the first permutation function based on the number of message words and the nth round of iteration
  • the function and the second permutation function obtain the message word of the nth round of iteration, and input the message word of the nth round of iteration into the entry of the iterative algorithm hardware structure;
  • Step S40 based on the message word of the nth round of iteration, the first permutation function and the second permutation function, and the output data of the n-1th round of iteration to obtain the output data of the nth round of iteration;
  • Step S50 in response to reaching the last round of iteration, perform additive splicing on the message word of the last round of iteration and its output data to obtain the output result of the secure hash algorithm.
  • n and m are natural numbers greater than or equal to 1 respectively.
  • the secure hash algorithm of the embodiment of the present application is realized by combining the hardware algorithm structure, the calculation time is optimized by using the method of generating message words in advance, and the critical path in the compression process is optimized by reducing the number of algorithm pipelines, and finally based on When the hardware algorithm structure is implemented, it can improve the overall performance of the algorithm module and reduce the consumption of hardware resources.
  • dividing the input data into several data blocks according to the first preset unit length includes: judging whether the tail signal of the last data block is received; in response to not receiving the tail signal of the last data block, for Data padding is performed on the last data block so that its data length reaches a preset unit length.
  • the secure hash algorithm includes but is not limited to the SHA-256 algorithm.
  • the message packet length is 512bit (bit).
  • Dividing the input plaintext data into a group of 512bit data blocks (that is, the first preset unit length is 512bit) is the basic component of the SHA-256 algorithm and is completed at the first stage of the algorithm pipeline.
  • a Data_in_last signal (data tail signal) will be received correspondingly. If the tail signal of the last data block is not received, it means that the length of the last data block of the input data is less than 512 bits, and tail padding is required at this time.
  • the nth message word is input into the entry of the iterative algorithm hardware structure as the message word of the nth round iteration, and the first permutation function and the second iteration function of the nth round are obtained based on the nth message word
  • the permutation function includes: dividing the nth message word into a plurality of input units, and inputting each input unit into the corresponding entry of the iterative algorithm hardware structure; obtaining the first permutation function and Second permutation function.
  • the method further includes: in response to n being greater than m, obtaining the first intermediate variable and the second intermediate variable of the n-th iteration based on the output data of the n-1 iteration.
  • obtaining the output data of the nth round of iteration based on the message word of the nth round of iteration, the first permutation function and the second permutation function, and the output data of the n-1th round of iteration includes: based on the nth round of iteration The message word, the first permutation function, the second permutation function, the first intermediate variable, the second intermediate variable and parameters, and the first output data of the n-1 iteration obtain the second output data of the n iteration.
  • obtaining the output data of the nth round of iteration based on the message word of the nth round of iteration, the first permutation function and the second permutation function, and the output data of the n-1th round of iteration further includes: based on the nth round of iteration The message word, the second permutation function, the first intermediate variable and parameters, and the first output data and the third output data of the n-1th round of iteration obtain the fourth output data of the nth round of iteration.
  • obtaining the output data of the n-th iteration based on the message word of the n-th iteration, the first permutation function and the second permutation function, and the output data of the n-1-th iteration further includes: based on the n-1th The output data of the round of iterations obtains the fifth output data of the nth round of iterations.
  • an exemplary embodiment of the present application is as follows:
  • the message word length is 32 bits.
  • the length of each data block is 512 bits, and each data block can write 16 sets of data according to the 32-bit bit width, marked as W 0 -W 15 .
  • the entry depth of the iterative algorithm hardware structure is 64, then 64 message words are needed, and each message word participates in one round of iteration. Since 16 message words are known, message words need to be used to participate in the calculation in subsequent iterative calculations. In order to reduce the operation time of iterative compression, message words can be generated in advance and sent to the iterative compression module at the set beat. Therefore, other 48 message words need to be generated through calculation.
  • X represents a 32-bit word
  • ROTR ⁇ k(X) represents that X is cyclically shifted to the right by k bits
  • SHR ⁇ k(X) represents that X is shifted to the right by k bits
  • the lower bits on the left are supplemented with 0.
  • W j ⁇ 1(W j-2 )+W j-7 + ⁇ 0(W j-15 )+W j-16
  • FIG. 2 shows a schematic diagram of the hardware structure of the single-round iterative algorithm of the SHA-256 algorithm.
  • each message word is divided into 8 input units, which are respectively input into 8 identical dual-port RAMs with a 32-bit bit width and a depth of 64, which are recorded as RAM_A, RAM_B, RAM_C, RAM_D, RAM_E, and RAM_F , RAM_G and RAM_H, correspondingly, A, B, C, D, E, F, G, H in Figure 2 represent the iterative algorithm input, A1, B1, C1, D1, E1, F1, G1, H1 represent the iterative algorithm output.
  • B1, C1, D1, F1, G1, and H1 correspond to A, B, C, E, F, and G respectively, that is, B1, C1, D1, F1, G1, and H1 respectively belong to the fifth output data.
  • the calculation process of A1 and E1 is the most complicated, the timing path is the longest, and they are two critical paths. For the critical path, combined with the calculation process of the SHA-256 algorithm, the calculation process of A1 and E1 is as follows:
  • A1 H+ ⁇ 1+Ch+Kj+Wj + ⁇ 0+Maj;
  • Kj is a parameter
  • H (first output data) and E1 calculation formula in A1 (the second output data) calculation formula and E1 (the fourth output data) calculation formula D in (the third output data) are the corresponding output data of the previous round respectively.
  • the main operation of the two sets of formulas is the addition of multiple 32bit data, and there are also the same factors for calculation: H+ ⁇ 1+Ch+Kj+Wj. Extracting the same items can reduce the amount of calculation.
  • Optimize timing and area During the calculation, the calculation of A1 and E1 is allocated to a total of four-stage pipelines, and the timing is optimized to the greatest extent. The calculation of the value of Ch is completed in the first-level pipeline, Maj is completed in the second-level pipeline, and A1 and E1 are finally completed. The distribution of calculation results is completed in the third and fourth stages of flow. In this process, the timing path is optimized, and at the same time, some values such as Maj and Ch are assigned to the packet expansion stage by using the pre-computation method, so that the single-round iterative algorithm only needs two stages of pipeline to complete.
  • FIG. 3 is a schematic diagram of an embodiment of a data block module of a system for implementing a secure hash algorithm provided by the present application.
  • a system for implementing a secure hash algorithm includes: a data division module 10 configured to divide input data into several data blocks according to a first preset unit length, and divide the data blocks into a number of data blocks according to a second preset unit length.
  • the unit length is divided into m message words successively; the judging module 20 is configured to judge whether the number of iterations n is greater than m; the first condition module 30 is configured to respond to n being less than or equal to m, and use the nth message word as The message word of the nth round of iteration is input in the entrance of the iterative algorithm hardware structure, and based on the nth message word, the first permutation function and the second permutation function of the nth round of iteration are obtained; the second condition module 40 is configured to respond When n is greater than m, the first permutation function and the second permutation function of the nth round of iteration are obtained based on some message words in the first m message words, and based on several message words and the first permutation function and the second permutation function of the nth round of iteration The permutation function obtains the message word of the nth round of iteration, and inputs the message word of the nth round of it
  • the implementation system of the secure hash algorithm in the embodiment of the present application optimizes the calculation time by using the method of generating message words in advance, optimizes the critical path in the compression process by reducing the number of algorithm pipelines, and finally realizes it based on the hardware algorithm structure. It achieves the effect of improving the overall performance of the algorithm module and reducing the consumption of hardware resources.
  • FIG. 4 shows a schematic diagram of a computer-readable storage medium for implementing a method for implementing a secure hash algorithm according to an embodiment of the present application.
  • the computer-readable storage medium 3 stores computer program instructions 31 , and the computer program instructions 31 can be executed by a processor. When the computer program instructions 31 are executed, the method of any one of the above-mentioned embodiments is implemented.
  • the fourth aspect of the embodiments of the present application also provides a computer device, including a memory 402 and a processor 401, and a computer program is stored in the memory, and when the computer program is executed by the processor, any one of the above-mentioned embodiments can be realized Methods.
  • FIG. 5 it is a schematic diagram of a hardware structure of an embodiment of a computer device implementing a secure hash algorithm implementation method provided by the present application.
  • the computer equipment includes a processor 401 and a memory 402 , and may further include: an input device 403 and an output device 404 .
  • the processor 401, the memory 402, the input device 403, and the output device 404 may be connected via a bus or in other ways. In FIG. 5, connection via a bus is taken as an example.
  • the input device 403 can receive input numbers or character information, and generate key signal input related to user settings and function control of the implementation system of the secure hash algorithm.
  • the output device 404 may include a display device such as a display screen.
  • the memory 402 as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs and modules, such as the implementation method of the secure hash algorithm in the embodiment of the present application Corresponding program instruction/module.
  • the memory 402 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created by using the implementation method of the secure hash algorithm, etc. .
  • the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices.
  • the memory 402 may optionally include memory located remotely relative to the processor 401, and these remote memories may be connected to the local module through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the processor 401 executes various functional applications and data processing of the server by running non-volatile software programs, instructions and modules stored in the memory 402, that is, implements the implementation method of the secure hash algorithm in the above method embodiment.
  • nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory memory.
  • Volatile memory can include random access memory (RAM), which can act as external cache memory.
  • RAM is available in various forms such as Synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM).
  • DRAM Synchronous RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • DDR SDRAM Double Data Rate SDRAM
  • ESDRAM Enhanced SDRAM
  • SLDRAM Synchronous Link DRAM
  • DRRAM Direct Rambus RAM
  • Storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.
  • DSPs digital signal processors
  • ASIC application specific integrated circuits
  • FPGA field programmable gate array
  • a general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine.
  • a processor may also be implemented as a combination of computing devices, eg, a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Error Detection And Correction (AREA)

Abstract

本申请提供了一种安全散列算法的实现方法、系统、介质及设备,方法包括将输入数据划分为若干个数据块,并将数据块依次分为m个消息字,针对每个数据块执行以下步骤:响应于迭代轮数n小于等于m,将第n个消息字作为第n轮迭代的消息字输入到迭代算法硬件结构的入口中,并得到第n轮迭代的第一置换函数和第二置换函数;响应于n大于m,基于前m个中的若干消息字得到第n轮迭代的第一置换函数和第二置换函数,并得到第n轮迭代的消息字,且将消息字输入到迭代算法硬件结构的入口中;基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据。本申请优化了算法计算时间,提高了硬件算法结构的性能。

Description

一种安全散列算法的实现方法、系统、介质及设备
本申请要求在2021年7月26日提交中国专利局、申请号为202110843130.1、发明名称为“一种安全散列算法的实现方法、系统、介质及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及算法技术领域,尤其涉及一种安全散列算法的实现方法、系统、介质及设备。
背景技术
安全散列算法(SHA)是一个密码散列函数家族,是FIPS所认证的安全散列算法,能计算出一个数字消息所对应到的、长度固定的字符串(又称消息摘要)的算法。SHA家族的五个算法,分别是SHA-1、SHA-224、SHA-256、SHA-384和SHA-512,后四者有时并称为SHA-2。其中,SHA-256算法的消息摘要值长度为256比特。随着SHA-1的抗攻击性的破解,目前重大安全领域应用最多的就是SHA-256算法。SHA-256算法支持长度限定在264比特内的明文输入,消息分组长度为512比特,迭代压缩过程消息字长度为32比特。
目前,SHA-256算法在硬件实现方案上常在部分计算中使用布置多级流水的方式,使从每个运算级的输入到输出中每一个的计算延时基本相等,这样的方式耗时多且资源消耗多。
发明内容
有鉴于此,本申请的目的在于提出一种安全散列算法的实现方法、系统、介质及设备,用以解决现有技术中安全散列算法的硬件实现方式耗时 多且消耗资源多的问题。
基于上述目的,本申请提供了一种安全散列算法的实现方法,包括将输入数据按照第一预设单位长度划分为若干个数据块,并将数据块按照第二预设单位长度分为m个消息字,针对每个数据块执行以下步骤:
判断当前迭代轮数n是否大于m;
响应于n小于等于m,将第n个消息字作为第n轮迭代的消息字输入到迭代算法硬件结构的入口中,并基于第n个消息字得到第n轮迭代的第一置换函数和第二置换函数;
响应于n大于m,基于前m个消息字中的若干消息字得到第n轮迭代的第一置换函数和第二置换函数,并基于若干消息字以及第n轮迭代的第一置换函数和第二置换函数得到第n轮迭代的消息字,且将第n轮迭代的消息字输入到迭代算法硬件结构的入口中;
基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据;
响应于当前达到最后一轮迭代,将最后一轮迭代的消息字及其输出数据做加法拼接以得到安全散列算法的输出结果。
在一些实施例中,将第n个消息字作为第n轮迭代的消息字输入到迭代算法硬件结构的入口中,并基于第n个消息字得到第n轮迭代的第一置换函数和第二置换函数包括:
将第n个消息字划分为多个输入单元,并将每个输入单元输入到迭代算法硬件结构的对应入口中;
基于若干输入单元分别得到第n轮迭代的第一置换函数和第二置换函数。
在一些实施例中,方法还包括:
响应于n大于m,基于第n-1轮迭代的输出数据得到第n轮迭代的第一中间变量和第二中间变量。
在一些实施例中,基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据包括:
基于第n轮迭代的消息字、第一置换函数、第二置换函数、第一中间变量、第二中间变量以及第n-1轮迭代的第一输出数据得到第n轮迭代的第二输出数据。
在一些实施例中,基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据还包括:
基于第n轮迭代的消息字、第二置换函数、第一中间变量以及第n-1轮迭代的第一输出数据和第三输出数据得到第n轮迭代的第四输出数据。
在一些实施例中,基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据还包括:
基于第n-1轮迭代的输出数据得到第n轮迭代的第五输出数据。
在一些实施例中,将输入数据按照第一预设单位长度划分为若干个数据块包括:
判断是否接收到最后一个数据块的尾部信号;
响应于未接收到最后一个数据块的尾部信号,为最后一个数据块进行数据填充以使其数据长度达到预设单位长度。
本申请的另一方面,还提供了一种安全散列算法的实现系统,包括:
数据划分模块,配置用于将输入数据按照第一预设单位长度划分为若干个数据块,并将数据块按照第二预设单位长度分为m个消息字;
判断模块,配置用于判断当前迭代轮数n是否大于m;
第一条件模块,配置用于响应于n小于等于m,将第n个消息字作为第n轮迭代的消息字输入到迭代算法硬件结构的入口中,并基于第n个消息字得到第n轮迭代的第一置换函数和第二置换函数;
第二条件模块,配置用于响应于n大于m,基于前m个消息字中的若干消息字得到第n轮迭代的第一置换函数和第二置换函数,并基于若干消 息字以及第n轮迭代的第一置换函数和第二置换函数得到第n轮迭代的消息字,且将第n轮迭代的消息字输入到迭代算法硬件结构的入口中;
输出数据模块,配置用于基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据;以及
输出结果模块,配置用于响应于当前达到最后一轮迭代,将最后一轮迭代的消息字及其输出数据做加法拼接以得到安全散列算法的输出结果。
本申请的又一方面,还提供了一种计算机可读存储介质,存储有计算机程序指令,该计算机程序指令被执行时实现上述任意一项方法。
本申请的再一方面,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该计算机程序被处理器执行时执行上述任意一项方法。
本申请至少具有以下有益技术效果:
本申请的安全散列算法的通过结合硬件算法结构来实现,通过使用提前生成消息字的方式优化了计算时间,通过减少算法流水级数的方法优化了压缩过程中的关键路径,最终基于硬件算法结构实现时达到提高算法模块整体性能以及减少硬件资源消耗的作用。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1为根据本申请实施例提供的安全散列算法的实现方法的示意图;
图2为根据本申请实施例提供的SHA-256算法的单轮迭代算法硬件结构示意图;
图3为根据本申请实施例提供的安全散列算法的实现系统的数据块模块的示意图;
图4为根据本申请实施例提供的实现安全散列算法的实现方法的计算机可读存储介质的示意图;
图5为根据本申请实施例提供的执行安全散列算法的实现方法的计算机设备的硬件结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本申请实施例进一步详细说明。
需要说明的是,本申请实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称的非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本申请实施例的限定。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备固有的其他步骤或单元。
基于上述目的,本申请实施例的第一个方面,提出了一种安全散列算法的实现方法的实施例。图1示出的是本申请提供的安全散列算法的实现方法的实施例的示意图。如图1所示,本申请实施例包括如下步骤:
步骤S100、将输入数据按照第一预设单位长度划分为若干个数据块,并将数据块按照第二预设单位长度分为m个消息字,针对每个数据块执行以下步骤:
步骤S10、判断当前迭代轮数n是否大于m;
步骤S20、响应于n小于等于m,将第n个消息字作为第n轮迭代的消息字输入到迭代算法硬件结构的入口中,并基于第n个消息字得到第n轮迭代的第一置换函数和第二置换函数;
步骤S30、响应于n大于m,基于前m个消息字中的若干消息字得到 第n轮迭代的第一置换函数和第二置换函数,并基于若干消息字以及第n轮迭代的第一置换函数和第二置换函数得到第n轮迭代的消息字,且将第n轮迭代的消息字输入到迭代算法硬件结构的入口中;
步骤S40、基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据;
步骤S50、响应于当前达到最后一轮迭代,将最后一轮迭代的消息字及其输出数据做加法拼接以得到安全散列算法的输出结果。
本实施例中,n和m分别为大于等于1的自然数。
本申请实施例的安全散列算法的通过结合硬件算法结构来实现,通过使用提前生成消息字的方式优化了计算时间,通过减少算法流水级数的方法优化了压缩过程中的关键路径,最终基于硬件算法结构实现时达到提高算法模块整体性能以及减少硬件资源消耗的作用。
在一些实施例中,将输入数据按照第一预设单位长度划分为若干个数据块包括:判断是否接收到最后一个数据块的尾部信号;响应于未接收到最后一个数据块的尾部信号,为最后一个数据块进行数据填充以使其数据长度达到预设单位长度。
本申请实施例中,安全散列算法包括但不限于SHA-256算法。对于SHA-256算法,其消息分组长度为512bit(比特)。将输入的明文数据分成512bit一组的数据块(即第一预设单位长度为512bit),是SHA-256算法的基础组成部分,在算法流水线的第一级完成。每接收完一组512bit的数据,会相应接收到一个Data_in_last信号(数据尾部信号)。如果没有收到最后一个数据块的尾部信号,说明此输入数据的最后一个数据块数据长度不足512bit,此时需要做尾部填充,首先将1添加到输入数据的末尾,再在其后添加0,最后添加64bit的数据长度,使最后一个数据块的数据长度达到512bit,即,使总的输入数据的数据长度达到512bit的整数倍。
在一些实施例中,将第n个消息字作为第n轮迭代的消息字输入到迭代算法硬件结构的入口中,并基于第n个消息字得到第n轮迭代的第一置 换函数和第二置换函数包括:将第n个消息字划分为多个输入单元,并将每个输入单元输入到迭代算法硬件结构的对应入口中;基于若干输入单元分别得到第n轮迭代的第一置换函数和第二置换函数。
在一些实施例中,方法还包括:响应于n大于m,基于第n-1轮迭代的输出数据得到第n轮迭代的第一中间变量和第二中间变量。
在一些实施例中,基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据包括:基于第n轮迭代的消息字、第一置换函数、第二置换函数、第一中间变量、第二中间变量和参数以及第n-1轮迭代的第一输出数据得到第n轮迭代的第二输出数据。
在一些实施例中,基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据还包括:基于第n轮迭代的消息字、第二置换函数、第一中间变量和参数以及第n-1轮迭代的第一输出数据和第三输出数据得到第n轮迭代的第四输出数据。
在一些实施例中,基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据还包括:基于第n-1轮迭代的输出数据得到第n轮迭代的第五输出数据。
基于以上实施例,本申请一示例性实施例如下:
在SHA-256算法的迭代压缩过程中,消息字长度为32比特。每个数据块的长度为512bit,每个数据块按照32bit位宽可以写入16组数据,记为W 0-W 15。如果迭代算法硬件结构的入口深度为64,则需要64个消息字,每个消息字参与一轮迭代。由于已知了16个消息字,在后续迭代计算中需要使用消息字参与计算,为降低迭代压缩的操作时间,可以提前生成消息字,在设定节拍送入迭代压缩模块。因此需要通过计算产生其他的48个消息字。
具体地,首先计算第一置换函数∑0(X)和第二置换函数∑1(X):
Figure PCTCN2021134195-appb-000001
Figure PCTCN2021134195-appb-000002
其中X表示32比特字,ROTR^k(X)表示X循环右移k个比特位,SHR^k(X)表示X向右移动k个比特位,左边低位用0补充。
然后通过∑0(X)和∑1(X)计算第17-64组待压缩数据消息字W j
W j=∑1(W j-2)+W j-7+∑0(W j-15)+W j-16
图2示出了SHA-256算法的单轮迭代算法硬件结构示意图。如图2所示,每个消息字分为8个输入单元,分别输入到8个相同的32bit位宽、深度为64的双口RAM中,记为RAM_A、RAM_B、RAM_C、RAM_D、RAM_E、RAM_F、RAM_G及RAM_H,相应地,图2中的A、B、C、D、E、F、G、H表示迭代算法输入,A1、B1、C1、D1、E1、F1、G1、H1表示迭代算法输出。迭代算法计算前后输入输出的关系表达式为{A1,B1,C1,D1,E1,F1,G1,H1}={T1+T2,A,B,C,D+T1,E,F,G}。其中,B1,C1,D1,F1,G1,H1分别对应于A,B,C,E,F,G,即B1,C1,D1,F1,G1,H1分别属于第五输出数据。A1和E1的计算过程最复杂,时序路径最长,为两条关键路径。针对关键路径,结合SHA-256算法的计算过程,A1和E1的计算过程如下:
A1=H+∑1+Ch+Kj+W j+∑0+Maj;
E1=H+∑1+Ch+Kj+W j+D;
其中,Kj为参数,并且
Figure PCTCN2021134195-appb-000003
Figure PCTCN2021134195-appb-000004
对于第一轮迭代,A1计算式和E1计算式中的H、E1计算式中的D、第一中间变量Ch计算式中的E、F、G以及第二中间变量Maj计算式中的A、B、C,都为第一轮的输入单元;对于后续的迭代,A1(第二输出数据)计算式和E1(第四输出数据)计算式中的H(第一输出数据)、E1计算式中的D(第三输出数据)、Ch计算式中的E、F、G以及Maj计算式中的A、B、C分别为前一轮的对应的输出数据。
通过公式可以看到,两组公式的主运算都是多个32bit数据的加法运算,同时又存在计算相同的因子:H+∑1+Ch+Kj+Wj,将相同项提取出可减少计算量,优化时序和面积。在计算时将A1和E1的计算分配到总共的四级流水中,最大程度的优化时序,其中计算Ch的值在第一级流水中完成,Maj在第二级流水中完成,A1和E1最终计算结果分配在第三和第四级流水中完成。在这个过程中,优化了时序路径,同时使用预计算的方法将部分值如Maj和Ch分配到分组扩展阶段完成,使得单轮迭代算法只需要两级流水完成。
本申请实施例的第二个方面,还提供了一种安全散列算法的实现系统。图3示出的是本申请提供的安全散列算法的实现系统的数据块模块实施例的示意图。如图3所示,一种安全散列算法的实现系统包括:数据划分模块10,配置用于将输入数据按照第一预设单位长度划分为若干个数据块,并将数据块按照第二预设单位长度依次分为m个消息字;判断模块20,配置用于判断迭代轮数n是否大于m;第一条件模块30,配置用于响应于n小于等于m,将第n个消息字作为第n轮迭代的消息字输入到迭代算法硬件结构的入口中,并基于第n个消息字得到第n轮迭代的第一置换函数和第二置换函数;第二条件模块40,配置用于响应于n大于m,基于前m个消息字中的若干消息字得到第n轮迭代的第一置换函数和第二置换函数,并基于若干消息字以及第n轮迭代的第一置换函数和第二置换函数得到第n轮迭代的消息字,且将第n轮迭代的消息字输入到迭代算法硬件结构的入口中;输出数据模块50,配置用于基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据;以及输出结果模块60,配置用于响应于当前达到最后一轮迭代,将最后一轮迭代的消息字及其输出数据做加法拼接以得到安全散列算法的输出结果。
本申请实施例的安全散列算法的实现系统,通过使用提前生成消息字的方式优化了计算时间,通过减少算法流水级数的方法优化了压缩过程中的关键路径,最终基于硬件算法结构实现时达到提高算法模块整体性能以 及减少硬件资源消耗的作用。
本申请实施例的第三个方面,还提供了一种计算机可读存储介质,图4示出了根据本申请实施例提供的实现安全散列算法的实现方法的计算机可读存储介质的示意图。如图4所示,计算机可读存储介质3存储有计算机程序指令31,该计算机程序指令31可以被处理器执行。该计算机程序指令31被执行时实现上述任意一项实施例的方法。
应当理解,在相互不冲突的情况下,以上针对根据本申请的安全散列算法的实现方法阐述的所有实施方式、特征和优势同样地适用于根据本申请的安全散列算法的实现系统和存储介质。
本申请实施例的第四个方面,还提供了一种计算机设备,包括存储器402和处理器401,该存储器中存储有计算机程序,该计算机程序被该处理器执行时实现上述任意一项实施例的方法。
如图5所示,为本申请提供的执行安全散列算法的实现方法的计算机设备的一个实施例的硬件结构示意图。以如图5所示的计算机设备为例,在该计算机设备中包括一个处理器401以及一个存储器402,并还可以包括:输入装置403和输出装置404。处理器401、存储器402、输入装置403和输出装置404可以通过总线或者其他方式连接,图5中以通过总线连接为例。输入装置403可接收输入的数字或字符信息,以及产生与安全散列算法的实现系统的用户设置以及功能控制有关的键信号输入。输出装置404可包括显示屏等显示设备。
存储器402作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的安全散列算法的实现方法对应的程序指令/模块。存储器402可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储安全散列算法的实现方法的使用所创建的数据等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器402可选包括相对于处 理器401远程设置的存储器,这些远程存储器可以通过网络连接至本地模块。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
处理器401通过运行存储在存储器402中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例的安全散列算法的实现方法。
最后需要说明的是,本文的计算机可读存储介质(例如,存储器)可以是易失性存储器或非易失性存储器,或者可以包括易失性存储器和非易失性存储器两者。作为例子而非限制性的,非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程ROM(EEPROM)或快闪存储器。易失性存储器可以包括随机存取存储器(RAM),该RAM可以充当外部高速缓存存储器。作为例子而非限制性的,RAM可以以多种形式获得,比如同步RAM(DRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据速率SDRAM(DDR SDRAM)、增强SDRAM(ESDRAM)、同步链路DRAM(SLDRAM)、以及直接Rambus RAM(DRRAM)。所公开的方面的存储设备意在包括但不限于这些和其它合适类型的存储器。
本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。为了清楚地说明硬件和软件的这种可互换性,已经就各种示意性组件、方块、模块、电路和步骤的功能对其进行了一般性的描述。这种功能是被实现为软件还是被实现为硬件取决于具体应用以及施加给整个系统的设计约束。本领域技术人员可以针对每种具体应用以各种方式来实现的功能,但是这种实现决定不应被解释为导致脱离本申请实施例公开的范围。
结合这里的公开所描述的各种示例性逻辑块、模块和电路可以利用被设计成用于执行这里功能的下列部件来实现或执行:通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA) 或其它可编程逻辑器件、分立门或晶体管逻辑、分立的硬件组件或者这些部件的任何组合。通用处理器可以是微处理器,但是可替换地,处理器可以是任何传统处理器、控制器、微控制器或状态机。处理器也可以被实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、一个或多个微处理器结合DSP和/或任何其它这种配置。
以上是本申请公开的示例性实施例,但是应当注意,在不背离权利要求限定的本申请实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本申请实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。上述本申请实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本申请实施例公开的范围(包括权利要求)被限于这些例子;在本申请实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本申请实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本申请实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本申请实施例的保护范围之内。

Claims (12)

  1. 一种安全散列算法的实现方法,其特征在于,包括将输入数据按照第一预设单位长度划分为若干个数据块,并将数据块按照第二预设单位长度分为m个消息字,针对每个数据块执行以下步骤:
    判断当前迭代轮数n是否大于m;
    响应于n小于等于m,将第n个消息字作为第n轮迭代的消息字输入到迭代算法硬件结构的入口中,并基于所述第n个消息字得到第n轮迭代的第一置换函数和第二置换函数;
    响应于n大于m,基于前m个消息字中的若干消息字得到第n轮迭代的第一置换函数和第二置换函数,并基于所述若干消息字以及第n轮迭代的第一置换函数和第二置换函数得到第n轮迭代的消息字,且将第n轮迭代的消息字输入到所述迭代算法硬件结构的入口中;
    基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据;
    响应于当前达到最后一轮迭代,将最后一轮迭代的消息字及其输出数据做加法拼接以得到安全散列算法的输出结果。
  2. 根据权利要求1所述的方法,其特征在于,将第n个消息字作为第n轮迭代的消息字输入到迭代算法硬件结构的入口中,并基于所述第n个消息字得到第n轮迭代的第一置换函数和第二置换函数包括:
    将第n个消息字划分为多个输入单元,并将每个输入单元输入到所述迭代算法硬件结构的对应入口中;
    基于若干输入单元分别得到第n轮迭代的第一置换函数和第二置换函数。
  3. 根据权利要求1所述的方法,其特征在于,还包括:
    响应于n大于m,基于第n-1轮迭代的输出数据得到第n轮迭代的第一中间变量和第二中间变量。
  4. 根据权利要求3所述的方法,其特征在于,基于第n轮迭代的消息字、 第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据包括:
    基于第n轮迭代的消息字、第一置换函数、第二置换函数、第一中间变量、第二中间变量以及第n-1轮迭代的第一输出数据得到第n轮迭代的第二输出数据。
  5. 根据权利要求3所述的方法,其特征在于,基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据还包括:
    基于第n轮迭代的消息字、第二置换函数、第一中间变量以及第n-1轮迭代的第一输出数据和第三输出数据得到第n轮迭代的第四输出数据。
  6. 根据权利要求3所述的方法,其特征在于,基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据还包括:
    基于第n-1轮迭代的输出数据得到第n轮迭代的第五输出数据。
  7. 根据权利要求1所述的方法,其特征在于,将输入数据按照第一预设单位长度划分为若干个数据块包括:
    判断是否接收到最后一个数据块的尾部信号;
    响应于未接收到最后一个数据块的尾部信号,为所述最后一个数据块进行数据填充以使其数据长度达到所述预设单位长度。
  8. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在所述迭代算法硬件结构中计算关键路径时采用四级流水线的迭代方式计算,并将关键路径计算中存在的相同计算因子提取到所述四级流水线上的前两级完成,并在后续迭代计算中仅迭代所述四级流水线的后两级流水线。
  9. 一种安全散列算法的实现系统,其特征在于,包括:
    数据划分模块,配置用于将输入数据按照第一预设单位长度划分为若干个数据块,并将数据块按照第二预设单位长度分为m个消息字;
    判断模块,配置用于判断当前迭代轮数n是否大于m;
    第一条件模块,配置用于响应于n小于等于m,将第n个消息字作为第n轮迭代的消息字输入到迭代算法硬件结构的入口中,并基于所述第n个消息字得到第n轮迭代的第一置换函数和第二置换函数;
    第二条件模块,配置用于响应于n大于m,基于前m个消息字中的若干消息字得到第n轮迭代的第一置换函数和第二置换函数,并基于所述若干消息字以及第n轮迭代的第一置换函数和第二置换函数得到第n轮迭代的消息字,且将第n轮迭代的消息字输入到所述迭代算法硬件结构的入口中;
    输出数据模块,配置用于基于第n轮迭代的消息字、第一置换函数和第二置换函数以及第n-1轮迭代的输出数据得到第n轮迭代的输出数据;以及
    输出结果模块,配置用于响应于当前达到最后一轮迭代,将最后一轮迭代的消息字及其输出数据做加法拼接以得到安全散列算法的输出结果。
  10. 根据权利要求9所述的系统,其特征在于,在所述迭代算法硬件结构中计算关键路径时采用四级流水线的迭代方式计算,并将关键路径计算中存在的相同计算因子提取到所述四级流水线上的前两级完成,并在后续迭代计算中仅迭代所述四级流水线的后两级流水线。
  11. 一种计算机可读存储介质,其特征在于,存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至8任意一项所述的方法。
  12. 一种计算机设备,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时执行如权利要求1至8任意一项所述的方法。
PCT/CN2021/134195 2021-07-26 2021-11-30 一种安全散列算法的实现方法、系统、介质及设备 WO2023005083A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110843130.1 2021-07-26
CN202110843130.1A CN113300831B (zh) 2021-07-26 2021-07-26 一种安全散列算法的实现方法、系统、介质及设备

Publications (1)

Publication Number Publication Date
WO2023005083A1 true WO2023005083A1 (zh) 2023-02-02

Family

ID=77330999

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134195 WO2023005083A1 (zh) 2021-07-26 2021-11-30 一种安全散列算法的实现方法、系统、介质及设备

Country Status (2)

Country Link
CN (1) CN113300831B (zh)
WO (1) WO2023005083A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116305192A (zh) * 2023-02-07 2023-06-23 成都海泰方圆科技有限公司 数据文件的处理方法、装置、电子设备及存储介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113300831B (zh) * 2021-07-26 2021-10-29 苏州浪潮智能科技有限公司 一种安全散列算法的实现方法、系统、介质及设备
WO2024010804A1 (en) * 2022-07-06 2024-01-11 Block, Inc. Computing architecture for energy-efficient hash computation
CN115664849B (zh) * 2022-12-13 2023-03-21 苏州浪潮智能科技有限公司 Bmc及其加密数据生成系统、方法、设备及存储介质
CN115664640B (zh) * 2022-12-23 2023-03-21 苏州浪潮智能科技有限公司 Sha-3算法的硬件实现方法、系统、存储介质及设备
CN115765975B (zh) * 2023-01-09 2023-04-07 苏州浪潮智能科技有限公司 Sha-256算法的低功耗实现方法、芯片、服务器及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3338397A1 (en) * 2015-08-19 2018-06-27 Intel Corporation Instructions and logic to provide simd sm3 cryptographic hashing functionality
CN108768615A (zh) * 2018-05-16 2018-11-06 济南蓝剑钧新信息科技有限公司 散列算法在同一框架下的asic芯片实现方法
CN113300831A (zh) * 2021-07-26 2021-08-24 苏州浪潮智能科技有限公司 一种安全散列算法的实现方法、系统、介质及设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104092534A (zh) * 2014-07-09 2014-10-08 昆腾微电子股份有限公司 实现sm3密码杂凑算法中的迭代压缩的方法
CN105335331B (zh) * 2015-12-04 2018-08-21 东南大学 一种基于大规模粗粒度可重构处理器的sha256实现方法及系统
CN107579811A (zh) * 2017-07-28 2018-01-12 广州星海集成电路基地有限公司 一种基于sm3密码杂凑算法的硬件优化方法
US10824428B2 (en) * 2019-03-29 2020-11-03 Intel Corporation Apparatuses, methods, and systems for hashing instructions
CN111600699A (zh) * 2020-06-17 2020-08-28 深圳比特微电子科技有限公司 用于实现散列算法的电路和方法
CN111913749A (zh) * 2020-08-07 2020-11-10 山东大学 基于流水线的sm3算法fpga实现方法及系统
CN112367158B (zh) * 2020-11-06 2023-05-16 海光信息技术股份有限公司 一种加速sm3算法的方法、处理器、芯片及电子设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3338397A1 (en) * 2015-08-19 2018-06-27 Intel Corporation Instructions and logic to provide simd sm3 cryptographic hashing functionality
CN108768615A (zh) * 2018-05-16 2018-11-06 济南蓝剑钧新信息科技有限公司 散列算法在同一框架下的asic芯片实现方法
CN113300831A (zh) * 2021-07-26 2021-08-24 苏州浪潮智能科技有限公司 一种安全散列算法的实现方法、系统、介质及设备

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CAI BINGQING, BAI GUO-QIANG: "Implementation of Pipeline Structure of SM3 Algorithm on FPGA", WEIDIANZIXU YU JISUANJI - MICROELECTRONICS AND COMPUTER, WEI DIAN ZI XUE YU JI SUAN JI BIAN JI BU, CN, vol. 32, no. 1, 5 January 2015 (2015-01-05), CN , pages 15 - 18, XP093030462, ISSN: 1000-7180, DOI: 10.19304/j.cnki.issn1000-7180.2015.01.004 *
CHEN BO-YU, HONG WANG: "An optimized realization of SM3 algorithm based on FPGA", XINXI JISHU = INFORMATION TECHNOLOGY, XINXI CHANYEBU DIANZI XINXI ZHONGXIN, CN, 24 July 2018 (2018-07-24), CN , pages 143 - 147, XP093030461, ISSN: 1009-2552, DOI: 10.13274/j.cnki.hdzj.2018.07.032 *
MIAO JIA: "Hardware Design and Implementation of Secure Hash Algorithms SM3/SHA256/SHA3", CHINESE SELECTED DOCTORAL DISSERTATIONS AND MASTER'S THESES FULL-TEXT DATABASES (MASTER), INFORMATION SCIENCE AND TECHNOLOGY, 15 April 2020 (2020-04-15), XP093030460, [retrieved on 20230309] *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116305192A (zh) * 2023-02-07 2023-06-23 成都海泰方圆科技有限公司 数据文件的处理方法、装置、电子设备及存储介质
CN116305192B (zh) * 2023-02-07 2023-11-14 成都海泰方圆科技有限公司 数据文件的处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN113300831A (zh) 2021-08-24
CN113300831B (zh) 2021-10-29

Similar Documents

Publication Publication Date Title
WO2023005083A1 (zh) 一种安全散列算法的实现方法、系统、介质及设备
CN111464308B (zh) 一种实现多种哈希算法可重构的方法和系统
KR102137956B1 (ko) 블록 마이닝 방법 및 장치
US20020032551A1 (en) Systems and methods for implementing hash algorithms
McEvoy et al. Differential power analysis of HMAC based on SHA-2, and countermeasures
Mancillas-López et al. Reconfigurable hardware implementations of tweakable enciphering schemes
Rote et al. High performance SHA-2 core using the round pipelined technique
Zamanov et al. ASIC-resistant hash functions
Atiwa et al. Accelerated hardware implementation of blake2 cryptographic hash for blockchain
CN116318660B (zh) 一种消息扩展与压缩方法及相关装置
Sideris et al. Hardware acceleration of SHA-256 algorithm using NIOS-II processor
Dogan et al. Analyzing and comparing the AES architectures for their power consumption
Mihaljevic et al. A family of fast dedicated one-way hash functions based on linear cellular automata over GF (q)
Zhang et al. Optimization of area and delay for implementation of the composite field advanced encryption standard S-box
Saravanan et al. Theoretical survey on secure hash functions and issues
Noaman A VHDL model for implementation of MD5 hash algorithm
Walker et al. A skein-512 hardware implementation
Mohamed et al. SHA-2 hardware core for virtex-5 FPGA
AbuRass et al. Performance Evaluation of AES algorithm on Supercomputer IMAN1
Naito et al. LM-DAE: low-memory deterministic authenticated encryption for 128-bit security
CN113630236A (zh) 一种sm3的数据加密方法及相关装置
Banik Cryptanalysis of draco
Wang et al. The design and realization of the single-block hash function for the short message
Soni et al. Secure and efficient integrity algorithm based on existing SHA algorithms
US11956345B2 (en) DPA-resistant key derivation function

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21951655

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE