CN105743636A - Method for realizing cipher algorithm - Google Patents

Method for realizing cipher algorithm Download PDF

Info

Publication number
CN105743636A
CN105743636A CN201410763799.XA CN201410763799A CN105743636A CN 105743636 A CN105743636 A CN 105743636A CN 201410763799 A CN201410763799 A CN 201410763799A CN 105743636 A CN105743636 A CN 105743636A
Authority
CN
China
Prior art keywords
data
software
hardware
group
write
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201410763799.XA
Other languages
Chinese (zh)
Inventor
吴鹏飞
刘玉兵
王永生
赵懿海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Huahong Integrated Circuit Co Ltd
Original Assignee
Shanghai Huahong Integrated Circuit Co Ltd
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 Shanghai Huahong Integrated Circuit Co Ltd filed Critical Shanghai Huahong Integrated Circuit Co Ltd
Priority to CN201410763799.XA priority Critical patent/CN105743636A/en
Publication of CN105743636A publication Critical patent/CN105743636A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention discloses a method for realizing a high-speed cipher algorithm. The method comprises the following steps: step one, additionally adding one group or multiple groups of data registers in a cipher algorithm module; step two, when data in any one group or any groups of the data registers meets operation conditions, hardware automatically starting operation; and step three, at the time when the hardware calculates one group of the data registers, software writing the data into other groups of data registers. According to the invention, the time of waiting for the software to write the data can be reduced or eliminated, and the computation can be completed more rapidly.

Description

The method realizing cryptographic algorithm
Technical field
The present invention relates to field of cryptography, particularly relate to a kind of method realizing high speed password algorithm.
Background technology
In the current information age, a large amount of sensitive informations such as court records, proprietary documents, software source code, bank transaction, insurance document etc. swap often through public communication infrastructure or computer network, in order to ensure the privacy of these information, integrity, verity etc., it is necessary to use cryptographic algorithm that raw information is processed.
Cryptographic algorithm is the mathematical function for encrypting and deciphering, for the safety of guarantee information, it is provided that discriminating, integrity, resisting denying etc. service, and existing cryptographic algorithm is broadly divided into symmetric key algorithm, asymmetric key algorithm and hash algorithm three major types.Symmetric key algorithm is also known as secret-key algorithm, and its encryption key is identical with decruption key, or is substantially the same, and is prone to release another from one.The safety of symmetric key algorithm depends on the secrecy to key, and leakage key means that anyone the message deciphering that they can be sent or receive, so the confidentiality of key is most important.Asymmetric key algorithm is also known as public key algorithm, and public key algorithm uses a key to be encrypted, and is decrypted with another key;Wherein encryption key can disclose, and also known as public-key cryptography, is called for short PKI, and decruption key must maintain secrecy, and also known as private key, is called for short private key.Hash algorithm does not need key, but by hash (" hash " or title " Hash ") function, the message Iteration Contraction of random length is become the eap-message digest of regular length, and this Iteration Contraction process is unidirectional, in order to guarantee message integrity.
Fig. 1 is existing conventional cipher algorithm flow chart.In traditional process realizing cryptographic algorithm, before cryptographic algorithm module arithmetic, write key, data and other relevant configured parameters firstly the need of software;Then software starts hardware and starts computing, and after these group data current complete etc. hardware computation are stopped, software could write next group data, and software is restarted hardware and started computing, so circulates, until having calculated all of data;Running it can be seen that this method is software and hardware serial, after only hardware has calculated these group data current, software could write next group data, wastes the time of more wait software write data.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method realizing high speed password algorithm, it is possible to reduces or eliminates the time waiting software write data, completing computing faster.
For solving above-mentioned technical problem, the method realizing high speed password algorithm of the present invention, comprise the steps:
Step 1, extra one or more groups data register of increase in cryptographic algorithm module;
Step 2, after the data in any one group or multi-group data depositor meet calculation condition (such as length etc.), hardware starts computing automatically;
Step 3, when hardware is while computing one of which data register, is organized write data in data register by software to other.
Further, it is additionally included in step 1, additionally increases one or more groups cipher key register in cryptographic algorithm module.
The present invention is by increasing by one group of data register, these group data current for hardware computation and software are write next group data relatively independent, allow the data in one group of data register while participating in hardware computation, software is organizing data register write data toward another, after these group data current complete etc. hardware computation, software or write or be currently written into next organize calculative data, no matter it is any situation, can greatly reduce or eliminate the time waiting software write data, improve hardware utilization fully, thus decreasing the operation time of entirety, therefore, it is possible to complete computing faster.
Other advantages of the present invention, purpose and feature will partly illustrate in the description that follows, and for those of ordinary skills, partial content will be made apparent from when examining following content, or can be learnt by the practice of the present invention.Utilize the structure specifically noted in written description and claim and accompanying drawing thereof, it is possible to achieve with reach the purpose of the present invention and other advantages.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is further detailed explanation with detailed description of the invention:
Fig. 1 is existing cryptographic algorithm flow chart;
Fig. 2 is the described flow chart realizing high speed password algorithm;
Fig. 3 is the flow chart realizing high speed SM3 hash algorithm.
Detailed description of the invention
Shown in Fig. 2, the described method realizing high speed password algorithm is as follows:
Step 1, increases one or more groups data register to cryptographic algorithm module.
Step 2, the relevant configured parameter of write cryptographic algorithm module.
Step 3, the key of write cryptographic algorithm module.
Step 4, writes first group of testing data B(0), hardware starts computing automatically, and namely hardware calculates grouped data B(i), i=0.While hardware computation, software continue to write next group testing data toward another group data register.
Step 5, it is judged that whether software writes grouped data B(i+1), if so, then perform step 6, otherwise hardware stops calculatings, and wait software writes grouped data B(i+1)
Step 6, hardware calculates grouped data B(i+1), i=i+1.
Step 7, it is judged that whether hardware has calculated last grouped data, if so, then performs step 8, otherwise returns step 5.
Step 8, terminates this computing.
If hardware has calculated one group of data, to write one group of data than software fast, then software is but without writing next group data after having calculated these group data current for hardware, and therefore hardware needs to be stopped for after software writes next group data self-starting again and calculates;Otherwise, if hardware has calculated one group of data, to write one group of data than software slow, so hardware is but without having calculated these group data current when writing next group data for software, and therefore software needs to be stopped for hardware and calculated currently write data again after these group data.
Repetitive cycling step 5 and step 6, until all testing data computings are complete.
Carry out the principle realizing high speed password algorithmic method below illustrating:
Realizing the core concept of the method for high speed password algorithm is software is write data and hardware computation is relatively independent, and therefore software writes one group of data and the complete one group of data of hardware computation exist speed speed problem, is divided into two kinds of situations here:
The first situation be software write one group of data than hardware computation complete one group of data slow, after complete these group data current of hardware computation, software is but without writing next group data, hardware needs to be stopped for after software writes next group data self-starting again and calculates, and therefore decreases the time waiting software write data;
The second situation be software write one group of data than hardware computation complete one group of data fast, software write next group data after hardware but without complete these group data current of computing, therefore software needs to be stopped for after complete these group data current of hardware computation write data again, it is thus eliminated that wait the time of software write data.
Shown in Fig. 3, the embodiment that realize high speed SM3 hash algorithm being presented herein below, concrete implementation flow process is as follows:
Step one, is filled with the origination message m that length is L bit, obtains the filling message m of the extension of n times that length is 512 bits '.
Step 2, will the filling message m of extension ' it is divided into the message packet of n 512 bit lengths, i.e. m '=B(0)…B(n-1)
Step 3, write SM3 hash algorithm module relevant configured parameter and first message packet B(0)
Step 4, hardware starts calculating automatically, and namely hardware calculates packet packet B(i), i=0.While hardware computation, continue toward the next message packet B of another group data register write software(i)
Step 5, it is judged that whether software writes message packet B(i+1).At the complete current message packet B of hardware computation(i)After, if software has write next message packet B(i+1), hardware will continue computing message packet B(i+1)And do not stop;If software does not write next message packet B(i+1), hardware will temporarily cease computing, wait software to write next message packet B(i+1)After self-starting computing again.
Step 6, repeats step 5, until all message packet B(0)~B(n-1)Computing is complete.
Step 7, terminates this hash computing and reads the digest value of message m from summary depositor.
Above by detailed description of the invention, the present invention is described in detail, but these have not been construed as limiting the invention.Without departing from the principles of the present invention, those skilled in the art it may also be made that many deformation and improvement, and these also should be regarded as protection scope of the present invention.

Claims (2)

1. the method realizing cryptographic algorithm, it is characterised in that:
Step 1, additionally increases one or more groups data register in cryptographic algorithm module;
Step 2, after the data in any one group or multi-group data depositor meet calculation condition, hardware starts computing automatically;
Step 3, when hardware is while computing one of which data register, is organized write data in data register by software to other.
2. the method for claim 1, it is characterised in that: it is additionally included in step 1, additionally increases one or more groups cipher key register in cryptographic algorithm module.
CN201410763799.XA 2014-12-11 2014-12-11 Method for realizing cipher algorithm Pending CN105743636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410763799.XA CN105743636A (en) 2014-12-11 2014-12-11 Method for realizing cipher algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410763799.XA CN105743636A (en) 2014-12-11 2014-12-11 Method for realizing cipher algorithm

Publications (1)

Publication Number Publication Date
CN105743636A true CN105743636A (en) 2016-07-06

Family

ID=56241200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410763799.XA Pending CN105743636A (en) 2014-12-11 2014-12-11 Method for realizing cipher algorithm

Country Status (1)

Country Link
CN (1) CN105743636A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090214026A1 (en) * 2008-02-27 2009-08-27 Shay Gueron Method and apparatus for optimizing advanced encryption standard (aes) encryption and decryption in parallel modes of operation
EP2259488A1 (en) * 2008-03-25 2010-12-08 Mitsubishi Electric Corporation Encryption operation device, encryption operation program, and recording medium
CN102752107A (en) * 2011-04-19 2012-10-24 中国科学院微电子研究所 Device and method for encrypting/decrypting RC4
CN103249037A (en) * 2012-02-01 2013-08-14 英特尔移动通信有限责任公司 Low-power multi-standard cryptography processing units with common flip-flop/register banks
CN103427981A (en) * 2012-05-15 2013-12-04 北京华虹集成电路设计有限责任公司 Encryption and decryption achieving method and device
CN103546261A (en) * 2012-07-10 2014-01-29 中国矿业大学(北京) Micro-seismic wireless high-speed transmission system applied to security field

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090214026A1 (en) * 2008-02-27 2009-08-27 Shay Gueron Method and apparatus for optimizing advanced encryption standard (aes) encryption and decryption in parallel modes of operation
CN101520966A (en) * 2008-02-27 2009-09-02 英特尔公司 Method and apparatus for optimizing advanced encryption standard encryption and decryption in parallel modes of operation
EP2259488A1 (en) * 2008-03-25 2010-12-08 Mitsubishi Electric Corporation Encryption operation device, encryption operation program, and recording medium
CN102752107A (en) * 2011-04-19 2012-10-24 中国科学院微电子研究所 Device and method for encrypting/decrypting RC4
CN103249037A (en) * 2012-02-01 2013-08-14 英特尔移动通信有限责任公司 Low-power multi-standard cryptography processing units with common flip-flop/register banks
CN103427981A (en) * 2012-05-15 2013-12-04 北京华虹集成电路设计有限责任公司 Encryption and decryption achieving method and device
CN103546261A (en) * 2012-07-10 2014-01-29 中国矿业大学(北京) Micro-seismic wireless high-speed transmission system applied to security field

Similar Documents

Publication Publication Date Title
US10904231B2 (en) Encryption using multi-level encryption key derivation
US9537657B1 (en) Multipart authenticated encryption
WO2020238694A1 (en) Key management method and related device
US11184164B2 (en) Secure crypto system attributes
US20140281486A1 (en) Community-based de-duplication for encrypted data
US9274979B2 (en) System, method, and computer program product for optimizing data encryption and decryption by implementing asymmetric AES-CBC channels
US8880879B2 (en) Accelerated cryptography with an encryption attribute
EP3322119A1 (en) Data processing method and apparatus
CN102904712A (en) Information encrypting method
US20180091301A1 (en) Method and system for switching public keys in ciphertexts
US11431489B2 (en) Encryption processing system and encryption processing method
WO2022227317A1 (en) Blockchain-based resource transfer method and apparatus, electronic device, and storage medium
CN109005184A (en) File encrypting method and device, storage medium, terminal
CN114186264A (en) Data random encryption and decryption method, device and system
WO2023046207A1 (en) Data transmission method and apparatus, and non-volatile computer-readable storage medium
WO2020253380A1 (en) Data encryption method and apparatus, and terminal device
CN104243137A (en) Data processing system and method of initializing a data processing system
WO2022121607A1 (en) Data processing method and apparatus
CN111555880B (en) Data collision method and device, storage medium and electronic equipment
CN107425959A (en) A kind of method for realizing encryption, system, client and service end
CN110213050A (en) Key generation method, device and storage medium
WO2018102382A1 (en) Method and system for switching public keys in ciphertexts
WO2023093278A1 (en) Digital signature thresholding method and apparatus
US20220345292A1 (en) Method and device for encryption of video stream, communication equipment, and storage medium
CN116155491A (en) Symmetric key synchronization method of security chip and security chip device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160706