Movatterモバイル変換


[0]ホーム

URL:


CN112398641A - Application method of AES encryption algorithm on encryption chip - Google Patents

Application method of AES encryption algorithm on encryption chip
Download PDF

Info

Publication number
CN112398641A
CN112398641ACN202011282787.7ACN202011282787ACN112398641ACN 112398641 ACN112398641 ACN 112398641ACN 202011282787 ACN202011282787 ACN 202011282787ACN 112398641 ACN112398641 ACN 112398641A
Authority
CN
China
Prior art keywords
chip
value
key
encryption
steps
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
CN202011282787.7A
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 Guiyao Information Technology Co ltd
Original Assignee
Shanghai Guiyao Information Technology 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 Guiyao Information Technology Co ltdfiledCriticalShanghai Guiyao Information Technology Co ltd
Priority to CN202011282787.7ApriorityCriticalpatent/CN112398641A/en
Publication of CN112398641ApublicationCriticalpatent/CN112398641A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention discloses an application method of an AES encryption algorithm on an encryption chip, which comprises the following steps: s1, obtaining a fuse value and a trimming value of a chip; s2, setting an AES encryption algorithm; s3, setting an image anti-interference encryption algorithm; s4, setting an encryption algorithm for preventing the code from being maliciously tampered; s5, taking the fuse wire value and the trimming value as parameters of the algorithms in S2, S3 and S4, and calculating the key of the chip by using the algorithms in S2, S3 and S4, wherein the key of the chip is unique; s6, writing the fuse value, the trimming value and the secret key of the chip into the chip. The invention adjusts the parameters of the chip algorithm by writing the trimming value and the fuse value of the chip into the chip, because the trimming value and the fuse value of each chip have slight difference in the actual production process, the trimming value and the fuse value are written into the chip as the parameters of the calculation key algorithm, thereby ensuring the uniqueness of the key of the chip and improving the safety and reliability of the chip during encryption.

Description

Application method of AES encryption algorithm on encryption chip
Technical Field
The invention belongs to the technical field of encryption algorithms, and particularly relates to an application method of an AES (advanced encryption standard) encryption algorithm on an encryption chip.
Background
The basic process of data encryption is to process the original file or data in plain text according to a certain algorithm to make it become an unreadable segment of code as "ciphertext", so that the original content can be displayed only after inputting the corresponding key, and the purpose of protecting the data from being stolen and read by an illegal person is achieved through the way. The reverse process of the process is decryption, i.e. the process of converting the encoded information into the original data), however, various methods based on the AES encryption algorithm applied to the encryption chip in the market still have various problems.
As disclosed in the publication No. CN109376543A, the AES-based database encryption method, although it is implemented to set the encryption strength, the key length, and the key period according to the data attributes by using the AES algorithm, does not solve the problems of the existing AES-based application method of the encryption algorithm to the encryption chip: the chip is not convenient to encrypt by utilizing the trimming value and the fuse wire value of the chip, the safety and the reliability of the chip are reduced, in addition, when the chip is encrypted, the operation speed of the chip is reduced, the image is not convenient to resist interference, and the code cannot be effectively prevented from being maliciously tampered, so that an application method based on an AES encryption algorithm on the encryption chip is provided.
Disclosure of Invention
The invention aims to provide an application method of an encryption chip based on an AES encryption algorithm, so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: an application method based on an AES encryption algorithm on an encryption chip comprises the following steps:
s1, obtaining a fuse value and a trimming value of a chip;
s2, setting an AES encryption algorithm;
s3, setting an image anti-interference encryption algorithm;
s4, setting an encryption algorithm for preventing the code from being maliciously tampered;
s5, taking the fuse wire value and the trimming value as parameters of the algorithms in S2, S3 and S4, and calculating the key of the chip by using the algorithms in S2, S3 and S4, wherein the key of the chip is unique;
s6, writing the fuse value, the trimming value and the secret key of the chip into the chip.
Preferably, the trimming value in S1 is the trimming value of the current, voltage or resistance of the analog circuit of the chip during the test, and the trimming value of the chip is unique, wherein the analog circuit includes one or more of LDO, BRG or OSC circuits.
Preferably, the fuse value in S1 is a fuse value of a fuse in a chip, and the fuse value is obtained in a test process, and the fuse value of the chip is unique.
Preferably, the setting of the AES encryption algorithm in S2 includes the steps of:
s21, performing round key addition on the input plaintext according to the input initial key to obtain an initial ciphertext;
s22, round key processing is carried out according to the initial key to obtain a first key, wherein the round key processing has N clock cycles, and each clock cycle corresponds to M rounds of key generation operation;
s23, performing first encryption processing according to the initial ciphertext to obtain a first ciphertext, wherein the first encryption processing has N clock cycles, and each clock cycle corresponds to M times of circulative iterative operation;
and S24, carrying out second encryption processing according to the first ciphertext and the first key to obtain a final ciphertext corresponding to the plaintext.
Preferably, the step of setting the image anti-interference encryption algorithm in S3 includes the following steps:
s31, constructing an original handwriting volume data set and preprocessing an image;
s32, encrypting the original handwriting volume data set by using an image encryption technology based on matrix transformation to construct encrypted data;
s33, constructing a generating type confrontation network and training by utilizing an original data set, wherein the network comprises a generator and a discriminator;
s34, constructing a convolutional neural network and respectively training by using an original data set and an encrypted data set;
s35, label prediction of handwritten image data is conducted on the basis of the trained convolutional neural network and the generating countermeasure network.
Preferably, in S31, a handwritten digital image data set and a label set including different writing situations and writing habits are created, the data set is preprocessed, the preprocessing process is to graye the color image, the graying is performed by a three-component weighted average method, and the grayscale image is normalized to a uniform size.
Preferably, in S32, an encryption matrix is constructed by using an image encryption technique based on matrix transformation, and the original handwriting volume data set is encrypted, so that the size of the encrypted image matrix is consistent with the size of the original image matrix, thereby obtaining an encrypted data set.
Preferably, in S34, a seven-layer convolutional neural network is constructed, where the network includes an input layer, two convolutional layers, two pooling layers, a full-link layer, and an output layer, the original data set and the encrypted data set are input during training, after basic parameters and specifications of the network are set, a fixed number of samples are selected and input into the convolutional neural network each time, an actual label of the training sample can be obtained at the output layer, the actual output is compared with the label to obtain a residual error, and the network weight and bias are adjusted by combining a back propagation algorithm.
Preferably, the step of setting an encryption algorithm for preventing the code from being maliciously tampered in S4 includes the following steps:
s41, dividing original system software into a boot program and an application program;
s42, modifying the original project entry address to other positions in the flash, and placing the boot program at the beginning of the flash;
s43, compiling an original project to obtain an executable binary code, and respectively programming the boot program and the application program into a flash of a main control chip;
and S44, judging whether the system needs to be upgraded or not by the boot program, executing the application program if the system does not need to be upgraded, and entering the upgrading program if the system needs to be upgraded.
Preferably, the step S44 includes the following steps:
modifying the application program, increasing read-write operation on the main control chip which can not be programmed, and testing the robustness of a new application program;
encrypting the application program by using an encryption algorithm corresponding to the decryption algorithm of the boot program;
thirdly, the encrypted application program is placed on a network server for downloading by an embedded system;
step four, the embedded system is electrified and detects that a new version which can be upgraded exists, then the embedded system enters the upgrading process of the boot program, and a code which is put on the network server is downloaded;
fifthly, the boot program decrypts the downloaded encrypted application program codes, and the decrypted application program codes are firstly put into an RAM (random access memory) so as to be convenient for being written into a flash for preparation in the next step;
and step six, burning the source code of the decrypted application program into the flash of the main control chip by the boot program.
Compared with the prior art, the invention has the beneficial effects that:
(1) the invention adjusts the parameters of the chip algorithm by writing the trimming value and the fuse value of the chip into the chip, because the trimming value and the fuse value of each chip have slight difference in the actual production process, the trimming value and the fuse value are written into the chip as the parameters of the calculation key algorithm, thereby ensuring the uniqueness of the key of the chip and improving the safety and reliability of the chip during encryption.
(2) The AES encryption algorithm provided by the invention can greatly reduce the clock period consumed by a complete AES encryption algorithm flow by finishing at least two iterations in the AES encryption algorithm flow in one clock period, thereby greatly improving the operation speed of a single AES operation unit.
(3) The anti-interference image encryption algorithm provided by the invention is used for constructing and preprocessing handwritten image data, encrypting the handwritten image data by using the encryption algorithm, constructing and training a generating type countermeasure network and a convolutional neural network, and realizing the judgment of an interfered image through label prediction.
(4) The encryption algorithm for preventing the code from being maliciously tampered is arranged in the invention, and the code is encrypted and protected through the RSA algorithm, so that the code can be effectively prevented from being maliciously tampered, and the function of protecting the system per se is realized.
Drawings
FIG. 1 is a block flow diagram of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present invention provides a technical solution: an application method based on an AES encryption algorithm on an encryption chip comprises the following steps:
s1, obtaining a fuse value and a trimming value of a chip;
s2, setting an AES encryption algorithm;
s3, setting an image anti-interference encryption algorithm;
s4, setting an encryption algorithm for preventing the code from being maliciously tampered;
s5, taking the fuse wire value and the trimming value as parameters of the algorithms in S2, S3 and S4, and calculating the key of the chip by using the algorithms in S2, S3 and S4, wherein the key of the chip is unique;
s6, writing the fuse value, the trimming value and the secret key of the chip into the chip.
In this embodiment, preferably, the trimming value in S1 is a trimming value of a current, a voltage, or a resistance of an analog circuit of the chip during the test, and the trimming value of the chip is unique, where the analog circuit includes one or more of an LDO circuit, a BRG circuit, or an OSC circuit.
In this embodiment, preferably, the fuse value in S1 is a fuse value of a fuse in a chip, and the fuse value is obtained in a test process, and the fuse value of the chip is unique.
In this embodiment, preferably, the setting of the AES encryption algorithm in S2 includes the following steps:
s21, performing round key addition on the input plaintext according to the input initial key to obtain an initial ciphertext;
s22, round key processing is carried out according to the initial key to obtain a first key, wherein the round key processing has N clock cycles, and each clock cycle corresponds to M rounds of key generation operation;
s23, performing first encryption processing according to the initial ciphertext to obtain a first ciphertext, wherein the first encryption processing has N clock cycles, and each clock cycle corresponds to M times of circulative iterative operation;
and S24, carrying out second encryption processing according to the first ciphertext and the first key to obtain a final ciphertext corresponding to the plaintext.
In this embodiment, preferably, the setting of the image anti-interference encryption algorithm in S3 includes the following steps:
s31, constructing an original handwriting volume data set and preprocessing an image;
s32, encrypting the original handwriting volume data set by using an image encryption technology based on matrix transformation to construct encrypted data;
s33, constructing a generating type confrontation network and training by utilizing an original data set, wherein the network comprises a generator and a discriminator;
s34, constructing a convolutional neural network and respectively training by using an original data set and an encrypted data set;
s35, label prediction of handwritten image data is conducted on the basis of the trained convolutional neural network and the generating countermeasure network.
In this embodiment, in S31, it is preferable that a handwritten digital image data set and a label set including different writing situations and writing habits are created, the data set is preprocessed, the preprocessing process includes graying the color image, the graying is performed by a three-component weighted average method, and the grayscale image is normalized to a uniform size.
In this embodiment, in S32, it is preferable that an encryption matrix is constructed by using an image encryption technique based on matrix transformation, and the original handwritten volume data set is encrypted, so that the size of the encrypted image matrix is the same as the size of the original image matrix, and an encrypted data set is obtained.
In this embodiment, preferably, in S34, a seven-layer convolutional neural network is constructed, where the network includes an input layer, two convolutional layers, two pooling layers, a full-link layer, and an output layer, the original data set and the encrypted data set are input during training, after basic parameters and specification of the network are set, a fixed number of samples are selected and input into the convolutional neural network each time, an actual label of the training sample can be obtained at the output layer, the actual output is compared with the label to obtain a residual error, and the network weight and bias are adjusted by combining a back propagation algorithm.
In this embodiment, preferably, the setting of the encryption algorithm for preventing the code from being maliciously tampered in S4 includes the following steps:
s41, dividing original system software into a boot program and an application program;
s42, modifying the original project entry address to other positions in the flash, and placing the boot program at the beginning of the flash;
s43, compiling an original project to obtain an executable binary code, and respectively programming the boot program and the application program into a flash of a main control chip;
and S44, judging whether the system needs to be upgraded or not by the boot program, executing the application program if the system does not need to be upgraded, and entering the upgrading program if the system needs to be upgraded.
In this embodiment, preferably, the step S44 includes the following steps:
modifying the application program, increasing read-write operation on the main control chip which can not be programmed, and testing the robustness of a new application program;
encrypting the application program by using an encryption algorithm corresponding to the decryption algorithm of the boot program;
thirdly, the encrypted application program is placed on a network server for downloading by an embedded system;
step four, the embedded system is electrified and detects that a new version which can be upgraded exists, then the embedded system enters the upgrading process of the boot program, and a code which is put on the network server is downloaded;
fifthly, the boot program decrypts the downloaded encrypted application program codes, and the decrypted application program codes are firstly put into an RAM (random access memory) so as to be convenient for being written into a flash for preparation in the next step;
and step six, burning the source code of the decrypted application program into the flash of the main control chip by the boot program.
The working principle and the advantages of the invention are as follows: the parameters of the chip algorithm are adjusted by writing the trimming value and the fuse value of the chip into the chip, and because the trimming value and the fuse value of each chip have slight difference in the actual production process, the trimming value and the fuse value are written into the chip as the parameters of the calculation key algorithm, so that the uniqueness of the key of the chip is ensured, and the safety and reliability of the chip during encryption are improved; the AES encryption algorithm provided by the invention can greatly reduce the clock period consumed by a complete AES encryption algorithm flow by finishing at least two iterations in the AES encryption algorithm flow within one clock period, thereby greatly improving the operation speed of a single AES operation unit; the anti-interference image encryption algorithm provided by the invention is used for constructing and preprocessing handwritten image data, encrypting the handwritten image data by using the encryption algorithm, constructing and training a generating type countermeasure network and a convolutional neural network, and realizing the judgment of an interfered image through label prediction; the encryption algorithm for preventing the code from being maliciously tampered is arranged in the invention, and the code is encrypted and protected through the RSA algorithm, so that the code can be effectively prevented from being maliciously tampered, and the function of protecting the system per se is realized.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (10)

CN202011282787.7A2020-11-172020-11-17Application method of AES encryption algorithm on encryption chipPendingCN112398641A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202011282787.7ACN112398641A (en)2020-11-172020-11-17Application method of AES encryption algorithm on encryption chip

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202011282787.7ACN112398641A (en)2020-11-172020-11-17Application method of AES encryption algorithm on encryption chip

Publications (1)

Publication NumberPublication Date
CN112398641Atrue CN112398641A (en)2021-02-23

Family

ID=74599955

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202011282787.7APendingCN112398641A (en)2020-11-172020-11-17Application method of AES encryption algorithm on encryption chip

Country Status (1)

CountryLink
CN (1)CN112398641A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106991340A (en)*2017-03-172017-07-28广州小微电子技术有限公司Chip encryption method
CN107784226A (en)*2016-08-252018-03-09大连楼兰科技股份有限公司 Method and system for preventing malicious tampering of codes by using asymmetric encryption algorithm
CN109379180A (en)*2018-12-202019-02-22湖南国科微电子股份有限公司Aes algorithm implementation method, device and solid state hard disk
CN111726472A (en)*2020-05-062020-09-29浙江工业大学 An Image Anti-jamming Method Based on Encryption Algorithm

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107784226A (en)*2016-08-252018-03-09大连楼兰科技股份有限公司 Method and system for preventing malicious tampering of codes by using asymmetric encryption algorithm
CN106991340A (en)*2017-03-172017-07-28广州小微电子技术有限公司Chip encryption method
CN109379180A (en)*2018-12-202019-02-22湖南国科微电子股份有限公司Aes algorithm implementation method, device and solid state hard disk
CN111726472A (en)*2020-05-062020-09-29浙江工业大学 An Image Anti-jamming Method Based on Encryption Algorithm

Similar Documents

PublicationPublication DateTitle
CN102640450B (en)Security token is distributed to method, the method for handling safety token, the security token of key
CN108304698A (en)Product licenses method, apparatus, computer equipment and storage medium
US11502846B2 (en)Whitebox computation of keyed message authentication codes
CN107908948B (en) A fingerprint generation method for Android APP devices applied to security risk control
US9065635B2 (en)Information processing apparatus, IC chip, and information processing method
US8347109B2 (en)Secure serial number generation
CN107947917A (en)A kind of method and device for generating whitepack key
CN112787971A (en)Construction method of side channel attack model, password attack equipment and computer storage medium
CN116933222B (en)Three-dimensional model copyright authentication method and system based on zero watermark
JP2024536063A (en) Artificial intelligence quantum-resistant encryption method and device
CN110210211A (en)A kind of method of data protection and calculate equipment
CN113329004A (en)Authentication method, system and device
KR20190112959A (en)Operating method for machine learning model using encrypted data and apparatus based on machine learning model
CN108416224A (en)A kind of data encryption/decryption method and device
CN111597521B (en)Method and system for safely processing data of mobile terminal of transformer substation
CN119544217B (en)Digital watermark encryption and tracing method and system based on national encryption algorithm
CN109840574B (en)Two-dimensional code information hiding method and device, electronic equipment and storage medium
CN103544511A (en)Anti-counterfeiting identification
CN112398641A (en)Application method of AES encryption algorithm on encryption chip
CN111523885B (en)Encryption multi-account construction method for blockchain wallet, computer readable storage medium and blockchain encryption multi-account wallet
CN109802962B (en)Encryption and decryption method in block chain technology
CN118364517A (en)Block chain-based sales contract certification method and system
CN112559983A (en)Software security reinforcing method and device, electronic equipment and storage medium
CN117763578A (en)Data tamper-proof system and method for financial audit
CN109409115A (en)A kind of encryption and decryption method and relevant apparatus

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20210223


[8]ページ先頭

©2009-2025 Movatter.jp