CN103905186B - A kind of encryption method - Google Patents
A kind of encryption method Download PDFInfo
- Publication number
- CN103905186B CN103905186B CN201410065138.XA CN201410065138A CN103905186B CN 103905186 B CN103905186 B CN 103905186B CN 201410065138 A CN201410065138 A CN 201410065138A CN 103905186 B CN103905186 B CN 103905186B
- Authority
- CN
- China
- Prior art keywords
- bit
- nlf
- key
- xor
- encryption method
- 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.)
- Expired - Fee Related
Links
Landscapes
- Storage Device Security (AREA)
Abstract
The present invention relates to a kind of encryption method.It comprises the following steps:Original text X is using 32 expressions;A nonlinear function is defined, expression formula is:F(NLF1、NLF2、NLF3、NLF4、NLF5);In 32-bit number, 5 numerals are taken:I0、I1、I2、I3、I4;64 key key are set;Setting circulation initial value N and initial value B;1≦B≦63;Set cyclic variable i;0≦i<N*64+B;X(i+1)=X(i)>>1 XOR (bit (X (i), 0) XOR bit (X (i), B) XOR bit (key, i&63) XOR bit (NLF, g5 (X (i), I0, I1, I2, I3, I4)))<<31);And X(0)=X, X(N*64+B)For ciphertext.Encryption method encryption of the present invention is strong, is not easy to crack.
Description
Technical field
The invention belongs to the information technology security fields of communication, a kind of encryption method is related in particular to.
Background technology
With the development of society, power system is also rapidly developed, in order that power system conveying, distribution,
The links such as electricity consumption can be run well, be typically controlled using intelligent grid, can with reach power network electricity consumption
By property, the target to economize on resources.
And " intelligent grid " is typically all to match somebody with somebody electricity consumption remote monitoring system platform, network data is transmitted by public network,
Therefore data there is a possibility that to be stolen and attacked and simulate by hacker or criminal in transmitting procedure.Therefore
Need to develop a kind of new enciphering and deciphering algorithm and supported for this, data are strengthened protecting.
It is a kind of very common technological means in the signal encryption that communication field uses, as shared key pin mode
One of design, be referred to as Feistel cryptography architectures when more conventional at present.Such as Application No. 200780003386.X
Chinese invention patent, it is entitled:Encryption processing apparatus, encryption/decryption device manufacturing device and method and computer program,
In this application patent, the method for use is:Perform the multiple Feistel type shared key block encryptions of SP type F function repetitive cyclings
The Cipher Processing step of processing, the Cipher Processing that make use of Cipher Processing elementary cell is performed, wherein SP types F functions are performed and included
Nonlinear transformation processing and the data conversion process of linear transformation processing;It is mainly entered by multiple cyclical-transformation function
Row encryption, but this encryption, in the case of original documents and the composition of decryption key are got, are just easier to crack.
The content of the invention
It is an object of the invention to solve the deficiencies in the prior art, there is provided a kind of encryption method, the encryption of the encryption method
Intensity is high, is not easy to crack.
The technical solution adopted by the present invention is:
A kind of encryption method, comprises the following steps:
A kind of encryption method, it is characterised in that:Comprise the following steps:
Original text is indicated using the binary digit of 32, and is expressed as X;
In 32-bit number, 5 numerals with uniform properties are randomly selected:I0、I1、I2、I3、I4;Uniform properties are
Refer to, when carrying out binary expression, the ratio that code 1 and code 0 occur is 1: 1;
The key key of 64 is set;
Setting circulation initial value N and initial value B;Wherein 1≤B≤31;
Set cyclic variable i;0≤i < N*64+B
Wherein, X (i+1)=XORs of X (i) > > 1 (bit (X (i), 0) XOR bit (X (i), B) XOR bit (key, i&
63) XOR bit (NLF, g5 (X (i), I0, I1, I2, I3, I4)) < < 31);
Wherein, bit (X (i), B) represents X (i) data of 32, takes B positions;
NLF=nlf [B], set array:Nlf [64]=0x3A5C742E, 0x3A5CE427,0x3A5C724E,
0x3A5CE247,0x3A5C2E74,0x3A5C27E4,0x3A5C4E72,0x3A5C47E2,0x35AC742E, 0x35ACE427,
0x35AC724E, 0x35ACE247,0x35AC2E74,0x35AC27E4,0x35AC4E72,0x35AC47E2,0xCA53742E,
0xCA53E427,0xCA53724E, 0xCA53E247,0xCA532E74,0xCA5327E4,0xCA534E72,0xCA5347E2,
0xC5A3742E, 0xC5A3E427,0xC5A3724E, 0xC5A3E247,0xC5A32E74,0xC5A327E4,0xC5A34E72,
0xC5A347E2,0xAC35742E, 0xAC35E427,0xAC35724E, 0xAC35E247,0xAC352E74,0xAC3527E4,
0xAC354E72,0xAC3547E2,0xA3C5742E, 0xA3C5E427,0xA3C5724E, 0xA3C5E247,0xA3C52E74,
0xA3C527E4,0xA3C54E72,0xA3C547E2,0x5C3A742E, 0x5C3AE427,0x5C3A724E, 0x5C3AE247,
0x5C3A2E74,0x5C3A27E4,0x5C3A4E72,0x5C3A47E2,0x53CA742E, 0x53CAE427,0x53CA724E,
0x53CAE247,0x53CA2E74,0x53CA27E4,0x53CA4E72,0x53CA47E2 };
G5 (X (i), I0, I1, I2, I3, I4) represents to take X (i) I 0, I1, I2, I3, I4 position, then by this 5 bit digital according to
It is secondary to rearrange data;
And X (0)=X, X (N*64+B) is ciphertext.
In ciphering process, in binary expression formula, its numeral 1 and 0 has and circulated, be right with occupying 50% NLF
The characteristic of title.In addition, in ciphering process, N values, B values are that encipherer oneself determines, it is determined that carrying out the number of circular treatment;Cause
This, the encryption method has larger randomness.
Beneficial effects of the present invention are:Encryption method of the present invention, using special NLF values, " 1 " code and " 0 " code of NLF values
Occurrence number is identical, because NLF can have and white noise with random value, hence in so that its distribution regularity is not strong, after encryption
The similar pseudo-randomness feature of sound.
Embodiment
The present invention is further illustrated with reference to the accompanying drawings and detailed description.
Embodiment:
A kind of encryption method, comprises the following steps:
Original text is indicated using the binary digit of 32, and is expressed as X;X is any of which numeral in original text;It is right
X is encrypted.
A nonlinear function is defined, the nonlinear function there are 5 parameters, and expression formula is:F(NLF1、NLF 2、NLF 3、
NLF 4、NLF 5);
In 32-bit number, 5 numerals with uniform properties are randomly selected:I0、I1、I2、I3、I4;
Uniform properties mentioned here refer to, when carrying out binary expression, the ratio that code 1 and code 0 occur is 1:
1。
Exemplified by example 0x3A5C742E
The accountings 50% of 0x3A=0011 1,010 1 and 0
The accountings 50% of 0x5C=0101 1,100 1 and 0
The accountings 50% of 0x74=0111 0,100 1 and 0
The accountings 50% of 0x2E=0010 1,110 1 and 0
Therefore 0x3A5C742E has uniformity.
The key of 64, key are set;
Setting circulation initial value N and initial value B;Wherein 1≤B≤63;
Set cyclic variable i;0≤i < N*64+B
Wherein, X (i+1)=XORs of X (i) > > 1 (bit (X (i), 0) XOR bit (X (i), B) XOR bit (key, i&
63) XOR bit (NLF, g5 (X (i), I0, I1, I2, I3, I4))) < < 31);
And X (0)=X, X (N*64+B) is ciphertext.I.e. original text X numerals correspond to ciphertext X (N*64+B).
Bit (X (i), B) represents original text X (i) data (32bit), takes B positions.
G5 (X (i), I0, I1, I2, I3, I4) represents to take plaintext X (i) I 0, I1, I2, I3, I4 position;Again by this 5 digit
Word is arranged in order composition data.
It is exemplified below:
G5_Xbit=g5 (X, 1,9,20,26,31);
Expression takes plaintext X No.1, No.9, No.20, No.26, No.31.
I0, I1, I2, I3, I4 are No.1 No.9 No.20 No.26 No.31.
Set array:Nlf [64]=0x3A5C742E, 0x3A5CE427,0x3A5C724E, 0x3A5CE247,
0x3A5C2E74,0x3A5C27E4,0x3A5C4E72,0x3A5C47E2,0x35AC742E, 0x35ACE427,0x35AC724E,
0x35ACE247,0x35AC2E74,0x35AC27E4,0x35AC4E72,0x35AC47E2,0xCA53742E, 0xCA53E427,
0xCA53724E, 0xCA53E247,0xCA532E74,0xCA5327E4,0xCA534E72,0xCA5347E2,0xC5A3742E,
0xC5A3E427,0xC5A3724E, 0xC5A3E247,0xC5A32E74,0xC5A327E4,0xC5A34E72,0xC5A347E2,
0xAC35742E, 0xAC35E427,0xAC35724E, 0xAC35E247,0xAC352E74,0xAC3527E4,0xAC354E72,
0xAC3547E2,0xA3C5742E, 0xA3C5E427,0xA3C5724E, 0xA3C5E247,0xA3C52E74,0xA3C527E4,
0xA3C54E72,0xA3C547E2,0x5C3A742E, 0x5C3AE427,0x5C3A724E, 0x5C3AE247,0x5C3A2E74,
0x5C3A27E4,0x5C3A4E72,0x5C3A47E2,0x53CA742E, 0x53CAE427,0x53CA724E, 0x53CAE247,
0x53CA2E74,0x53CA27E4,0x53CA4E72,0x53CA47E2 }
NLF=nlf [B].
In decryption, using following steps:
Ciphertext numeral is arranged to X,
Wherein, X (i+1)=XORs of X (i) < < 1 (bit (X (i), 31) XOR bit (X (i), B-1) XORs bit (key,
(B-1-i) &63) XOR bit (NLF, g5 (X (i), I0, I1, I2, I3, I4)));
Ciphertext X homographic solutions ciphertext (original text) X (N*64+B).
In the present invention, because N, B, NLF three are that encipherer oneself determines, it are obviously improved, make to Cipher Strength
The personnel of cracking are difficult to break through, even if also being difficult to break through in the premise for listening to multigroup original text and inside decryption key.Calculated for encryption
Method, preferably for wide spectrums such as electric power, gate inhibition, automotive electronics.
The present invention explains, it will be understood by those within the art that, can be to the technology of the present invention
Scheme is modified or equivalent substitution, without departing from the spirit and scope of technical solution of the present invention.
Claims (1)
- A kind of 1. encryption method, it is characterised in that:The encryption method is used for intelligent grid, comprises the following steps:Original text is indicated using the binary digit of 32, and is expressed as X;In 32-bit number, 5 numerals with uniform properties are randomly selected:I0、I1、I2、I3、I4;Uniform properties refer to, When carrying out binary expression, the ratio that code 1 and code 0 occur is 1:1;The key key of 64 is set;Setting circulation initial value N and initial value B;Wherein 1≤B≤31;Set cyclic variable i;0≦i<N*64+BWherein, X (i+1)=X (i)>>1 XOR (bit (X (i), 0) XOR bit (X (i), B) XORs bit (key, i&63) XOR Bit (NLF, g5 (X (i), I0, I1, I2, I3, I4))<<31);Wherein, bit (X (i), B) represents X (i) data of 32, takes B positions;NLF=nlf [B], set array:Nlf [64]=0x3A5C742E, 0x3A5CE427,0x3A5C724E, 0x3A5CE247,0x3A5C2E74,0x3A5C27E4,0x3A5C4E72,0x3A5C47E2,0x35AC742E,0x35ACE427, 0x35AC724E,0x35ACE247,0x35AC2E74,0x35AC27E4,0x35AC4E72,0x35AC47E2,0xCA53742E, 0xCA53E427,0xCA53724E,0xCA53E247,0xCA532E74,0xCA5327E4,0xCA534E72,0xCA5347E2, 0xC5A3742E,0xC5A3E427,0xC5A3724E,0xC5A3E247,0xC5A32E74,0xC5A327E4,0xC5A34E72, 0xC5A347E2,0xAC35742E,0xAC35E427,0xAC35724E,0xAC35E247, 0xAC352E74, 0xAC3527E4,0xAC354E72,0xAC3547E2,0xA3C5742E,0xA3C5E427,0xA3C5724E,0xA3C5E247, 0xA3C52E74,0xA3C527E4,0xA3C54E72,0xA3C547E2,0x5C3A742E,0x5C3AE427,0x5C3A724E, 0x5C3AE247,0x5C3A2E74,0x5C3A27E4,0x5C3A4E72,0x5C3A47E2,0x53CA742E,0x53CAE427, 0x53CA724E,0x53CAE247,0x53CA2E74,0x53CA27E4,0x53CA4E72,0x53CA47E2};G5 (X (i), I0, I1, I2, I3, I4) represents to take X (i) I 0, I1, I2, I3, I4 position, then is arranged successively by this 5 bit digital Row composition data;And X (0)=X, X (N*64+B) is ciphertext.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410065138.XA CN103905186B (en) | 2014-02-26 | 2014-02-26 | A kind of encryption method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410065138.XA CN103905186B (en) | 2014-02-26 | 2014-02-26 | A kind of encryption method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103905186A CN103905186A (en) | 2014-07-02 |
CN103905186B true CN103905186B (en) | 2017-12-05 |
Family
ID=50996343
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410065138.XA Expired - Fee Related CN103905186B (en) | 2014-02-26 | 2014-02-26 | A kind of encryption method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103905186B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107659396B (en) * | 2016-07-23 | 2022-07-22 | 东莞宏大动力科技有限公司 | Dynamic encryption method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6490354B2 (en) * | 1998-06-23 | 2002-12-03 | Microsoft Corporation | Lightweight word-oriented technique for generating a pseudo-random sequence for use in a keystream of a stream cipher |
CN101371286A (en) * | 2006-01-17 | 2009-02-18 | 索尼株式会社 | Encryption/decryption device, encryption/decryption method, and computer program |
CN103051442A (en) * | 2012-10-16 | 2013-04-17 | 中国科学院软件研究所 | Cipher device adopting Feistel-PG structure and encryption method |
-
2014
- 2014-02-26 CN CN201410065138.XA patent/CN103905186B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6490354B2 (en) * | 1998-06-23 | 2002-12-03 | Microsoft Corporation | Lightweight word-oriented technique for generating a pseudo-random sequence for use in a keystream of a stream cipher |
CN101371286A (en) * | 2006-01-17 | 2009-02-18 | 索尼株式会社 | Encryption/decryption device, encryption/decryption method, and computer program |
CN103051442A (en) * | 2012-10-16 | 2013-04-17 | 中国科学院软件研究所 | Cipher device adopting Feistel-PG structure and encryption method |
Non-Patent Citations (1)
Title |
---|
基于随机码数列的文件加密算法的实现;孙玉强等;《微计算机信息》;20070228;第23卷(第2期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN103905186A (en) | 2014-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105681025B (en) | A kind of safe whitepack implementation method and device of country password standard algorithm SM4 | |
Zhang et al. | Cryptanalysis of S-box-only chaotic image ciphers against chosen plaintext attack | |
EP3154217B1 (en) | Scrambled tweak mode of block ciphers for differential power analysis resistant encryption | |
US20150172053A1 (en) | Method for converting a conditional access content and receiver for the implementation for said method | |
Xu et al. | An improved chaotic cryptosystem based on circular bit shift and XOR operations | |
CN101242265A (en) | Stream password and pseudorandom number generation method in secure system | |
CN108429613A (en) | A kind of electric network information encryption method based on EN-PRESENT algorithms | |
CN104410490B (en) | The method of non-linear extruding protection password S boxes | |
Zhou et al. | Image encryption algorithm based on DNA sequences for the big image | |
CN103440613A (en) | Color-image encryption method for hyperchaotic Rossler system | |
CN101867471A (en) | Irrational number based DES authentication encryption algorithm | |
Hu et al. | On the Security Analysis of a Hopfield Chaotic Neural Network‐Based Image Encryption Algorithm | |
Soni et al. | Key generation using genetic algorithm for image encryption | |
Srilaya et al. | Performance evaluation for des and AES algorithms-an comprehensive overview | |
CN105337732A (en) | Encryption method capable of processing large data packets | |
Wang et al. | A side-channel attack on a bitsliced higher-order masked CRYSTALS-Kyber implementation | |
CN103905186B (en) | A kind of encryption method | |
Tang et al. | A one-time pad encryption algorithm based on one-way hash and conventional block cipher | |
Yoo et al. | A method for secure and efficient block cipher using white-box cryptography | |
CN106921486A (en) | The method and apparatus of data encryption | |
CN102523085A (en) | Data encryption method, data encrypting device and smart card | |
Gong | [Retracted] Application Research of Data Encryption Algorithm in Computer Security Management | |
Nayak et al. | MSIT: a modified lightweight algorithm for secure internet of things | |
Zhang | [Retracted] Application of Information Encryption Technology in Computer Network Communication Security | |
Zhang | Comments on “Color image encryption using Choquet fuzzy integral and hyper chaotic system” |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 215100 Jiangsu city of Suzhou province Xiangcheng District metro rail to South Road No. 58 Patentee after: Suzhou Lange intelligent Limited by Share Ltd Address before: Suzhou City, Jiangsu province 215100 Guangji Road No. 5099 Patentee before: SUZHOU LONGER INTELLIGENT POWER DISTRIBUTION SYSTEM CO., LTD. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171205 Termination date: 20190226 |