CN109327276A - Secure coding method, coding/decoding method and equipment - Google Patents

Secure coding method, coding/decoding method and equipment Download PDF

Info

Publication number
CN109327276A
CN109327276A CN201710642284.8A CN201710642284A CN109327276A CN 109327276 A CN109327276 A CN 109327276A CN 201710642284 A CN201710642284 A CN 201710642284A CN 109327276 A CN109327276 A CN 109327276A
Authority
CN
China
Prior art keywords
ciphertext
talk
encoder
cross
data
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.)
Granted
Application number
CN201710642284.8A
Other languages
Chinese (zh)
Other versions
CN109327276B (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710642284.8A priority Critical patent/CN109327276B/en
Priority to PCT/CN2018/090876 priority patent/WO2019024607A1/en
Publication of CN109327276A publication Critical patent/CN109327276A/en
Application granted granted Critical
Publication of CN109327276B publication Critical patent/CN109327276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0059Convolutional codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0067Rate matching
    • H04L1/0068Rate matching by puncturing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0071Use of interleaving
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

A kind of secure coding method, coding/decoding method and equipment.This method comprises: during one Encryption Algorithm of application executes n wheel cryptographic operation to plaintext, coded treatment is executed by the first encoder in at least one wheel cryptographic operation after at least one wheel cryptographic operation in n wheel cryptographic operation and/or in n wheel cryptographic operation, wherein, the code rate of first encoder is that 1, n is integer greater than 1;The ciphertext obtained after cryptographic operation is taken turns to above-mentioned n by second encoder and executes coded treatment, obtains coding result, and the code rate of second encoder is greater than 1.The embodiment of the present application provides a kind of lightweight secure coding schemes, it can be under the premise of taking into account the safety of safe coding algorithm, the lower Encryption Algorithm of complexity and the lower encryption algorithm of complexity is selected to combine, realize that a kind of safe coding algorithm of low complex degree, the safe coding algorithm of this low complex degree are suitable for the Internet of Things application of lightweight.

Description

Secure coding method, coding/decoding method and equipment
Technical field
The invention relates to technical field of communication safety and comprising, in particular to a kind of secure coding method, coding/decoding method and Equipment.
Background technique
Coding, which refers to, is introduced into redundant data in the data of transmission to avoid data from going wrong in transmission process.Encryption Refer to and original information data is changed with certain special algorithm.Under normal conditions, transmission data be required to execute coding with Encrypt two steps.In conventional method, cataloged procedure and ciphering process are respectively independent.There are complexity height for conventional method, and The longer problem of processing delay.Based on this, the concept of " safe coding " is proposed, wherein safe coding refers to cryptographic operation It is dissolved into cataloged procedure, or encoding operation is dissolved into ciphering process, so that a step completes the operation of encryption and coding.
In the prior art, it generallys use and selects the mode of the algorithm of high complexity to improve entire safe coding algorithm Safety.For example, the Encryption Algorithm of high complexity and/or the encryption algorithm of high complexity is selected to calculate to improve entire safe coding The safety of method.It illustratively, is the Advanced Encryption Standard (Advanced of 16 bytes (byte) by key length Encryption Standard, AES) algorithm (namely AES-128 algorithm) and low density parity check code (Low Density Parity Check Code, LDPC) encoder combination, to realize the safe coding algorithm of complete set.Since AES-128 is calculated The complexity of method and LDPC encoder is very high, therefore the safe coding that AES-128 algorithm is combined with LDPC encoder is calculated The safety of method is higher.
Specifically, the principle of the safe coding algorithm combined using AES-128 algorithm with LDPC encoder is as follows: adopting With AES-128 algorithm to encrypting in plain text, AES-128 algorithm includes ten wheels in total, wherein every wheel includes byte alternative transforms (namely the transformation of S box), shiftrows, column obscure transformation, InvAddRoundKey converts four steps, by the last of AES-128 algorithm Shiftrows in one wheel replace with the encoding operation executed by LDPC encoder.Wherein, aes algorithm definition has S box, S box For 16 bytes × 16 bytes matrix, for some byte, by its high four as row value, low four are train value, according to above-mentioned Row value and train value search S box, and obtained new byte is that the byte passes through the transformed output of S box.Row shifting function refers to 16 At 4 × 4 matrix, the first row remains unchanged byte align, the second row ring shift left 1, and the third line ring shift left 2, the 4th Row ring shift left 3.Column obscure transformation and refer to each byte in matrix being mapped as new byte by functional transformation.It takes turns close Key adds transformation to be by the key and byte of corresponding position in cipher key matrix and the above-mentioned matrix exported after column obscure transformation Carry out XOR operation.The input of the first round is the plaintext that length is 128 bits (bit), and the input of each round later is last round of Output.LDPC encoder is the equipment by data organization at LDPC code, and LDPC code is a kind of point with sparse check matrix Group error correcting code.In conjunction with reference Figure 1A and Figure 1B, which respectively show the peaces combined using AES-128 algorithm with LDPC encoder The schematic diagram of cataloged procedure involved in full coding algorithm and decoding process.Cataloged procedure is as follows: passing through AES-128 algorithm in plain text Nine wheel encryptions be input to LDPC encoder after the transformation of S box, the data of LDPC encoder output are close using taking turns Key adds transformation, final output ciphertext.Decoding process is the inverse process of cataloged procedure.Decoding process is as follows: take turns to ciphertext close The inverse transformation that key adds, then LDPC decoder is inputted, the data of LDPC decoder output are after the transformation of S box, by nine wheels After the inverse process of AES-128 algorithm, output is in plain text.
In the prior art, the safety of entire safe coding algorithm is improved by the way of the algorithm for selecting high complexity Property, the complexity that this mode will lead to safe coding algorithm is higher, and the higher safe coding algorithm of complexity can not fit Internet of Things application for lightweight.
Summary of the invention
The embodiment of the present application provides a kind of secure coding method, coding/decoding method and equipment, to solve the prior art because The safety that entire safe coding algorithm is improved by the way of the algorithm for selecting high complexity, leads to safe coding algorithm The problem of complexity is higher, is not suitable for the Internet of Things application of lightweight.
On the one hand, the embodiment of the present application provides a kind of secure coding method, this method comprises: applying an Encryption Algorithm pair In plain text during execution n wheel cryptographic operation, add after at least one wheel cryptographic operation in n wheel cryptographic operation and/or in n wheel Coded treatment is executed by the first encoder at least one wheel cryptographic operation in close operation, wherein the code rate of the first encoder For the integer that 1, n is greater than 1;The ciphertext obtained after cryptographic operation is taken turns to n by second encoder and executes coded treatment, is compiled Code is as a result, the code rate of second encoder is greater than 1.
The embodiment of the present application provides a kind of lightweight secure coding schemes.In the embodiment of the present application, in Encryption Algorithm At least one wheel cryptographic operation after and/or at least one wheel cryptographic operation in insertion code rate be 1 the first encoder, with increase plus The error diffusion of close algorithm, improves its safety, to propose a kind of brand-new not by selecting high complexity The mode of algorithm improves the technical solution of the safety of safe coding algorithm.Using technical side provided by the embodiments of the present application Case can select the lower Encryption Algorithm of complexity and complexity under the premise of taking into account the safety of safe coding algorithm Lower encryption algorithm combines, and realizes that a kind of safe coding algorithm of low complex degree, the safe coding of this low complex degree are calculated Method is suitable for the Internet of Things application of lightweight.Further, since being commonly configured with encoder in electronic equipment, the embodiment of the present application is mentioned The secure coding method of confession can directly utilize above-mentioned encoder, without increasing new hardware cost.
In a possible design, the insertion position of the first encoder and/or quantity are variable.Pass through above-mentioned side Formula can further increase the safety of safe coding algorithm.
In a possible design, pass through the first coding after at least one wheel cryptographic operation in n wheel cryptographic operation Device executes coded treatment, specifically includes: being obtained by the first encoder to the i-th wheel cryptographic operation after the i-th wheel cryptographic operation Encrypted result execute coded treatment, wherein i is positive integer less than or equal to n.
In a possible design, pass through the first encoder in at least one wheel cryptographic operation in n wheel cryptographic operation Coded treatment is executed, is specifically included: by the first encoder to j-th after j-th of encrypting step of the i-th wheel cryptographic operation Encrypted result that encrypting step obtains executes coded treatment, wherein the i-th wheel cryptographic operation includes m encrypting step, i for less than Or the positive integer equal to n, m are the integer greater than 1, j is the positive integer less than m.
In a possible design, above-mentioned plaintext includes k cross-talk plaintext, and k is the integer greater than 1.A kind of possible In implementation, the first encoder is used to execute coded treatment respectively to the corresponding k sections of data to be encoded of k cross-talk plaintext.Another In a kind of possible implementation, the first encoder is used for the first convergence data execution coded treatment to be encoded, and first wait compile Code convergence data refer to the data that k cross-talk obtains after corresponding k sections of data to be encoded are connected in plain text.In alternatively possible realization In mode, the first encoder is used to execute coding respectively to the corresponding p sections of data to be encoded of p cross-talk plaintext in k cross-talk plaintext Processing, and coded treatment executed respectively to the convergence data to be encoded of r section second, in above-mentioned r section second convergence data to be encoded Every section of second convergence data to be encoded be by the corresponding k-p in plain text of the k-p cross-talk in k cross-talk plaintext in addition to p cross-talk plaintext The data obtained after at least two sections of data to be encoded series connection in section data to be encoded, p is the positive integer less than or equal to k-2, r For positive integer.
In the embodiment of the present application, block encoding mode, convergence coding mode or hybrid coding can be used in the first encoder Mode, block encoding mode, which has, improves code efficiency, reduces the advantage of time delay, and convergence coding mode, which has, improves error diffusion The advantage of performance, hybrid coding mode can be the combinations of block encoding mode and convergence coding mode.
In a possible design, above-mentioned plaintext include k cross-talk in plain text, above-mentioned ciphertext includes k cross-talk ciphertext, and k sections Sub- ciphertext corresponds respectively to k cross-talk in plain text, and k is the integer greater than 1.N wheel cryptographic operation is obtained by second encoder close Text executes coded treatment, obtains coding result, specifically includes following several possible implementations: in a kind of possible realization side In formula, coded treatment is executed to k cross-talk ciphertext by second encoder respectively, obtains k sections of coding results.Alternatively possible In implementation, coded treatment is executed to the first convergence ciphertext by second encoder, obtains the first convergence coding result, first Convergence ciphertext refers to the data that will be obtained after the series connection of k cross-talk ciphertext.In alternatively possible implementation, pass through the second coding Device executes coded treatment to the q cross-talk ciphertext in k cross-talk ciphertext respectively, obtains q sections of coding results;And pass through second encoder pair S section second converges ciphertext and executes coded treatment respectively, obtains s section second and converges coding result, above-mentioned s section second converges in ciphertext Every section second convergence ciphertext be that at least two cross-talks in the k-q cross-talk ciphertext in k cross-talk ciphertext in addition to q cross-talk ciphertext are close The data obtained after text series connection, q are the positive integer less than or equal to k-2, and s is positive integer.
In the embodiment of the present application, block encoding mode, convergence coding mode or hybrid coding can be used in second encoder Mode, block encoding mode, which has, improves code efficiency, reduces the advantage of time delay, and convergence coding mode, which has, improves error correcting and detecting The advantage of ability, hybrid coding mode can be the combinations of block encoding mode and convergence coding mode.
In a possible design, this method further include: determine following at least one according to the corresponding key of Encryption Algorithm Information: the multinomial of the first encoder, the puncturing patterns of the first encoder, the quantity of the first encoder, the first encoder Insertion position.
In the embodiment of the present application, above- mentioned information are determined according to the corresponding key of Encryption Algorithm at random, are facilitated further Improve safety.
On the other hand, the embodiment of the present application provides a kind of safe coding/decoding method, this method comprises: passing through the second decoder pair Coding result executes decoding process, obtains ciphertext, and coding result is to execute coded treatment to ciphertext by second encoder to obtain , ciphertext executes n wheel cryptographic operation to plaintext using an Encryption Algorithm and obtains, wherein in n wheel cryptographic operation at least Volume is executed by the first encoder in at least one wheel cryptographic operation after one wheel cryptographic operation and/or in n wheel cryptographic operation Code processing, the code rate of second encoder are greater than 1, and it is the integer greater than 1 that the code rate of the first encoder, which is equal to 1, n,;In one solution of application During the n wheel decryption oprerations corresponding with above-mentioned n wheel cryptographic operation to ciphertext execution of close algorithm obtain plaintext, takes turns and decrypt in n Pass through first in at least one wheel decryption oprerations before at least one wheel decryption oprerations in operation and/or in n wheel decryption oprerations Decoder executes decoding process.
In a possible design, pass through the first decoding before at least one wheel decryption oprerations in n wheel decryption oprerations Device executes decoding process, specifically includes: taking turns decryption behaviour to the n-th-i by the first decoder before the n-th-i+1 takes turns decryption oprerations Make obtained decrypted result and execute decoding process, wherein i is the positive integer less than or equal to n.
In a possible design, pass through the first decoder in at least one wheel decryption oprerations in n wheel decryption oprerations Decoding process is executed, is specifically included: by the first decoding before the m-j+1 decryption step of the n-th-i+1 wheel decryption oprerations The decrypted result that device obtains the m-j decryption step of the n-th-i+1 wheel decryption oprerations executes decoding process, wherein the n-th-i+1 Wheel decryption oprerations include m decryption step, and i is the positive integer less than or equal to n, and m is the integer greater than 1, and j is just less than m Integer.
In a possible design, above-mentioned ciphertext includes k cross-talk ciphertext, and k is the integer greater than 1.A kind of possible In implementation, the first decoder executes decoding process for k sections of data to be decoded corresponding to k cross-talk ciphertext respectively.Another In a kind of possible implementation, the first decoder is used for the first convergence data execution decoding process to be decoded, and first wait solve Code convergence data refer to the data that will be obtained after the corresponding k sections of data concatenating to be decoded of k cross-talk ciphertext.In alternatively possible reality In existing mode, the first decoder for executing solution to the corresponding p sections of data to be decoded of p cross-talk ciphertext in k cross-talk ciphertext respectively Code processing, and decoding process, above-mentioned r section second convergence data to be decoded are executed respectively to the convergence data to be decoded of r section second In every section of second convergence data to be decoded be by the corresponding k- of k-p cross-talk ciphertext in k cross-talk ciphertext in addition to p cross-talk ciphertext The data obtained after at least two sections of data concatenatings to be decoded in p sections of data to be decoded, p are the positive integer less than or equal to k-2, R is positive integer.
In a possible design, decoding process is executed to coding result by the second decoder, obtains ciphertext, specifically Including following several possible implementations: in one possible implementation, when coding result includes k sections of coding results When, decoding process is executed to k sections of coding results by the second decoder respectively, obtains k cross-talk ciphertext, k cross-talk ciphertext is right respectively It should be the integer greater than 1 in k sections of coding results, k.In alternatively possible implementation, when coding result is to encode k sections When the first convergence coding result obtained after as a result connecting, the first convergence coding result is executed at decoding by the second decoder Reason, obtains the first convergence ciphertext;First convergence ciphertext is divided into k cross-talk ciphertext, k cross-talk ciphertext corresponds respectively to k sections of codings As a result, k is the integer greater than 1.In alternatively possible implementation, when coding result includes q sections of coding results and s section When two convergence coding results, decoding process is executed to q sections of coding results by the second decoder respectively, obtains q cross-talk ciphertext;And Coding result is converged to s section second by the second decoder and executes decoding process respectively, s section second is obtained and converges ciphertext;By s sections Second convergence ciphertext is divided into k-q cross-talk ciphertext, and above-mentioned s section second converges every section second convergence coding result in coding result It is that will be obtained after at least two sections of coding result series connection in the k-q section coding result in k sections of coding results in addition to q sections of coding results The data arrived, q are the positive integer less than or equal to k-2, and s is positive integer.
On the other hand, the embodiment of the present application provides a kind of electronic equipment, which, which has, realizes above-mentioned safe coding Function in method and/or safe coding/decoding method example.The function can also be executed by hardware realization by hardware Corresponding software realization.The hardware or software include one or more modules corresponding with above-mentioned function or unit.
It include processor and communication interface, the processor quilt in the structure of electronic equipment in a possible design It is configured to that electronic equipment is supported to execute corresponding function in the above method.The communication interface for support electronic equipment with it is other Communication between equipment.Further, electronic equipment can also include memory, and the memory is used to couple with processor, It saves the necessary program instruction of electronic equipment and data.
In another aspect, the embodiment of the present application provides a kind of computer storage medium, for being stored as above-mentioned electronic equipment institute Computer software instructions, it includes for executing program designed by the above method.
Also on the one hand, the embodiment of the present application provides a kind of computer program product, when the computer program product is performed When, it is used to execute secure coding method described in above-mentioned aspect and/or safe coding/decoding method.
Compared to the prior art, the embodiment of the present application provides a kind of lightweight secure coding schemes.Implement in the application In example, insertion code rate is the first of 1 after at least one wheel cryptographic operation of Encryption Algorithm and/or at least one wheel cryptographic operation Encoder improves its safety to increase the error diffusion of Encryption Algorithm, thus propose it is a kind of it is brand-new not by The mode of the algorithm of high complexity is selected to improve the technical solution of the safety of safe coding algorithm.Using the embodiment of the present application The technical solution of offer can select the lower encryption of complexity to calculate under the premise of taking into account the safety of safe coding algorithm Method and the lower encryption algorithm of complexity combine, and realize a kind of safe coding algorithm of low complex degree, this low complex degree Safe coding algorithm be suitable for lightweight Internet of Things application.
Detailed description of the invention
Figure 1A is the schematic diagram for the safe coding process that the prior art provides;
Figure 1B is the schematic diagram for the safe decoding process that the prior art provides;
Fig. 2A is the schematic diagram of the main encryption process of KATAN32 algorithm;
Fig. 2 B is the encryption of KATAN32 algorithm and the schematic diagram of decrypting process;
Fig. 2 C is the structural schematic diagram of an encoder for convolution codes;
Fig. 3 A is the flow chart for the secure coding method that the application one embodiment provides;
Fig. 3 B is the flow chart for the safe coding/decoding method that the application one embodiment provides;
Fig. 4 A is the flow chart for the secure coding method that another embodiment of the application provides;
Fig. 4 B is the flow chart for the safe coding/decoding method that another embodiment of the application provides;
Fig. 4 C is the schematic diagram for the safe coding process that the application one embodiment provides;
Fig. 4 D is the schematic diagram for the safe decoding process that the application one embodiment provides;
Fig. 5 A is the flow chart for the secure coding method that another embodiment of the application provides;
Fig. 5 B is the flow chart for the safe coding/decoding method that another embodiment of the application provides;
Fig. 5 C is the schematic diagram for the safe coding process that another embodiment of the application provides;
Fig. 5 D is the schematic diagram for the safe decoding process that another embodiment of the application provides;
Fig. 6 A is the schematic block diagram for the electronic equipment that the application one embodiment provides;
Fig. 6 B is the structural schematic diagram for the electronic equipment that the application one embodiment provides.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing, to the embodiment of the present application In technical solution be described.
Before the embodiment of the present application is described, first to the invention relates to related algorithm be introduced It is bright.In the embodiment of the present application, explanation is mainly introduced in Encryption Algorithm by taking KATAN algorithm as an example, and encoder is mainly with convolution Explanation is introduced for code coder.KATAN algorithm is a kind of lower Encryption Algorithm of complexity, and encoder for convolution codes is same It is a kind of lower encryption algorithm of complexity.
(1) KATAN algorithm
KATAN algorithm is the block cipher based on nonlinear feedback shift register.KATAN algorithm according to point Group length is divided into KATAN32 algorithm, KATAN48 algorithm and KATAN64 algorithm.Wherein, the block length of KATAN32 algorithm is The block length of 32bits, KATAN48 algorithm is 48bits, and the block length of KATAN64 algorithm is 64bits.
Below with reference to Fig. 2A and Fig. 2 B, KATAN32 algorithm is explained.Wherein, Fig. 2A shows KATAN32 algorithm and relates to And main encryption process schematic diagram, Fig. 2 B shows showing for the encryption round circulation that KATAN32 algorithm is related to and decryption round circulation It is intended to.The ciphering process of KATAN32 algorithm includes 254 wheel cryptographic operations.As 1≤i < 254, Ei is the i-th wheel cryptographic operation Output data will be input to i+1 wheel cryptographic operation and encrypt;As i=254, Ei is the 254th wheel cryptographic operation Output data (namely ciphertext in Fig. 2 B), will be transferred to receiving end.As 1≤i < 254, Di is the i-th wheel decryption oprerations Output data, i+1 wheel decryption oprerations will be input to and be decrypted;As i=254, Di is the 254th wheel decryption oprerations Output data (namely plaintext in Fig. 2 B).
In KATAN32 algorithm, the plaintext of 32bits is divided into two groups, is formulated as follows:
L0[0:12]=P [19:31], R0[0:18]=P [0:18];
Above-mentioned two groups are referred to as L and R.Wherein R includes the preceding 19bits in 32bits plaintext P, and L includes 32bits bright Rear 13bits in literary P.
In the r wheel cryptographic operation of KATAN32 algorithm, it is related to two non-linear transform functions, respectively faAnd fb。 Above-mentioned two non-linear transform function can be indicated using following formula:
Wherein, the value range of r is 1 to 254;IR is the array that length is 254, takes difference for every wheel cryptographic operation The value of position;WithIt is two sub-keys of r wheel cryptographic operation,Refer to logical operation " with or ", " " refers to multiplication Operation.
L and R moves 1 from low bit position to higher bit position direction, and the lowest bit position value of L is using non-linear later Transforming function transformation function fbThe value being calculated, the lowest bit position value of R are using non-linear transform function faThe value being calculated, is adopted It is formulated as follows:
Lr[0]=fb(Rr-1);Rr[0]=fb(Lr-1);
The L and R that 32 ciphertext C are generated by last wheel are formed, and are expressed as follows using formula:
C [0:18]=R254[0:18], C [19:31]=L254[0:12];
Wherein, C [0:18] is first 19 in 32 ciphertext C, and C [19:31] is latter 12 in 32 ciphertext C.
The sub-key being related to below to KATAN32 algorithm is explained.
Sub-key is the array that length is 508, and every obtaining value method can be obtained using following formula:
Wherein, k={ k0,k1,…k79It is 80 master keys, the sub-key in every wheel cryptographic operationWithIt can root Corresponding position is taken from key according to following formula:
(2) convolutional code
Convolutional code is a kind of error control coding.For each of convolutional code yard section comprising n symbol not only with Information word in this yard of section is related, and related with front m sections of information word.In the following, will in conjunction with example to convolutional code into Row explanation.Incorporated by reference to reference Fig. 2 C, it illustrates the structural schematic diagrams of an encoder for convolution codes.The encoder for convolution codes is corresponding Coding polynomial it is as follows:
Trellis=poly2trellis ([5:4], [23 35 0;0 5 13]);
[5 4] therein are defined according to the structure of convolutional code, and [5 4] show parallel 2 grades of convolutional code structure, 5 tables The constraint length for showing the first order is 5 (containing 4 shift registers), and 4 indicate that the constraint length of the second level was 4 (containing 3 registers). [23 35 0;05 13] structure for indicating convolutional code is 2 inputs, and (row indicates input port number, and column indicate output end for 3 outputs Mouth number), code rate 2/3.Matrix the first row first element 23 (octal system, using be represented in binary as 10011) indicate The relationship of first output port and first input port, 10011 determine which register port connection (1 indicate connection, 0 indicates to be not connected to);Matrix the first row second element 35 (octal system, using be represented in binary as 011101) indicate second The relationship of a output port and first input port;The third element 0 of matrix the first row indicate third output port with First input port is irrelevant;The meaning of other elements in matrix can with and so on.
It is calculated in the prior art because improving entire safe coding by the way of the algorithm for selecting high complexity to overcome The problem of safety of method causes the complexity of safe coding algorithm higher, is not suitable for the Internet of Things application of lightweight, this Shen Please embodiment provide a kind of lightweight secure coding schemes.In the embodiment of the present application, add at least one wheel of Encryption Algorithm It is inserted into the first encoder that code rate is 1 after close operation and/or at least one wheel cryptographic operation, to increase the error of Encryption Algorithm Diffusion improves its safety, so that it is next to propose a kind of brand-new mode not by the algorithm for selecting high complexity Improve the technical solution of the safety of safe coding algorithm.Using technical solution provided by the embodiments of the present application, can take into account Under the premise of the safety of safe coding algorithm, the lower Encryption Algorithm of complexity and the lower encryption algorithm of complexity are selected It combines, realizes that a kind of safe coding algorithm of low complex degree, the safe coding algorithm of this low complex degree are suitable for lightweight Internet of Things application.
Error diffusion is the index for measuring influence size of the input data to output data.When in input data When having 1 bit data to change, changed bit number is more in caused output data, then it is assumed that error diffusivity It can be better.Correlation namely error diffusion are better between error diffusion and safety, and safety is higher, Error diffusion is poorer, and safety is lower.
Below by based on it is recited above the invention relates to general character in terms of, it is further detailed to the embodiment of the present application It describes in detail bright.
Fig. 3 A is please referred to, it illustrates the flow charts for the secure coding method that the application one embodiment provides.This method It may include steps of.
Step 301, during one Encryption Algorithm of application executes n wheel cryptographic operation to plaintext, in n wheel cryptographic operation At least one wheel cryptographic operation after and/or n wheel cryptographic operation at least one wheel cryptographic operation in pass through the first encoder Execute coded treatment, wherein the code rate of the first encoder be 1, n for the integer greater than 1.
Encryption Algorithm includes n wheel cryptographic operation altogether.Illustratively, when Encryption Algorithm is KATAN32 algorithm, n 254, 254 wheel cryptographic operations are needed to be implemented when that is, encrypting using KATAN32 algorithm to plaintext.What each round cryptographic operation obtained adds It is close the result is that next round cryptographic operation input data.
The code rate of first encoder be 1 namely first encoder input bit number it is identical as the bit number of output.Example Such as, the input of the first encoder and the bit number of output are 32.In the embodiment of the present application, add at least one wheel of Encryption Algorithm After close operation and/or at least one wheel cryptographic operation of Encryption Algorithm, the first encoder that insertion code rate is 1, by first Encoder carries out byte mapping to input data, and the result after byte is mapped continues to encrypt, and can be improved entire peace The error diffusion of full coding algorithm, to improve safety.
Optionally, the insertion position of the first encoder and/or quantity are variable.The insertion position of first encoder refers to Coded treatment is executed by the first encoder after which takes turns cryptographic operation (namely is inserted into the after which takes turns cryptographic operation One encoder, the coding result after coded treatment is executed by the first encoder are input to next round cryptographic operation), or at which One wheel cryptographic operation in by the first encoder execute coded treatment (namely which wheel cryptographic operation in insertion first coding Device, such as coded treatment is executed by the first encoder after a certain encrypting step in the wheel cryptographic operation, pass through described the Coding result after one encoder execution coded treatment is input to next encryption step of the encrypting step in the wheel cryptographic operation Suddenly).For example, the first encoder can be inserted into after the 127th wheel cryptographic operation, can also be inserted after the 59th wheel cryptographic operation Enter the first encoder.For another example the first encoder can be inserted into 11th round cryptographic operation, it can also be in the 200th wheel encryption The first encoder is inserted into operation.The quantity of first encoder refers to the first encoder being inserted into entire safe coding algorithm Sum.Such as the sum can be 1, be also possible to multiple.Since the insertion position of the first encoder and quantity are variable , therefore the safety of safe coding algorithm can be further increased.Insertion position and quantity in relation to the first encoder are really Determine mode, explanation will be introduced below.
In a kind of possible embodiment, executed at coding after at least one wheel cryptographic operation by the first encoder Reason.For example, the quantity of the first encoder is 1, insertion position is the 40th wheel cryptographic operation, then leads to after the 40th wheel cryptographic operation It crosses first encoder and executes coded treatment.In another example the quantity of the first encoder is 2, insertion position is the 40th wheel and the 120 wheel cryptographic operations then execute coded treatment by first encoder after the 40th wheel cryptographic operation, and the 120th It takes turns cryptographic operation and coded treatment is executed by first encoder again later.It, should for any one first encoder The input data of first encoder depends on the insertion position of first encoder.To pass through the after the i-th wheel cryptographic operation For one encoder executes coded treatment, refer to after the i-th wheel cryptographic operation through the first encoder to the i-th wheel cryptographic operation Obtained encrypted result executes coded treatment, wherein i is the positive integer less than or equal to n.Specifically: as 1≤i≤n-1 When, the first encoder being inserted into after the i-th wheel cryptographic operation is used to execute volume to the encrypted result that the i-th wheel cryptographic operation obtains Code processing, coded data are input to i+1 wheel cryptographic operation, and i is integer.For example, when Encryption Algorithm is KATAN32 algorithm When, first encoder is inserted into after the 52nd wheel cryptographic operation, the input data of first encoder is the 52nd wheel encryption Obtained encrypted result is operated, the output data of first encoder will be input to the 53rd wheel cryptographic operation and encrypt.Work as i= When n, the first encoder being inserted into after the i-th wheel cryptographic operation is used to execute the encrypted result that the i-th wheel cryptographic operation obtains Coded treatment, coded data are input to second encoder.For example, when Encryption Algorithm is KATAN32 algorithm, in the 254th wheel First encoder is inserted into after cryptographic operation, the input data of first encoder is that the 254th wheel cryptographic operation obtains Encrypted result, the output data of first encoder are following ciphertexts, which will be input to second encoder and execute coding Processing.
In a kind of possible embodiment, executed at coding at least one wheel cryptographic operation by the first encoder Reason.For executing coded treatment by the first encoder in the i-th wheel cryptographic operation, refer to the jth in the i-th wheel cryptographic operation Pass through the first encoder after a encrypting step and coded treatment executed to the encrypted result that j-th of encrypting step obtains, after coding Data are input to+1 encrypting step of jth of the i-th wheel cryptographic operation, wherein the i-th wheel cryptographic operation includes m encrypting step, i For the positive integer less than or equal to n, m is the integer greater than 1, and j is the positive integer less than m.By taking KATAN32 algorithm as an example, Include multiple shift steps in each round cryptographic operation of KATAN32 algorithm, can be inserted into after any one shift step First encoder.For example, Encryption Algorithm includes 254 wheel cryptographic operations altogether, the 17th wheel cryptographic operation in Encryption Algorithm includes 6 Encrypting step is inserted into first encoder after the 2nd encrypting step of the 17th wheel cryptographic operation, which uses Coded treatment is executed in the data that the 2nd encrypting step to the 17th wheel cryptographic operation obtains, coded data is input to the 17th Take turns the 3rd encrypting step of cryptographic operation.
It in practical applications, is that the first encoder is inserted in a wheel cryptographic operation later or in a wheel cryptographic operation, It can be set according to actual needs.Optionally, in a complete safe coding algorithm, can both add at least one wheel It is inserted into the first encoder after close operation, the first encoder can also be inserted at least one wheel cryptographic operation.For example, encryption is calculated Method includes more wheel cryptographic operations, and every wheel cryptographic operation includes 5 encrypting steps, then can be at the 3rd of the 12nd wheel cryptographic operation Divide after encrypting step and after the 14th wheel cryptographic operation (namely after the 5th encrypting step of the 14th wheel cryptographic operation) It Cha Ru not first encoder.
It should be noted that if Encryption Algorithm is block encryption algorithm (for example, KATAN algorithm) namely it usually will be bright Text is divided into several groups (or for several segments) and is encrypted respectively, however the first encoder to the bit number of input data simultaneously It does not require, therefore when in plain text including k (k is the integer greater than 1) cross-talk plaintext (namely being divided into k cross-talk in plain text in plain text) When, executing coded treatment using the first encoder includes following several possible ways of realization:
(1) first encoder is used to execute coded treatment respectively to the corresponding k sections of data to be encoded of k cross-talk plaintext;
(2) first encoders are used to execute coded treatment, the first convergence data to be encoded to the first convergence data to be encoded Refer to the data that will be obtained after k cross-talk in plain text corresponding k sections of data to be encoded series connection;
(3) first encoders are used to execute the corresponding p sections of data to be encoded of p cross-talk plaintext in k cross-talk plaintext respectively Coded treatment, and coded treatment, above-mentioned r section second convergence number to be encoded are executed respectively to the convergence data to be encoded of r section second Every section of second convergence data to be encoded in are that the k-p cross-talk in k cross-talk plaintext in addition to p cross-talk plaintext is corresponding in plain text The data obtained after at least two sections of data to be encoded series connection in k-p sections of data to be encoded, p is just whole less than or equal to k-2 Number, r is positive integer.
Above-mentioned 3 kinds of modes can be referred to as " block encoding ", " convergence coding " and " hybrid coding ".Above-mentioned 3 kinds of sides Formula will be described in detail respectively in embodiments below.
Optionally, further include following steps before step 301: according to the corresponding key of Encryption Algorithm determine with down toward One item missing information: the multinomial of the first encoder, the puncturing patterns of the first encoder, the quantity of the first encoder, the first coding The insertion position of device.
The multinomial of first encoder is used to describe the structure of the first encoder.The polynomial selection meeting of first encoder Influence the error diffusion of safe coding algorithm.Further, since the code rate of the first encoder is 1, therefore the first encoder is simultaneously It will not influence the error correcting and detecting ability of safe coding algorithm.Optionally, the multinomial of the first encoder can be according to Encryption Algorithm Corresponding key determines, can also be determined according to the insertion position of the first encoder.
The puncturing patterns of first encoder, which refer to, executes the relevant parameter that punch operation is related to the first encoder, for example, The bit number for needing to destroy, need to destroy who/which bit etc..Since the code rate of the first encoder is 1, need Punch operation is executed to the first encoder, the bit number with the bit number of the first encoder output of guarantee and input is identical 's.Illustratively, for the bit number of input be 2 and output bit number be 3 the first encoder, then need by punching grasp Destroy a bit of output.In addition, puncturing patterns, which also indicate, needs to destroy that who bit of output is illustratively beaten The 2nd bit is destroyed in hole pattern instruction, and former output data is " 010 ", and the output data after punch operation is " 00 ".First The puncturing patterns of encoder can be determined according to the corresponding key of Encryption Algorithm.Illustratively, corresponding close according to Encryption Algorithm The random number that key determines determines who output bit destroyed, for example, the random number determined according to the corresponding key of Encryption Algorithm It is 16, then destroys the 16th output bit.
The quantity of first encoder refers to the sum for the first encoder being inserted into entire safe coding algorithm.First compiles The quantity of code device can be preset, and can also be determined according to practical business demand, can also be corresponding close according to Encryption Algorithm Key determines.For example, the quantity for the first encoder that the higher business of security requirement is inserted into, should be greater than security requirement compared with The quantity for the first encoder that low business is inserted into.For another example answering due to the first decoder corresponding with the first encoder Miscellaneous degree is higher, and processing delay is larger, and one the first encoder of every insertion, then is also required to be inserted correspondingly into one first when decoding It is lower should to be less than delay requirement for decoder, therefore the quantity of the first encoder that the higher business of delay requirement is inserted into The quantity for the first encoder that business is inserted into.
The insertion position of first encoder, which refers to, is inserted into the first encoder after which takes turns cryptographic operation, or at which The first encoder is inserted into wheel cryptographic operation.It the insertion position of first encoder can be true according to the corresponding key of Encryption Algorithm It is fixed.
In other possible examples, above-mentioned information relevant to the first encoder can also be preset, can be with root It is determined according to other parameters such as the mark of the first encoder, current times, the embodiment of the present application is not construed as limiting this.
It should be noted that information relevant to following second encoders can also be true according to the corresponding key of Encryption Algorithm It is fixed.Wherein, information relevant to second encoder includes the multinomial of second encoder, puncturing patterns of second encoder etc. Deng the embodiment of the present application is not construed as limiting this.
Step 302, the ciphertext obtained after cryptographic operation is taken turns to above-mentioned n by second encoder and executes coded treatment, obtained The code rate of coding result, second encoder is greater than 1.
The code rate of second encoder is greater than bit number of the bit number greater than input of 1 namely second encoder output, example Such as, the bit number of second encoder input is 32, and the bit number of output is 36.The input data of second encoder is above-mentioned n wheel The ciphertext that cryptographic operation obtains.It is inserted later it should be noted that if taking turns cryptographic operation (namely last wheel cryptographic operation) n-th Enter first encoder, then above-mentioned ciphertext is that the encrypted result that first encoder obtains the n-th wheel cryptographic operation executes volume It is generated after code processing.
It should be noted that since the bit number of second encoder output is greater than the bit number of input, the second coding Existing in the output data of device has the function of error correcting and detecting for the data namely second encoder of verification.
In addition, when plaintext includes k (k be integer) greater than 1 cross-talk plaintext, ciphertext also includes k cross-talk ciphertext, and k sections Sub- ciphertext corresponds respectively to k cross-talk in plain text, and it includes following several possible for executing coded treatment to ciphertext using second encoder Way of realization:
(1) coded treatment is executed to k cross-talk ciphertext by second encoder respectively, obtains k sections of coding results;
(2) coded treatment is executed to the first convergence ciphertext by second encoder, obtains the first convergence coding result, first Convergence ciphertext refers to the data that will be obtained after the series connection of k cross-talk ciphertext;
(3) coded treatment is executed to the q cross-talk ciphertext in k cross-talk ciphertext by second encoder respectively, obtains q sections of codings As a result;And ciphertext is converged to s section second by second encoder and executes coded treatment respectively, obtain the convergence coding knot of s section second Fruit, the every section second convergence ciphertext that above-mentioned s section second converges in ciphertext is by the k-q in k cross-talk ciphertext in addition to q cross-talk ciphertext The data obtained after at least two cross-talk ciphertexts series connection in cross-talk ciphertext, q is the positive integer less than or equal to k-2, and s is positive whole Number.
Above-mentioned 3 kinds of modes can be referred to as " block encoding ", " convergence coding " and " hybrid coding ".Above-mentioned 3 kinds of sides Formula will be described in detail respectively in embodiments below.
Optionally, after step 302, further include following steps: interleaving treatment executed to coding result using interleaver, Obtain intertexture result.
Interleaver can be realized changes message structure to the maximum extent under the premise of not changing the information content.It is passed in channel During defeated, the mistake of bit is usually what bunchiness occurred, however the error correction of channel coding is only being detected and corrected individually The mistake string of mistake or shorter is just effective, therefore the subsequent bits in a piece of news are scatter using interleaver, so that i.e. Make that bunchiness mistake occurs during transmission, when restoring subsequent bits string after deinterleaving processing, if bunchiness mistake is broken up into Dry discontinuous single error (or shorter mistake string), can be disappeared at this time by the error correcting and detecting functional rehabilitation original of channel coding Breath.
Illustratively, detailed process is as follows for interleaving treatment: there are when k sections of coding results, by each section of coding result First bit takes out, and k the first bits is allowed to form new grouping, and the second bit of each section of coding result is taken out, And k the second bits is allowed to form new grouping, and so on.
Above-mentioned first encoder and second encoder can be used encoder for convolution codes, encoder for convolution codes complexity compared with Low, suitable for lightweight Internet of Things application.
The step of the following are safe coding/decoding methods corresponding with the secure coding method shown in Fig. 3 A.In conjunction with reference to figure 3B, it illustrates the flow charts for the safe coding/decoding method that the application one embodiment provides.This method may include steps of.
Step 303, decoding process is executed to coding result by the second decoder, obtains ciphertext.
Above-mentioned coding result is to execute coded treatment to ciphertext by second encoder to obtain, and ciphertext is using an encryption Algorithm executes n wheel cryptographic operation to plaintext and obtains, wherein after at least one wheel cryptographic operation in n wheel cryptographic operation and/ Or coded treatment is executed by the first encoder in at least one wheel cryptographic operation in n wheel cryptographic operation, second encoder Code rate is greater than 1, and it is the integer greater than 1 that the code rate of the first encoder, which is equal to 1, n,.
Step 304, n corresponding with above-mentioned n wheel cryptographic operation is executed to ciphertext in one decipherment algorithm of application and takes turns decryption oprerations During, before at least one wheel decryption oprerations in n wheel decryption oprerations and/or at least one in n wheel decryption oprerations takes turns Decoding process is executed by the first decoder in decryption oprerations.
Above-mentioned decipherment algorithm is corresponding with above-mentioned Encryption Algorithm, is the inverse process of Encryption Algorithm.Illustratively, if executing To subtraction is performed in plain text when Encryption Algorithm, then need to execute add operation to ciphertext when executing decipherment algorithm.First The insertion position of decoder and quantity, depending on the insertion position of the first encoder and quantity in ciphering process.
It is corresponding with above-mentioned ciphering process, if by the first encoder to the i-th wheel encryption behaviour after the i-th wheel cryptographic operation Make obtained encrypted result and execute coded treatment, then in decrypting process, passes through the first solution before the n-th-i+1 takes turns decryption oprerations The decrypted result that code device obtains the n-th-i wheel decryption oprerations executes decoding process, namely inserts before the n-th-i+1 takes turns decryption oprerations Enter the first decoder, which is used to be decoded the decrypted result that the n-th-i wheel decryption oprerations obtain, number after decoding According to the n-th-i+1 wheel decryption oprerations are input to, i is the positive integer less than or equal to n.For example, when Encryption Algorithm is KATAN32 algorithm When, the 52nd wheel cryptographic operation after be inserted into first encoder, then in decrypting process, the 203rd wheel decryption oprerations it One the first decoder of preceding insertion, the input data of first decoder are the decrypted results that the 202nd wheel decryption oprerations obtain, should The output data of first decoder will be input to the 203rd wheel decryption oprerations and be decrypted.In addition, as i=n, if adding in the i-th wheel It is inserted into the first encoder after close operation, then in decrypting process, is inserted before the n-th-i+1 wheel (namely the 1st wheel) decryption oprerations Enter first decoder, first decoder for being decoded to ciphertext, decoded data be input to the n-th-i+1 wheel ( I.e. the 1st wheel) decryption oprerations.For example, being inserted into one after the 254th wheel cryptographic operation when Encryption Algorithm is KATAN32 algorithm First encoder is inserted into first decoder, first decoder before the 1st wheel decryption oprerations then in decrypting process Input data be ciphertext, the output data of first decoder will be input to the 1st wheel decryption oprerations be decrypted.
Corresponding with above-mentioned ciphering process, if the i-th wheel cryptographic operation in Encryption Algorithm includes m encrypting step, m is big In 1 integer, it is inserted at least one first encoder in the i-th wheel cryptographic operation, then in decrypting process, in the n-th-i+1 The first decoder of identical quantity is inserted into wheel decryption oprerations.If adding in ciphering process in the i-th j-th for taking turns cryptographic operation Pass through the first encoder after close step and coded treatment is executed to the encrypted result that j-th of encrypting step obtains, wherein i is small In or equal to n positive integer, j is positive integer less than m, then in decrypting process, in the m-j+ of the n-th-i+1 wheel decryption oprerations Pass through the decryption knot that the first decoder obtains the m-j decryption step of the n-th-i+1 wheel decryption oprerations before 1 decryption step Fruit executes decoding process, namely is inserted into the first decoder before the m-j+1 decryption step of the n-th-i+1 wheel decryption oprerations, The data that first decoder is used to obtain the m-j decryption step of the n-th-i+1 wheel decryption oprerations are decoded, after decoding Data are input to the m-j+1 decryption step of the n-th-i+1 wheel decryption oprerations.For example, Encryption Algorithm includes 254 wheels encryption behaviour altogether Make, the 17th wheel cryptographic operation in Encryption Algorithm includes 6 encrypting steps, in the 2nd encrypting step of the 17th wheel cryptographic operation It is inserted into first encoder later, what which was used to obtain the 2nd encrypting step of the 17th wheel cryptographic operation Data are encoded, and coded data is input to the 3rd encrypting step of the 17th wheel cryptographic operation.Correspondingly, in decrypting process In, the 238th wheel decryption oprerations the 5th decryption step before be inserted into first decoder, first decoder for pair The data that 4th decryption step of the 238th wheel decryption oprerations obtains are decoded, and decoded data is input to the 238th wheel decryption 5th decryption step of operation.
Further, since insertion position and the quantity of the first decoder, the insertion depending on the first encoder in ciphering process Position and quantity, if therefore in ciphering process, not only the first encoder was inserted after at least one wheel cryptographic operation, but also extremely The first encoder is inserted in few wheel cryptographic operation, then in decrypting process, was both inserted into before at least one wheel decryption oprerations First decoder, and the first decoder is inserted at least one wheel decryption oprerations.
Optionally, further include following steps before step 303: solution is executed to above-mentioned intertexture result using deinterleaver Interleaving treatment obtains coding result.
The embodiment of the present application provides a kind of lightweight secure coding schemes.In the embodiment of the present application, in Encryption Algorithm At least one wheel cryptographic operation after and/or at least one wheel cryptographic operation in insertion code rate be 1 the first encoder, with increase plus The error diffusion of close algorithm, improves its safety, to propose a kind of brand-new not by selecting high complexity The mode of algorithm improves the technical solution of the safety of safe coding algorithm.Using technical side provided by the embodiments of the present application Case can select the lower Encryption Algorithm of complexity and complexity under the premise of taking into account the safety of safe coding algorithm Lower encryption algorithm combines, and realizes that a kind of safe coding algorithm of low complex degree, the safe coding of this low complex degree are calculated Method is suitable for the Internet of Things application of lightweight.
In addition, due to the insertion position of the first encoder and/or quantity be it is variable, safety can be further increased The safety of encryption algorithm.
Further, since being commonly configured with encoder in electronic equipment, scheme provided by the embodiments of the present application can be utilized directly Above-mentioned encoder, without additionally increasing new hardware cost.
In conjunction with the explanation of Fig. 3 A illustrated embodiment, when plaintext includes k cross-talk plaintext, ciphertext includes k cross-talk ciphertext, K cross-talk ciphertext corresponds respectively to k cross-talk in plain text, and k is greater than 1 integer.At this point, using the first encoder to k sections of numbers to be encoded It include " block encoding ", " convergence coding " and " hybrid coding " 3 kinds of ways of realization according to coded treatment is executed, using second encoder Executing coded treatment to k sections of ciphertexts also includes " block encoding ", " convergence coding " and " hybrid coding " 3 kinds of ways of realization.
Following examples show using the first encoder, to k cross-talk, corresponding k sections of data to be encoded are grouped in plain text The case where encoding, and coding be grouped to k cross-talk ciphertext using second encoder.
Fig. 4 A is please referred to, it illustrates the flow charts for the secure coding method that the application one embodiment provides.This method It may include steps of.
Step 401, during one Encryption Algorithm of application executes n wheel cryptographic operation to the k cross-talk for including in plain text in plain text, In at least one wheel cryptographic operation after at least one wheel cryptographic operation in n wheel cryptographic operation and/or in n wheel cryptographic operation Coded treatment is executed by the first encoder, wherein the first encoder is used for the corresponding k sections of data to be encoded of k cross-talk plaintext Coded treatment is executed respectively, obtains k sections of coded datas, and k is the integer greater than 1, and n is the integer greater than 1.
In the present embodiment, there are when k sections of data to be encoded, the first encoder executes volume to k sections of data to be encoded respectively Code processing.It should be noted that if the block length of Encryption Algorithm is fixed, then using method provided in this embodiment to be encoded When data execute coded treatment, the bit number of the first encoder input and the bit number of output are determining.Illustratively, if adopting When with KATAN32 algorithm, then the input of the first encoder and the bit number of output are 32;When according to KATAN48 algorithm, then The input of one encoder and the bit number of output are 48.
Step 402, the k cross-talk ciphertext obtained after cryptographic operation is taken turns to above-mentioned n by second encoder and executes coding respectively Processing, obtains k sections of coding results.
In the present embodiment, there are when k cross-talk ciphertext, second encoder executes coded treatment to k cross-talk ciphertext respectively.It adopts When encoding in fashion described above, the efficiency of safe coding can be improved, and time delay needed for further decreasing safe coding.It needs to illustrate If the block length of Encryption Algorithm is fixed, when executing coded treatment to sub- ciphertext using method provided in this embodiment, The bit number of second encoder input is determining.When illustratively, according to KATAN32 algorithm, then second encoder inputs Bit number be 32;When according to KATAN48 algorithm, then the bit number of second encoder input is 48.
In conjunction with reference Fig. 4 C, it illustrates the schematic diagrames of the safe coding process shown in the application one embodiment.Wherein, It in plain text include k cross-talk plaintext, during executing 254 wheel cryptographic operation in plain text to k cross-talk using KATAN32 algorithm, i-th It takes turns cryptographic operation and is inserted into the first encoder later, by the first encoder to the k section encrypted result point obtained after the i-th wheel cryptographic operation Not Zhi Hang coded treatment, obtain k sections of coded datas, k sections of coded datas are separately input into i+1 wheel cryptographic operation and are added It is close;In addition, being held respectively by second encoder to above-mentioned k cross-talk ciphertext when obtaining k cross-talk ciphertext after the 254th wheel cryptographic operation Row coded treatment obtains k sections of coding results.Wherein, Ei is the output data of the i-th wheel cryptographic operation, will be input to i+1 Wheel cryptographic operation is encrypted;EEi is to be encoded to obtain using output data Ei of first encoder to the i-th wheel cryptographic operation Coded data, i+1 wheel cryptographic operation will be input to and encrypted.
The step of the following are safe coding/decoding methods corresponding with secure coding method.In conjunction with reference Fig. 4 B, it illustrates The flow chart for the safe coding/decoding method that the application one embodiment provides.This method comprises the following steps.
Step 403, decoding process is executed to k sections of coding results by the second decoder respectively, obtains k cross-talk ciphertext.
Step 404, n wheel decryption oprerations are executed to k cross-talk ciphertext in one decipherment algorithm of application and obtains the process of k cross-talk plaintext In, at least one wheel decryption behaviour before at least one wheel decryption oprerations in n wheel decryption oprerations and/or in n wheel decryption oprerations Decoding process is executed by the first decoder in work, wherein the first decoder is to be decoded for k sections corresponding to k cross-talk ciphertext Data execute decoding process respectively, obtain k sections of decoded datas.
That is, the input data of the first decoder is 1 section of number to be decoded corresponding with 1 cross-talk ciphertext in k cross-talk ciphertext According to.
In conjunction with reference Fig. 4 D, it illustrates the schematic diagrames for the safe decoding process that the application one embodiment provides.With figure The corresponding safe decoding process of safe coding process shown in 4C is as follows: being held respectively by the second decoder to k sections of coding results Row decoding process obtains k cross-talk ciphertext, executes the mistake of 254 wheel decryption oprerations to k cross-talk ciphertext using KATAN32 algorithm later Cheng Zhong is inserted into the first decoder before 254-i+1 takes turns decryption oprerations, takes turns decryption oprerations to 254-i by the first decoder Obtained k section data to be decoded execute decoding process respectively, obtain k sections of decoded datas, and k sections of decoded datas are separately input into 254-i+1 wheel decryption oprerations are decrypted, until obtaining k cross-talk in plain text.Wherein, Di is the output number of the i-th wheel decryption oprerations According to will be input to i+1 wheel decryption oprerations and be decrypted;DDi is using the first decoder to the defeated of the i-th wheel decryption oprerations The decoded data that data Di is decoded out will be input to i+1 wheel decryption oprerations and be decrypted.
Scheme provided by the embodiments of the present application can be improved code efficiency, further by using the mode of block encoding Time delay needed for reducing entire safe coding process.
Following examples show carrying out convergence coding to k section data to be encoded using the first encoder, and use the The case where two encoders carry out convergence coding to k cross-talk ciphertext.
Fig. 5 A is please referred to, it illustrates the flow charts for the secure coding method that the application one embodiment provides.This method Include the following steps:
Step 501, during one Encryption Algorithm of application executes n wheel cryptographic operation to the k cross-talk that ciphertext includes in plain text, In at least one wheel cryptographic operation after at least one wheel cryptographic operation in n wheel cryptographic operation and/or in n wheel cryptographic operation Coded treatment is executed by the first encoder, wherein the first encoder is used to execute at coding the first convergence data to be encoded Reason converges data after obtaining the first coding, and k is the integer greater than 1, and n is the integer greater than 1.
First convergence data to be encoded refer to the data that will be obtained after k cross-talk in plain text corresponding k sections of data to be encoded series connection. Convergence data, which are divided into k sections of coded datas and are separately input into i+1 wheel cryptographic operation, after first coding is encrypted, or Person, convergence data, which are divided into k section coded datas and are separately input into jth+1 of the i-th wheel cryptographic operation, after the first coding adds Close step is encrypted.Due to the effect that the encoder data more to bit number are encoded, typically superior to bit number compared with The effect that few data are encoded, therefore in the present embodiment, first k sections of data to be encoded are connected to obtain the first remittance to be encoded Then poly- data execute coded treatment to the first convergence data to be encoded by the first encoder.By the above-mentioned means, can be further Improve safe diffusion.
Step 502, the first convergence ciphertext obtained after cryptographic operation is taken turns to above-mentioned n by second encoder to execute at coding Reason, obtains the first convergence coding result.
First convergence ciphertext refers to the data that will be obtained after the series connection of k cross-talk ciphertext.It in the present embodiment, can be close there are k sections Wen Shi first connects k cross-talk ciphertext to obtain the first convergence ciphertext, executes coding to above-mentioned first convergence ciphertext by second encoder Processing.By the above-mentioned means, the error correcting and detecting ability of second encoder can be improved.
In conjunction with reference Fig. 5 C, it illustrates the schematic diagrames for the safe coding process that another embodiment of the application provides.When When in plain text including k cross-talk plaintext, during executing 254 wheel cryptographic operation in plain text to k cross-talk using KATAN32 algorithm, It is inserted into the first encoder after i-th wheel cryptographic operation, first is obtained to the first convergence data encoding to be encoded by the first encoder Data are converged after coding, the first convergence data to be encoded by k cross-talk, connect to obtain in plain text by corresponding k sections of data to be encoded, and first Data are converged after coding be divided into after k sections of coded datas input i+1 wheel cryptographic operation respectively and continue to encrypt, in addition, After 254th wheel cryptographic operation, coding is executed to the first convergence ciphertext that k cross-talk ciphertext is connected by second encoder Reason, obtains the first convergence coding result.Wherein, Ei is the output data of the i-th wheel cryptographic operation, will be entered i+1 wheel and add Close operation is encrypted;EEi is the volume encoded using output data Ei of first encoder to the i-th wheel cryptographic operation Data after code, will be input to i+1 wheel cryptographic operation and encrypt.
The step of the following are safe coding/decoding methods corresponding with secure coding method.In conjunction with reference Fig. 4 B, it illustrates The flow chart for the safe coding/decoding method that the application one embodiment provides.This method comprises the following steps.
Step 503, decoding process is executed to the first convergence coding result by the second decoder, it is close obtains the first convergence Text, and the first convergence ciphertext is divided into k cross-talk ciphertext.
Step 504, it during one decipherment algorithm of application executes n wheel decryption oprerations to k cross-talk ciphertext, takes turns and decrypts in n Pass through first in at least one wheel decryption oprerations before at least one wheel decryption oprerations in operation and/or in n wheel decryption oprerations Decoder executes decoding process, wherein the first decoder is used for the first convergence data to be decoded execution decoding process, obtains the Data are converged after one decoding.
The input data of first decoder is the first convergence data to be decoded, and convergence data will be by after the first decoding of output It is divided into k sections of decoded datas to continue to decrypt.
In conjunction with reference Fig. 5 D, it illustrates the schematic diagrames for the safe decoding process that another embodiment of the application provides.With The corresponding safe decoding process of safe coding process shown in Fig. 5 C is as follows: the second decoder holds the first convergence coding result Row decoding process obtains the first convergence ciphertext, after the first convergence ciphertext is divided into k cross-talk ciphertext, using KATAN32 algorithm point During the other execution n wheel decryption oprerations to k cross-talk ciphertext, it is inserted into the first decoder before 254-i+1 takes turns decryption oprerations, Solution is executed by the first convergence data to be decoded that the first decoder k sections of data concatenating to be decoded corresponding to k cross-talk ciphertext obtains Code processing converges data after obtaining the first decoding, and convergence data are divided into k sections of decoded datas and input respectively after the first decoding It is decrypted to 254-i+1 wheel decryption oprerations, until obtaining k cross-talk in plain text.Wherein, Di is the output of the i-th wheel decryption oprerations Data will be input to i+1 wheel decryption oprerations and be decrypted;DDi is using the first decoder to the i-th wheel decryption oprerations The decoded data that output data Di is decoded will be input to i+1 wheel decryption oprerations and be decrypted.
Scheme provided by the embodiments of the present application can be improved the error of safe coding by using the mode of convergence coding Diffusion and error correcting and detecting ability.
Fig. 4 A and Fig. 5 A embodiment describes block encoding and convergence coding two ways respectively.In other possible implementations In example, hybrid coding mode is can also be used in the first encoder and/or second encoder.Hybrid coding mode is block encoding and converges The combination of poly- coding two ways.
When the first encoder uses hybrid coding mode, the first encoder is used for the p cross-talk in k cross-talk plaintext in plain text Corresponding p sections of data to be encoded execute coded treatment respectively, and execute at coding respectively to the convergence data to be encoded of r section second Reason, the above-mentioned r section second every section of second convergence data to be encoded to be encoded converged in data are that p cross-talk will be removed in k cross-talk plaintext It is obtained after at least two sections of data to be encoded series connection in the corresponding k-p sections of data to be encoded of k-p cross-talk plaintext other than plaintext Data, p are the positive integer less than or equal to k-2, and r is positive integer.Correspondingly, the first decoder is used for the p in k cross-talk ciphertext The corresponding p sections of data to be decoded of cross-talk ciphertext execute decoding process respectively, and hold respectively to the convergence data to be decoded of r section second Row decoding process, the above-mentioned r section second every section of second convergence data to be decoded to be decoded converged in data are will be in k cross-talk ciphertext After at least two sections of data concatenatings to be decoded in the corresponding k-p sections of data to be decoded of k-p cross-talk ciphertext in addition to p cross-talk ciphertext Obtained data, p are the positive integer less than or equal to k-2, and r is positive integer.
By taking k=5 as an example, corresponding 5 sections of data to be encoded are respectively s1, s2, s3, s4 and s5 to 5 cross-talks in plain text.Show at one In example, coded treatment can be executed to s1, s2 by the first encoder respectively, obtain the corresponding coded data of s1 and s2 R1 and r2, to the second convergence data S to be encoded obtained after s3, s4 and s5 series connection345Coded treatment is executed, obtains second wait compile Code convergence data S345Data R is converged after corresponding coding345.Correspondingly, in decoding process, by the first decoder to R345 It executes decoding process and obtains S345, and can be by S345It is divided into s3, s4 and s5, and r1 and r2 is executed respectively by the first decoder Decoding process obtains s1 and s2.
When second encoder uses hybrid coding mode, in an encoding process, by second encoder to k cross-talk ciphertext In q cross-talk ciphertext execute coded treatment respectively, obtain q sections of coding results;And s section second is converged by second encoder close Text executes coded treatment respectively, obtains s section second and converges coding result, above-mentioned s section second converges every section second remittance in ciphertext Poly- ciphertext is will to obtain after at least two cross-talk ciphertexts series connection in the k-q cross-talk ciphertext in k cross-talk ciphertext in addition to q cross-talk ciphertext Data, q is positive integer less than or equal to k-2, and s is positive integer.Correspondingly, in decoding process, when coding result includes q When section coding result and s section second converge coding result, q sections of coding results are executed at decoding respectively by the second decoder Reason, obtains q cross-talk ciphertext;And coding result is converged to s section second by the second decoder and executes decoding process respectively, obtain s Section second converges ciphertext;The convergence of s section second ciphertext is divided into k-q cross-talk ciphertext, above-mentioned s section second converges in coding result Every section second convergence coding result be by the k-q section coding result in k sections of coding results in addition to q sections of coding results at least The data obtained after two sections of coding result series connection, q is the positive integer less than or equal to k-2, and s is positive integer.
By taking k=5 as an example, 5 cross-talk ciphertexts are respectively t1, t2, t3, t4 and t5.In one example, pass through second encoder The the second convergence ciphertext T to connect to t1 and t212, t3 and t4 connect second convergence ciphertext T34And sub- ciphertext t5 Coded treatment is executed respectively, obtains the second convergence ciphertext T12Corresponding second convergence coding result W12, second convergence ciphertext T34It is right The the second convergence coding result W answered34And the corresponding coding result w5 of sub- ciphertext t5.Correspondingly, in decoding process, pass through Two decoders execute decoding process to w5 and obtain t5, to W12It executes decoding process and obtains T12, and can be by T12It is divided into t1 and t2, To W34It executes decoding process and obtains T34, and can be by T34It is divided into t3 and t4.
It should be noted is that in several of the above embodiments where, being only all made of with the first encoder and second encoder Perhaps the first encoder and second encoder are all made of convergence coding mode or the first encoder and to block encoding mode Explanation is introduced for being all made of hybrid coding mode in two encoders, in practical applications, for any one encoder (packet Include the first encoder and second encoder), using any coding mode to be can be preset, the embodiment of the present application pair This is not construed as limiting.
Also it should be noted is that, when plaintext includes k cross-talk plaintext, be inserted into ciphering process any one the One encoder can corresponding data to be encoded use block encoding described above, convergence to encode in plain text to a portion And any coding mode in hybrid coding is encoded, and to the corresponding data to be encoded of wherein another part plaintext Do not execute coded treatment.It, can also be to it when second encoder executes coded treatment to the corresponding k cross-talk ciphertext of k cross-talk plaintext Middle a part of sub- ciphertext using any coding mode in block encoding described above, convergence coding and hybrid coding into Row coding, and coded treatment is not executed to the sub- ciphertext of wherein another part.
Also it should be noted is that, in the embodiment of the present application, Encryption Algorithm is mainly situated between by taking KATAN algorithm as an example Continue explanation, in practical applications, Encryption Algorithm can also be HIGHT (high security and lightweight) algorithm, Tiny Encryption Algorithm (Tiny Encryption Algorithm, TEA), DESXL (Lightweight DES with key Whitening) algorithm etc..In addition, in the embodiment of the present application, encoder is mainly introduced by taking encoder for convolution codes as an example Bright, in practical applications, encoder can also be tail-biting convolutional code encoder, Tubro code coder, BCH code encoder etc..
It is understood that electronic equipment is in order to realize the above functions, it comprises execute each corresponding hardware of function Structure and/or software module (or unit).Each exemplary unit and algorithm described in conjunction with embodiment disclosed herein Step, the embodiment of the present application can be realized with the combining form of hardware or hardware and computer software.Some function actually with Hardware or computer software drive the mode of hardware to execute, the specific application and design constraint item depending on technical solution Part.Those skilled in the art can realize described function using different methods to each specific application, still It is this to realize the range it is not considered that the technical solution beyond the embodiment of the present application.
The embodiment of the present application can carry out the division of functional unit according to above method example to electronic equipment, for example, can With each functional unit of each function division of correspondence, two or more functions can also be integrated in a processing unit In.Above-mentioned integrated unit both can take the form of hardware realization, can also realize in the form of software functional units.It needs It is noted that be schematical, only a kind of logical function partition to the division of unit in the embodiment of the present application, it is practical real It is current that there may be another division manner.
Using integrated unit, Fig. 6 A shows one kind of electronic equipment involved in above-described embodiment Possible structural schematic diagram.Electronic equipment 600 includes: processing unit 602 and communication unit 603.Processing unit 602 is used for electricity The movement of sub- equipment 600 carries out control management.For example, when electronic equipment 600 is used to execute safe coding process, processing unit 602 for supporting electronic equipment 600 to execute the step 301 in Fig. 3 A to step 302, the step 401 in Fig. 4 A to 402, and Step 501 in Fig. 5 A is to step 502, and/or other steps for executing techniques described herein.Work as electronic equipment 600 for execute safe decoding process when, processing unit 602 be used for support electronic equipment 600 execute Fig. 3 B in step 303 and Step 503 of the step 403 into 404 and Fig. 5 B in 304, Fig. 4 B is to 504, and/or for executing skill described herein Other steps of art.Communication unit 603 is used to support the communication of electronic equipment 600 Yu other equipment.Electronic equipment 600 can be with Including storage unit 601, for storing the program code and data of electronic equipment 600.
Wherein, processing unit 602 can be processor or controller, such as can be central processing unit (Central Processing Unit, CPU), general processor, digital signal processor (Digital Signal Processor, DSP), Specific integrated circuit (Application-Specific Integrated Circuit, ASIC), field programmable gate array It is (Field Programmable Gate Array, FPGA) or other programmable logic device, transistor logic, hard Part component or any combination thereof.It may be implemented or execute to combine and various illustratively patrol described in present disclosure Collect box, module and circuit.The processor is also possible to realize the combination of computing function, such as includes one or more micro- places Manage device combination, DSP and the combination of microprocessor etc..Communication unit 603 can be communication interface, transceiver, transmission circuit etc., Wherein, communication interface is to be referred to as, and may include the interface between one or more interfaces, such as server and VR equipment.Storage Unit 601 can be memory.
When processing unit 602 is processor, communication unit 603 is communication interface, when storage unit 601 is memory, this Apply for that equipment involved in embodiment can be equipment shown in Fig. 6 B.
Refering to shown in Fig. 6 B, which includes: processor 612, communication interface 613, memory 611.It is optional Ground, electronic equipment 610 can also include bus 614.Wherein, communication interface 613, processor 612 and memory 611 can lead to Cross the interconnection of bus 614;Bus 614 can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, abbreviation EISA) bus etc..The bus 614 can be divided into address bus, data/address bus, control bus etc.. Only to be indicated with a thick line in Fig. 6 B, it is not intended that an only bus or a type of bus convenient for indicating.
The step of method in conjunction with described in the embodiment of the present application disclosure or algorithm, can be come real in a manner of hardware It is existing, it is also possible to execute the mode of software instruction by processor to realize.Software instruction can be (or single by corresponding software module Member) composition, software module (or unit) can be stored on random access memory (Random Access Memory, RAM), Flash memory, read-only memory (Read Only Memory, ROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable ROM, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically EPROM, EEPROM), post Storage, hard disk, mobile hard disk, CD-ROM (CD-ROM) or any other form well known in the art storage medium in. A kind of illustrative storage medium is coupled to processor, to enable a processor to from the read information, and can be to Information is written in the storage medium.Certainly, storage medium is also possible to the component part of processor.Pocessor and storage media can be with In ASIC.In addition, the ASIC can be located in electronic equipment.Certainly, pocessor and storage media can also be used as discrete Component is present in electronic equipment.
Those skilled in the art it will be appreciated that in said one or multiple examples, retouched by the embodiment of the present application The function of stating can be realized with hardware, software, firmware or their any combination.The embodiment of the present application also provides computers Program product, when the computer program product is performed, for realizing above-mentioned function.Furthermore it is possible to by above-mentioned computer Program storage is in computer-readable medium or as the one or more instructions or code progress on computer-readable medium Transmission.Computer-readable medium includes computer storage media and communication media, and wherein communication media includes being convenient for from a ground Any medium of direction another place transmission computer program.Storage medium can be general or specialized computer and can access Any usable medium.
Above-described specific embodiment carries out the purpose of the embodiment of the present application, technical scheme and beneficial effects It is further described, it should be understood that the foregoing is merely the specific embodiments of the embodiment of the present application, and does not have to In limit the embodiment of the present application protection scope, it is all on the basis of the technical solution of the embodiment of the present application, done it is any Modification, equivalent replacement, improvement etc. should all include within the protection scope of the embodiment of the present application.

Claims (23)

1. a kind of secure coding method, which is characterized in that the described method includes:
During one Encryption Algorithm of application executes n wheel cryptographic operation to plaintext, at least one in cryptographic operation is taken turns in the n Cryptographic operation is taken turns to execute in at least one wheel cryptographic operation later and/or in n wheel cryptographic operation by the first encoder Coded treatment, wherein the code rate of first encoder is that 1, n is integer greater than 1;
The ciphertext obtained after cryptographic operation is taken turns to the n by second encoder and executes coded treatment, obtains coding result, it is described The code rate of second encoder is greater than 1.
2. the method according to claim 1, wherein at least one wheel in n wheel cryptographic operation adds Pass through the first encoder after close operation and execute coded treatment, specifically includes:
It is held after the i-th wheel cryptographic operation by the encrypted result that first encoder obtains the i-th wheel cryptographic operation Row coded treatment, wherein i is the positive integer less than or equal to n.
3. the method according to claim 1, wherein at least one wheel in n wheel cryptographic operation adds Coded treatment is executed by the first encoder in close operation, is specifically included:
J-th of encrypting step is obtained by first encoder after j-th of encrypting step of the i-th wheel cryptographic operation The encrypted result arrived executes coded treatment, wherein the i-th wheel cryptographic operation includes m encrypting step, and i is less than or equal to n Positive integer, m is integer greater than 1, and j is the positive integer less than m.
4. method according to any one of claims 1 to 3, which is characterized in that the plaintext includes k cross-talk plaintext, and k is big In 1 integer;
First encoder is used to execute coded treatment respectively to the corresponding k sections of data to be encoded of the k cross-talk plaintext;
Alternatively,
First encoder is used to execute coded treatment, the first convergence data to be encoded to the first convergence data to be encoded Refer to the data that will be obtained after the k cross-talk in plain text corresponding k sections of data to be encoded series connection;
Alternatively,
First encoder is used to execute the corresponding p sections of data to be encoded of p cross-talk plaintext in the k cross-talk plaintext respectively Coded treatment, and coded treatment, the r section second convergence number to be encoded are executed respectively to the convergence data to be encoded of r section second Every section of second convergence data to be encoded in are that the k-p cross-talk in the k cross-talk plaintext in addition to the p cross-talk plaintext is bright The data obtained after at least two sections of data to be encoded series connection in the corresponding k-p sections of data to be encoded of text, p is less than or equal to k- 2 positive integer, r are positive integer.
5. method according to any one of claims 1 to 3, which is characterized in that the plaintext includes k cross-talk plaintext, described Ciphertext includes k cross-talk ciphertext, and the k cross-talk ciphertext corresponds respectively to the k cross-talk in plain text, and k is the integer greater than 1;
It is described that the ciphertext execution coded treatment that cryptographic operation obtains is taken turns to the n by second encoder, coding result is obtained, is had Body includes:
By the second encoder coded treatment is executed to the k cross-talk ciphertext respectively, obtains k sections of coding results;
Alternatively,
Coded treatment is executed to the first convergence ciphertext by the second encoder, obtains the first convergence coding result, described the One convergence ciphertext refers to the data that will be obtained after k cross-talk ciphertext series connection;
Alternatively,
By the second encoder coded treatment is executed to the q cross-talk ciphertext in the k cross-talk ciphertext respectively, obtains q sections of volumes Code result;And ciphertext is converged to s section second by the second encoder and executes coded treatment respectively, obtain the convergence of s section second Coding result, it is that described q sections will be removed in the k cross-talk ciphertext that the s section second, which converges every section second convergence ciphertext in ciphertext, The data obtained after at least two cross-talk ciphertexts series connection in k-q cross-talk ciphertext other than sub- ciphertext, q are less than or equal to k-2's Positive integer, s are positive integer.
6. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
At least one of following information: the multinomial of first encoder, institute is determined according to the corresponding key of the Encryption Algorithm State the insertion position of the puncturing patterns of the first encoder, the quantity of first encoder, first encoder.
7. a kind of safe coding/decoding method, which is characterized in that the described method includes:
Decoding process is executed to coding result by the second decoder, obtains ciphertext, the coding result is by the second coding Device executes what coded treatment obtained to the ciphertext, and the ciphertext is to execute n wheel cryptographic operation to plaintext using an Encryption Algorithm It obtains, wherein after at least one wheel cryptographic operation in n wheel cryptographic operation and/or in n wheel cryptographic operation At least one wheel cryptographic operation in coded treatment executed by the first encoder, the code rate of the second encoder is greater than 1, described It is the integer greater than 1 that the code rate of first encoder, which is equal to 1, n,;
It is obtained in the n wheel decryption oprerations corresponding with n wheel cryptographic operation to ciphertext execution of one decipherment algorithm of application described During plaintext, decryption oprerations are taken turns before at least one wheel decryption oprerations in n wheel decryption oprerations and/or in the n In at least one wheel decryption oprerations in by the first decoder execute decoding process.
8. the method according to the description of claim 7 is characterized in that at least one wheel solution in n wheel decryption oprerations Pass through the first decoder before close operation and execute decoding process, specifically includes:
The decrypted result that decryption oprerations obtain is taken turns to the n-th-i by first decoder before the n-th-i+1 takes turns decryption oprerations Execute decoding process, wherein i is the positive integer less than or equal to n.
9. the method according to the description of claim 7 is characterized in that at least one wheel solution in n wheel decryption oprerations Decoding process is executed by the first decoder in close operation, is specifically included:
By first decoder to the n-th-i+1 before the m-j+1 decryption step of the n-th-i+1 wheel decryption oprerations The decrypted result that the m-j decryption step of wheel decryption oprerations obtains executes decoding process, wherein the n-th-i+1 wheel decryption Operation includes m decryption step, and i is the positive integer less than or equal to n, and m is the integer greater than 1, and j is the positive integer less than m.
10. method according to any one of claims 7 to 9, which is characterized in that the ciphertext includes k cross-talk ciphertext, and k is Integer greater than 1;
First decoder executes decoding process for k sections of data to be decoded corresponding to the k cross-talk ciphertext respectively;
Alternatively,
First decoder is used to execute decoding process, the first convergence data to be decoded to the first convergence data to be decoded Refer to the data that will be obtained after the corresponding k sections of data concatenating to be decoded of the k cross-talk ciphertext;
Alternatively,
First decoder for executing the corresponding p sections of data to be decoded of p cross-talk ciphertext in the k cross-talk ciphertext respectively Decoding process, and decoding process, the r section second convergence number to be decoded are executed respectively to the convergence data to be decoded of r section second Every section of second convergence data to be decoded in are that the k-p cross-talk in the k cross-talk ciphertext in addition to the p cross-talk ciphertext is close The data obtained after at least two sections of data concatenatings to be decoded in the corresponding k-p sections of data to be decoded of text, p are less than or equal to k- 2 positive integer, r are positive integer.
11. method according to any one of claims 7 to 9, which is characterized in that second decoder that passes through ties coding Fruit executes decoding process, obtains ciphertext, specifically includes:
When the coding result includes k sections of coding results, the k sections of coding result is held respectively by second decoder Row decoding process obtains k cross-talk ciphertext, and the k cross-talk ciphertext corresponds respectively to the k sections of coding result, and k is whole greater than 1 Number;
Alternatively,
When the first convergence coding result obtained after the coding result is that k sections of coding results are connected, pass through described second Decoder executes decoding process to the first convergence coding result, obtains the first convergence ciphertext;By the first convergence ciphertext It is divided into k cross-talk ciphertext, the k cross-talk ciphertext corresponds respectively to the k sections of coding result, and k is the integer greater than 1;
Alternatively,
When the coding result includes q sections of coding results and s section second converges coding result, pass through second decoder pair The q sections of coding result executes decoding process respectively, obtains q cross-talk ciphertext;And by second decoder to the s section the Two convergence coding results execute decoding process respectively, obtain s section second and converge ciphertext;By the s section second convergence ciphertext segmentation At k-q cross-talk ciphertext, the every section second convergence coding result that the s section second converges in coding result is by k sections of coding results In the data that obtain after at least two sections of coding results series connection in k-q section coding result in addition to the q sections of coding result, q For the positive integer less than or equal to k-2, s is positive integer.
12. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
Processing unit, for taking turns and encrypting in the n during one Encryption Algorithm of application executes n wheel cryptographic operation to plaintext Pass through in at least one wheel cryptographic operation after at least one wheel cryptographic operation in operation and/or in n wheel cryptographic operation First encoder executes coded treatment, wherein the code rate of first encoder be 1, n for the integer greater than 1;
The processing unit is also used to take turns the n ciphertext obtained by second encoder executing at coding after cryptographic operation Reason, obtains coding result, and the code rate of the second encoder is greater than 1.
13. electronic equipment according to claim 12, which is characterized in that the processing unit is specifically used for adding in the i-th wheel Coded treatment is executed by the encrypted result that first encoder obtains the i-th wheel cryptographic operation after close operation, In, i is the positive integer less than or equal to n.
14. electronic equipment according to claim 12, which is characterized in that the processing unit is specifically used for described i-th Take turns the encryption obtained by first encoder to j-th of encrypting step after j-th of encrypting step of cryptographic operation As a result coded treatment is executed, wherein the i-th wheel cryptographic operation includes m encrypting step, and i is just whole less than or equal to n Number, m are the integer greater than 1, and j is the positive integer less than m.
15. 2 to 14 described in any item electronic equipments according to claim 1, which is characterized in that the plaintext includes that k cross-talk is bright Text, k are the integer greater than 1;
First encoder for executing coded treatment to corresponding k sections of data to be encoded in the k cross-talk plaintext respectively;
Alternatively,
First encoder is used to execute coded treatment, the first convergence data to be encoded to the first convergence data to be encoded Refer to the data that will be obtained after the k cross-talk in plain text corresponding k sections of data to be encoded series connection;
Alternatively,
First encoder is used to execute the corresponding p sections of data to be encoded of p cross-talk plaintext in the k cross-talk plaintext respectively Coded treatment, and coded treatment, the r section second convergence number to be encoded are executed respectively to the convergence data to be encoded of r section second Every section of second convergence data to be encoded in are that the k-p cross-talk in the k cross-talk plaintext in addition to the p cross-talk plaintext is bright The data obtained after at least two sections of data to be encoded series connection in the corresponding k-p sections of data to be encoded of text, p is less than or equal to k- 2 positive integer, r are positive integer.
16. 2 to 14 described in any item electronic equipments according to claim 1, which is characterized in that the plaintext includes that k cross-talk is bright Text, the ciphertext includes k cross-talk ciphertext, and the k cross-talk ciphertext corresponds respectively to the k cross-talk in plain text, and k is whole greater than 1 Number;
The processing unit, is specifically used for:
By the second encoder coded treatment is executed to the k cross-talk ciphertext respectively, obtains k sections of coding results;
Alternatively,
Coded treatment is executed to the first convergence ciphertext by the second encoder, obtains the first convergence coding result, described the One convergence ciphertext refers to the data that will be obtained after k cross-talk ciphertext series connection;
Alternatively,
By the second encoder coded treatment is executed to the q cross-talk ciphertext in the k cross-talk ciphertext respectively, obtains q sections of volumes Code result;And ciphertext is converged to s section second by the second encoder and executes coded treatment respectively, obtain the convergence of s section second Coding result, it is that described q sections will be removed in the k cross-talk ciphertext that the s section second, which converges every section second convergence ciphertext in ciphertext, The data obtained after at least two sections of ciphertext series connection in k-q cross-talk ciphertext other than sub- ciphertext, q is just less than or equal to k-2 Integer, s are positive integer.
17. 2 to 14 described in any item electronic equipments according to claim 1, which is characterized in that
The processing unit is also used to determine at least one of following information according to the corresponding key of the Encryption Algorithm: described the The multinomial of one encoder, the puncturing patterns of first encoder, the quantity of first encoder, first encoder Insertion position.
18. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
Processing unit obtains ciphertext, the coding result is for executing decoding process to coding result by the second decoder What coded treatment obtained is executed to the ciphertext by second encoder, the ciphertext is to execute using an Encryption Algorithm to plaintext N wheel cryptographic operation obtains, wherein after at least one wheel cryptographic operation in n wheel cryptographic operation and/or in the n It takes turns at least one wheel cryptographic operation in cryptographic operation and coded treatment, the code of the second encoder is executed by the first encoder Rate is greater than 1, and it is the integer greater than 1 that the code rate of first encoder, which is equal to 1, n,;
The processing unit is also used to execute n corresponding with n wheel cryptographic operation to the ciphertext in one decipherment algorithm of application Wheel decryption oprerations obtain the plaintext during, the n wheel decryption oprerations at least one wheel decryption oprerations before and/or Decoding process is executed by the first decoder in at least one wheel decryption oprerations in n wheel decryption oprerations.
19. electronic equipment according to claim 18, which is characterized in that the processing unit is specifically used in the n-th-i+1 The decrypted result that decryption oprerations obtain is taken turns to the n-th-i by first decoder before wheel decryption oprerations and executes decoding process, Wherein, i is the positive integer less than or equal to n.
20. electronic equipment according to claim 18, which is characterized in that the processing unit is specifically used in the n-th-i+1 Decryption oprerations are taken turns to the n-th-i+1 by first decoder before taking turns the m-j+1 decryption step of decryption oprerations The decrypted result that the m-j decryption step obtains executes decoding process, wherein the n-th-i+1 wheel decryption oprerations include m solution Close step, i are the positive integer less than or equal to n, and m is the integer greater than 1, and j is the positive integer less than m.
21. 8 to 20 described in any item electronic equipments according to claim 1, which is characterized in that the ciphertext includes that k cross-talk is close Text, k are the integer greater than 1;
First decoder for executing decoding process to k sections of data to be decoded corresponding in the k cross-talk ciphertext respectively;
Alternatively,
First decoder is used to execute decoding process, the first convergence data to be decoded to the first convergence data to be decoded Refer to the data that will be obtained after the corresponding k sections of data concatenating to be decoded of the k cross-talk ciphertext;
Alternatively,
First decoder for executing the corresponding p sections of data to be decoded of p cross-talk ciphertext in the k cross-talk ciphertext respectively Decoding process, and decoding process, the r section second convergence number to be decoded are executed respectively to the convergence data to be decoded of r section second Every section of second convergence data to be decoded in are that the k-p cross-talk in the k cross-talk ciphertext in addition to the p cross-talk ciphertext is close The data obtained after at least two sections of data concatenatings to be decoded in the corresponding k-p sections of data to be decoded of text, p are less than or equal to k- 2 positive integer, r are positive integer.
22. 8 to 20 described in any item electronic equipments according to claim 1, which is characterized in that the processing unit, it is specific to use In:
When the coding result includes k sections of coding results, the k sections of coding result is held respectively by second decoder Row decoding process obtains k cross-talk ciphertext, and the k cross-talk ciphertext corresponds respectively to the k sections of coding result, and k is whole greater than 1 Number;
Alternatively,
When the first convergence coding result obtained after the coding result is that k sections of coding results are connected, pass through described second Decoder executes decoding process to the first convergence coding result, obtains the first convergence ciphertext;By the first convergence ciphertext It is divided into k cross-talk ciphertext, the k cross-talk ciphertext corresponds respectively to the k sections of coding result, and k is the integer greater than 1;
Alternatively,
When the coding result includes q sections of coding results and s section second converges coding result, pass through second decoder pair The q sections of coding result executes decoding process respectively, obtains q cross-talk ciphertext;And by second decoder to the s section the Two convergence coding results execute decoding process respectively, obtain s section second and converge ciphertext;By the s section second convergence ciphertext segmentation At k-q cross-talk ciphertext, the every section second convergence coding result that the s section second converges in coding result is by k sections of coding results In the data that obtain after at least two sections of coding results series connection in k-q section coding result in addition to the q sections of coding result, q For the positive integer less than or equal to k-2, s is positive integer.
23. a kind of computer storage medium, which is characterized in that be stored with executable instruction, institute in the computer storage medium State executable instruction for execute such as method as claimed in any one of claims 1 to 6, and/or, for executing such as claim 7 To 11 described in any item methods.
CN201710642284.8A 2017-07-31 2017-07-31 Security coding method, decoding method and device Active CN109327276B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710642284.8A CN109327276B (en) 2017-07-31 2017-07-31 Security coding method, decoding method and device
PCT/CN2018/090876 WO2019024607A1 (en) 2017-07-31 2018-06-12 Secure coding method, and decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710642284.8A CN109327276B (en) 2017-07-31 2017-07-31 Security coding method, decoding method and device

Publications (2)

Publication Number Publication Date
CN109327276A true CN109327276A (en) 2019-02-12
CN109327276B CN109327276B (en) 2021-07-09

Family

ID=65233356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710642284.8A Active CN109327276B (en) 2017-07-31 2017-07-31 Security coding method, decoding method and device

Country Status (2)

Country Link
CN (1) CN109327276B (en)
WO (1) WO2019024607A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110312141A (en) * 2019-07-05 2019-10-08 杭州当虹科技股份有限公司 A kind of event mode internet live broadcasting method

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111064562A (en) * 2019-12-12 2020-04-24 北京计算机技术及应用研究所 Implementation method of AES algorithm on FPGA
IT202100018944A1 (en) * 2021-07-16 2023-01-16 Fabio Caprabianca Data encryption system for sensors and microcontroller systems

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938350A (en) * 2010-07-16 2011-01-05 黑龙江大学 File encryption and decryption method based on combinatorial coding
CN102571331A (en) * 2012-02-07 2012-07-11 中国科学院软件研究所 Cryptographic algorithm realization protecting method used for defending energy analysis attacks
CN103314546A (en) * 2011-01-21 2013-09-18 阿尔卡特朗讯 Methods and apparatus for simultaneous transmission and reception of a data sequence and channel information for link adaptation
WO2014182286A1 (en) * 2013-05-07 2014-11-13 Empire Technology Development, Llc Rapid data encryption and decryption
CN105245315A (en) * 2015-10-27 2016-01-13 成都卫士通信息产业股份有限公司 Method and system for information secrecy storage by encoding
CN106664196A (en) * 2014-07-11 2017-05-10 三星电子株式会社 Method and apparatus of joint security advanced ldpc cryptcoding

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10204532B2 (en) * 2015-09-25 2019-02-12 Intel Corporation Multiple input cryptographic engine
CN105933107B (en) * 2016-04-22 2020-12-15 北京航空航天大学 Error correction encryption method based on LDPC (Low Density parity check) transcoding technology

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938350A (en) * 2010-07-16 2011-01-05 黑龙江大学 File encryption and decryption method based on combinatorial coding
CN103314546A (en) * 2011-01-21 2013-09-18 阿尔卡特朗讯 Methods and apparatus for simultaneous transmission and reception of a data sequence and channel information for link adaptation
CN102571331A (en) * 2012-02-07 2012-07-11 中国科学院软件研究所 Cryptographic algorithm realization protecting method used for defending energy analysis attacks
WO2014182286A1 (en) * 2013-05-07 2014-11-13 Empire Technology Development, Llc Rapid data encryption and decryption
CN106664196A (en) * 2014-07-11 2017-05-10 三星电子株式会社 Method and apparatus of joint security advanced ldpc cryptcoding
CN105245315A (en) * 2015-10-27 2016-01-13 成都卫士通信息产业股份有限公司 Method and system for information secrecy storage by encoding

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110312141A (en) * 2019-07-05 2019-10-08 杭州当虹科技股份有限公司 A kind of event mode internet live broadcasting method

Also Published As

Publication number Publication date
WO2019024607A1 (en) 2019-02-07
CN109327276B (en) 2021-07-09

Similar Documents

Publication Publication Date Title
JP5564434B2 (en) Methods and entities for probabilistic symmetric encryption
CN102171646B (en) Method and apparatus to perform redundant array of independent disks (RAID) operations
US9571270B2 (en) Construction and uses of variable-input-length tweakable ciphers
JP4553330B2 (en) Encoding apparatus and method, decoding apparatus and method, information processing apparatus and method, and storage medium
CN107147487B (en) Symmetric key random block cipher
CN106850221A (en) Information encryption and decryption method and device
Alsaidi et al. Compression multi-level crypto stego security of texts utilizing colored email forwarding
JPWO2007126049A1 (en) Program obfuscation system, program obfuscation apparatus, and program obfuscation method
JP7065888B2 (en) Cryptographic devices and methods
TW201044334A (en) Encryption device, encryption method, and computer program
JPH09230786A (en) Encoding method of data and device therefor
CN109327276A (en) Secure coding method, coding/decoding method and equipment
CN104769881A (en) AES implementation with error correction
US10666437B2 (en) Customizable encryption/decryption algorithm
WO2018115143A1 (en) A calculation device for encoded addition
Elleuch et al. A public-key cryptosystem from interleaved Goppa codes
JP2010524014A (en) A low complexity encryption method for content encoded by rateless codes
JP2008099243A (en) Error correction encoding device, error correction encoding method, and program
Trinca Sequential and parallel cascaded convolutional encryption with local propagation: Toward future directions in symmetric cryptography
CN102355348A (en) Fault-tolerant data encryption standard (DES) algorithm accelerator
CN102542070B (en) Method for structuring one-way Hash function based on random function
Dolmatov GOST R 34.11-94: Hash Function Algorithm
CN110071927B (en) Information encryption method, system and related components
CN102546159B (en) Random one-way hash function construction method capable of preventing table check-up attack
Das et al. Combined Substitution-Box Based AES Algorithm for Low Power and High Speed Crypto-Coder System

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant