CN103580851A - Information encryption and decryption method - Google Patents
Information encryption and decryption method Download PDFInfo
- Publication number
- CN103580851A CN103580851A CN201310566725.2A CN201310566725A CN103580851A CN 103580851 A CN103580851 A CN 103580851A CN 201310566725 A CN201310566725 A CN 201310566725A CN 103580851 A CN103580851 A CN 103580851A
- Authority
- CN
- China
- Prior art keywords
- key
- encryption
- plaintext
- byte stream
- base64
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Storage Device Security (AREA)
Abstract
The invention discloses an information encryption and decryption method. A replacement/permutation network method is adopted to fix cleartext packet length as 128b, and the key expansion process and the encryption process are carried out. The method is achieved through shifting and the exclusive OR operation achieved by the combinatorial logic. The achieving method replaces the complex multiplication, the encryption speed is increased, parallel running water is adopted to process a plurality of data blocks at the same time, and the throughput capacity is improved. Base64 is adopted by the calculated binary data to conduct secondary encryption on ciphertext and secrete key encryption, messages between different platforms are communicated through the base64 message mode, the platforms conduct analysis on results obtained after the base64 encryption, the problem of the difference between the message analysis results of the different platforms is solved, and the cross-platform data encryption and decryption are achieved.
Description
Technical field
The present invention relates to a kind of information encryption and decryption method, particularly relate to a kind of AES information encipher-decipher method of cross-platform intercommunication.
Background technology
Maintain secrecy and Safety Industry environment for use in, mobile device, computer, various large server Coordination Treatment are very universal, how to guarantee the safety of the data message between system, information is not seemed extremely important by simple decoding.Simple encrypting and decrypting well guarantee information be not cracked; AES has converged strong security, high-performance, high efficiency, the advantage such as easy-to-use and flexible as data encryption standard of new generation, is the encrypting and decrypting algorithm that a kind of fail safe, performance are high, is applied in every field; Between different platform, information is shared, message information is carried out to safety encipher, because differentiation, fragmentation between platform are used management, translation to the message after encrypting, key etc. between different platform to become extremely difficult.
Summary of the invention
Technical problem to be solved by this invention is to provide a kind of information encryption and decryption method, can, in different platforms, realize safe information mutual communication mode.
For solving the problems of the technologies described above, a kind of information ciphering method provided by the invention, comprising:
Step 1, for different platforms, Uniting the same encryption end, need plaintext and the key string encrypted encrypting end input;
Step 2, encryption end, according to the instruction of encrypting, read plaintext, the key of input, resolve to corresponding plaintext byte stream;
Step 3, encrypt end and plaintext byte stream, key byte stream are carried out to aes algorithm encrypt initialization, the matrix that initialization is 16 * 16 is box instead, is called S-box, obtains key array and generates a w[by name with it] key schedule table; W[] the initial capable seed that is used as of Nk, with primary key value (0x00 is to 0x17), residue row produces from seed key.Variable Nk representative is with the seed key length of 32Wei Ziwei unit; Further with key schedule table w[] in front four lines State matrix is carried out to XOR (XOR) operation of a byte of a byte, and with key schedule table w[c, r] XOR input State[r, c], r represents that r is capable, c represents columns c row; Input array to State(state by name of further copy 16 bytes) in 4 * 4 byte matrixes;
Step 4, encryption end carry out aes algorithm encryption to plaintext byte stream, key byte stream, and major cycle is carried out SubBytes, ShiftRows, MixColumns and AddRoundKey to State matrix;
Step 5, encryption postbyte encrypt data, carry out Base64 superencipher, is converted to Base64 character string; Character string result after output is encrypted.
, comprising:
Step 1, plaintext and the key string that in decrypting end input, need to encrypt;
Step 2, decrypting end, according to the instruction of deciphering, read ciphertext, the key of input; Ciphertext is first carried out to base64 deciphering, resolve to corresponding ciphertext byte stream; Key is carried out to base64 deciphering, resolve to corresponding key word throttling;
Step 3, to ciphertext byte stream, key word throttling, adopt AES decipherment algorithm to be decrypted, the plaintext byte stream after being deciphered;
Plaintext byte stream after step 4, deciphering, unified walking around changes GBK format string into, output.
Information encryption of the present invention and decryption method are in the terminal of different platform, by secret key encryption is become to base64, while being encrypted algorithm calculating, decrypt ciphertext is become to byte stream, in employing AES cryptographic algorithm, calculate, ciphertext byte stream by after encrypting, reuses base64 and is encrypted, the ciphertext character string after being encrypted; Ciphertext character string after encryption, and base64 encrypts rear key, jointly be transferred to decrypting end, decrypting end is carried out base64 deciphering to ciphertext, key, be converted to ciphertext byte stream and key word throttling, by AES decipherment algorithm, parse expressly byte stream, carry out GBK code conversion, obtained the plaintext character string after deciphering.Overcome between different platform the problem that AES encrypts, deciphering cannot intercommunication.
Embodiment
Below in conjunction with embodiment, the present invention is further detailed explanation:
Information ciphering method of the present invention: comprising:
Step 1, for different platforms, Uniting the same encipher interface, need plaintext and the key string encrypted encrypting end input, wherein key is encrypted by base64;
Step 2, encryption end, according to the instruction of encrypting, read plaintext, the key of input, resolve to corresponding plaintext byte stream;
Step 3, encrypt end and plaintext byte stream, key byte stream are carried out to aes algorithm encrypt initialization, the matrix that initialization is 16 * 16 is box instead, is called S-box, obtains key array and generates a w[by name with it] key schedule table; W[] the initial capable seed that is used as of Nk, with primary key value (0x00 is to 0x17), residue row produces from seed key.Variable Nk representative is with the seed key length of 32Wei Ziwei unit; Further with key schedule table w[] in front four lines State matrix is carried out to XOR (XOR) operation of a byte of a byte, and with key schedule table w[c, r] XOR input State[r, c], r represents that r is capable, c represents columns c row; Input array to State(state by name of further copy 16 bytes) in 4 * 4 byte matrixes.
Step 4, encrypt end plaintext byte stream, key byte stream are carried out to aes algorithm encryption, major cycle is carried out SubBytes(byte to State matrix and is replaced), the conversion of ShiftRows(line displacement), MixColumns(mixcolumns) and AddRoundKey(key addition);
Step 5, encryption postbyte encrypt data, carry out Base64 superencipher, is converted to Base64 character string; Character string result after output is encrypted.
Decrypts information method of the present invention: comprising:
Step 1, plaintext and the key string that in decrypting end input, need to encrypt, wherein key is encrypted by base64;
Step 2, decrypting end, according to the instruction of deciphering, read ciphertext, the key of input; Ciphertext is first carried out to base64 deciphering, resolve to corresponding ciphertext byte stream; Key is carried out to base64 deciphering, resolve to corresponding key word throttling.
Step 3, to ciphertext byte stream, key word throttling, adopt AES decipherment algorithm to be decrypted, the plaintext byte stream after being deciphered;
Plaintext byte stream after step 4, deciphering, unified walking around changes GBK format string into, output.
By specific embodiment, the present invention is had been described in detail above, but these are not construed as limiting the invention.Without departing from the principles of the present invention, those skilled in the art also can make many distortion and improvement, and these also should be considered as protection scope of the present invention.
Claims (2)
1. an information ciphering method, is characterized in that, comprising:
Step 1, for different platforms, Uniting the same encryption end, need plaintext and the key string encrypted encrypting end input;
Step 2, encryption end, according to the instruction of encrypting, read plaintext, the key of input, resolve to corresponding plaintext byte stream;
Step 3, encrypt end and plaintext byte stream, key byte stream are carried out to aes algorithm encrypt initialization, the matrix that initialization is 16 * 16 is box instead, is called S-box, obtains key array and generates a w[by name with it] key schedule table; W[] the initial capable seed that is used as of Nk, with primary key value (0x00 is to 0x17), residue row produces from seed key; Nk representative is with the seed key length of 32Wei Ziwei unit; Further with key schedule table w[] in front four lines State matrix is carried out to XOR (XOR) operation of a byte of a byte, and with key schedule table w[c, r] XOR input State[r, c], r represents that r is capable, c represents columns c row; Further in 4 * 4 byte matrixes of input array to State by name (state) of copy 16 bytes;
Step 4, encryption end carry out aes algorithm encryption to plaintext byte stream, key byte stream, and major cycle is carried out SubBytes, ShiftRows, MixColumns and AddRoundKey to State matrix;
Step 5, encryption postbyte encrypt data, carry out Base64 superencipher, is converted to Base64 character string; Character string result after output is encrypted.
2. a decrypts information method for information ciphering method as claimed in claim 1, is characterized in that, comprising:
Step 1, plaintext and the key string that in decrypting end input, need to encrypt;
Step 2, decrypting end, according to the instruction of deciphering, read ciphertext, the key of input; Ciphertext is first carried out to base64 deciphering, resolve to corresponding ciphertext byte stream; Key is carried out to base64 deciphering, resolve to corresponding key word throttling;
Step 3, to ciphertext byte stream, key word throttling, adopt AES decipherment algorithm to be decrypted, the plaintext byte stream after being deciphered;
Plaintext byte stream after step 4, deciphering, unified walking around changes GBK format string into, output.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310566725.2A CN103580851A (en) | 2013-11-13 | 2013-11-13 | Information encryption and decryption method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310566725.2A CN103580851A (en) | 2013-11-13 | 2013-11-13 | Information encryption and decryption method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103580851A true CN103580851A (en) | 2014-02-12 |
Family
ID=50051849
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310566725.2A Pending CN103580851A (en) | 2013-11-13 | 2013-11-13 | Information encryption and decryption method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103580851A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104393988A (en) * | 2014-12-03 | 2015-03-04 | 浪潮(北京)电子信息产业有限公司 | Reversible data encryption method and device |
CN104486756A (en) * | 2014-12-05 | 2015-04-01 | 深圳职业技术学院 | Encryption and decryption method and system for secret letter short message |
CN105245335A (en) * | 2015-11-03 | 2016-01-13 | 天津津航计算技术研究所 | Real-time secret key updating system and method |
CN106066843A (en) * | 2016-06-02 | 2016-11-02 | 北京赛思信安技术股份有限公司 | A kind of parallel coding and decoding device of high speed Base64 |
CN109993759A (en) * | 2019-02-27 | 2019-07-09 | 深圳点猫科技有限公司 | A kind of data calling method and device for education resource platform |
CN111314053A (en) * | 2018-12-12 | 2020-06-19 | 上海领甲数据科技有限公司 | Data encryption and decryption method based on uniform distribution symmetric algorithm |
CN113593073A (en) * | 2021-07-30 | 2021-11-02 | 杭州新视窗信息技术有限公司 | NFC intelligent inspection method based on background management system and inspection system |
CN115643103A (en) * | 2022-11-03 | 2023-01-24 | 浪潮云信息技术股份公司 | Big data encryption method using redundancy elimination technology |
CN115834258A (en) * | 2023-02-20 | 2023-03-21 | 成都九洲电子信息系统股份有限公司 | Cross-platform information identification method, system and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1479480A (en) * | 2002-08-26 | 2004-03-03 | 华为技术有限公司 | Method of consulted encryption algorithm |
EP1531578A1 (en) * | 2002-08-08 | 2005-05-18 | Matsushita Electric Industrial Co., Ltd. | Encrypting/decrypting device and method, encrypting device and method, decrypting device and method, and transmitting/receiving device |
CN101183374A (en) * | 2007-10-17 | 2008-05-21 | 北京逍遥掌信息技术有限公司 | Mobile terminal apparatus electronic file memory structure and management techniques |
CN102684877A (en) * | 2012-03-31 | 2012-09-19 | 奇智软件(北京)有限公司 | Method and device for carrying out user information processing |
CN103338105A (en) * | 2013-06-08 | 2013-10-02 | 南京航空航天大学 | Method for AES-encryption-based airport noise prediction data network transmission |
-
2013
- 2013-11-13 CN CN201310566725.2A patent/CN103580851A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1531578A1 (en) * | 2002-08-08 | 2005-05-18 | Matsushita Electric Industrial Co., Ltd. | Encrypting/decrypting device and method, encrypting device and method, decrypting device and method, and transmitting/receiving device |
CN1479480A (en) * | 2002-08-26 | 2004-03-03 | 华为技术有限公司 | Method of consulted encryption algorithm |
CN101183374A (en) * | 2007-10-17 | 2008-05-21 | 北京逍遥掌信息技术有限公司 | Mobile terminal apparatus electronic file memory structure and management techniques |
CN102684877A (en) * | 2012-03-31 | 2012-09-19 | 奇智软件(北京)有限公司 | Method and device for carrying out user information processing |
CN103338105A (en) * | 2013-06-08 | 2013-10-02 | 南京航空航天大学 | Method for AES-encryption-based airport noise prediction data network transmission |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104393988B (en) * | 2014-12-03 | 2018-06-22 | 浪潮(北京)电子信息产业有限公司 | A kind of reversible data ciphering method and device |
CN104393988A (en) * | 2014-12-03 | 2015-03-04 | 浪潮(北京)电子信息产业有限公司 | Reversible data encryption method and device |
CN104486756A (en) * | 2014-12-05 | 2015-04-01 | 深圳职业技术学院 | Encryption and decryption method and system for secret letter short message |
CN104486756B (en) * | 2014-12-05 | 2018-11-16 | 深圳职业技术学院 | A kind of encryption and decryption method and system of close writing paper short message |
CN105245335A (en) * | 2015-11-03 | 2016-01-13 | 天津津航计算技术研究所 | Real-time secret key updating system and method |
CN106066843A (en) * | 2016-06-02 | 2016-11-02 | 北京赛思信安技术股份有限公司 | A kind of parallel coding and decoding device of high speed Base64 |
CN111314053B (en) * | 2018-12-12 | 2023-02-10 | 上海领甲数据科技有限公司 | Data encryption and decryption method |
CN111314053A (en) * | 2018-12-12 | 2020-06-19 | 上海领甲数据科技有限公司 | Data encryption and decryption method based on uniform distribution symmetric algorithm |
CN109993759A (en) * | 2019-02-27 | 2019-07-09 | 深圳点猫科技有限公司 | A kind of data calling method and device for education resource platform |
CN113593073A (en) * | 2021-07-30 | 2021-11-02 | 杭州新视窗信息技术有限公司 | NFC intelligent inspection method based on background management system and inspection system |
CN113593073B (en) * | 2021-07-30 | 2023-08-15 | 杭州新视窗信息技术有限公司 | NFC intelligent inspection method based on background management system and inspection system |
CN115643103A (en) * | 2022-11-03 | 2023-01-24 | 浪潮云信息技术股份公司 | Big data encryption method using redundancy elimination technology |
CN115834258A (en) * | 2023-02-20 | 2023-03-21 | 成都九洲电子信息系统股份有限公司 | Cross-platform information identification method, system and storage medium |
CN115834258B (en) * | 2023-02-20 | 2023-05-02 | 成都九洲电子信息系统股份有限公司 | Cross-platform information identification method, system and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103580851A (en) | Information encryption and decryption method | |
CN101753292B (en) | Methods and devices for a chained encryption mode | |
US8416947B2 (en) | Block cipher using multiplication over a finite field of even characteristic | |
CN102594548B (en) | Method capable of achieving data sectional encryption and decryption | |
CN109245881A (en) | A kind of photograph video cloud encryption storage method | |
CN108123794A (en) | The generation method and encryption method of whitepack key, apparatus and system | |
CN102664740B (en) | Remote-authorization-based bidding document encryption and decryption method | |
CN105262772A (en) | Data transmission method, data transmission system and related apparatus for data transmission method and system | |
CN102025505A (en) | Advanced encryption standard (AES) algorithm-based encryption/decryption method and device | |
EP2060054A1 (en) | Method and apparatus for encrypting data | |
KR101608815B1 (en) | Method and system for providing service encryption in closed type network | |
CN102594549B (en) | Multistage data encryption and decryption methods | |
CN1820448B (en) | System and method for encrypting and verifying messages using three-phase encryption | |
CN101534190A (en) | A multi-channel encryption/decryption method, device and system | |
More et al. | Implementation of AES with time complexity measurement for various input | |
JP2008035305A (en) | Encryption method and data concealing method | |
Rawal | Advanced encryption standard (AES) and it’s working | |
Tang et al. | A one-time pad encryption algorithm based on one-way hash and conventional block cipher | |
Pethe et al. | A survey on different secret key cryptographic algorithms | |
Bajaj et al. | AES algorithm for encryption | |
Landge et al. | VHDL based Blowfish implementation for secured embedded system design | |
CN101465729A (en) | Method for implementing coexistence of various cryptographic algorithm in wireless LAN | |
Ahmad et al. | Comparative study between stream cipher and block cipher using RC4 and Hill Cipher | |
CN103475466A (en) | USBKey bus protection implementation method | |
US8908861B2 (en) | AES algorithm-based encryption apparatus and method for mobile communication system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140212 |
|
RJ01 | Rejection of invention patent application after publication |