CN112636912A - Data encryption verification algorithm based on network service - Google Patents
Data encryption verification algorithm based on network service Download PDFInfo
- Publication number
- CN112636912A CN112636912A CN202110165017.2A CN202110165017A CN112636912A CN 112636912 A CN112636912 A CN 112636912A CN 202110165017 A CN202110165017 A CN 202110165017A CN 112636912 A CN112636912 A CN 112636912A
- Authority
- CN
- China
- Prior art keywords
- data
- algorithm
- network service
- str
- str2
- 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
- 238000012795 verification Methods 0.000 title claims abstract description 14
- 230000005540 biological transmission Effects 0.000 claims abstract description 7
- 101150035983 str1 gene Proteins 0.000 claims description 5
- 238000006243 chemical reaction Methods 0.000 claims 1
- 238000000034 method Methods 0.000 abstract description 4
- 230000006835 compression Effects 0.000 abstract description 2
- 238000007906 compression Methods 0.000 abstract description 2
- 238000013461 design Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/14—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to the technical field of Internet, and provides a data encryption verification algorithm based on network service, which is used for solving the problem that data security and normal operation of the network service are damaged by repeated sending, data tampering, man-in-the-middle attack and other modes of Internet service data in the transmission process. The core idea is as follows: and the output end processes the data by adding the characteristic data and adopting a compression scheme of binary coding and Huffman coding. And after the character string is formed by Huffman coding and decoding and binary reverse coding at the input end, checking the characteristic data to finally obtain the transmission data. The algorithm of the invention can ensure the uniqueness, timeliness, legality and safety of the data.
Description
Technical Field
The invention relates to the technical field of internet, in particular to a data encryption verification algorithm based on network service.
Background
The existing internet network service has the condition that data is intercepted by people in the transmission process, and even if an encrypted HTTPS protocol is adopted, the situation that the data security and the normal operation of the network service are damaged by repeated sending, data tampering, man-in-the-middle attack and other modes of an intercepting party still cannot be avoided.
Disclosure of Invention
In view of the foregoing security problems of the prior art, the technical problem to be solved by the present invention is to provide a data encryption verification algorithm based on a network service, so as to ensure data security and validity of the network service.
In order to achieve the above object, the present invention designs a data encryption verification algorithm based on network services, which comprises the following steps.
And completing data encryption at a data output end, specifically.
In the first step, a current timestamp with a length of 13 bits is obtained to obtain t.
Second, a unique number is generated (here using the UUIDv4 algorithm) to get u.
And thirdly, splicing t, u and the original data d to obtain str.
Fourth, hash is done on str (here using MD5 algorithm) to get s.
And fifthly, constructing JSON character strings by the t, u, d and s to obtain str 1.
Sixth, str1 is converted to binary data, resulting in str 2.
And seventhly, generating compressed data by using str2 through Huffman coding to obtain data.
And step eight, transmitting the encrypted data through an HTTP or HTTPS protocol.
At a data receiving end, firstly, data is obtained through an HTTP or HTTPS protocol, and decryption and verification are carried out according to the following steps.
In the first step, data is decompressed using Huffman coding to obtain str 2.
Second, str2 is converted from binary data into a JSON string, resulting in str 1.
And thirdly, respectively taking out the timestamp t, the unique number u, the original data d and the verification data s from the str 1.
And fourthly, acquiring a current timestamp t1 of the receiving end, continuing checking if t < t1 and t > t1-3 minutes, and otherwise, failing to check.
And fifthly, judging whether u exists in a cache (a file cache is adopted here), if not, continuing to check and recording u in the cache, otherwise, failing to check.
And sixthly, splicing t, u and d to obtain str.
Seventhly, hashing (using MD5 algorithm here) for str to obtain s1, comparing s1 with s, if the two are the same, continuing, otherwise, the check fails.
And step eight, d is the result of the transmission.
The invention has the beneficial effects.
And ensuring the timeliness of the data by adding the appointed characteristic data t.
Data uniqueness is guaranteed by adding the appointed characteristic data u.
Man-in-the-middle attacks are avoided by adding the agreed characteristic data t and u to act together.
The data validity is guaranteed by adding appointed characteristic data s.
The data security is guaranteed by carrying out binary transcoding and Huffman coding on the data.
Both the HTTP protocol and the HTTPs protocol can be used.
The idea of the present invention will be further described below with reference to the accompanying drawings to fully reveal the objects, features and effects of the invention.
Drawings
Fig. 1 is a flow chart of the encryption algorithm at the data output end of the algorithm of the present invention.
Fig. 2 is a flow chart of the decryption and verification algorithm of the present invention at the data input.
Detailed Description
As the algorithm definition shown in fig. 1 and 2, the core idea of the invention is: and the output end processes the data by adding the characteristic data and adopting a compression scheme of binary coding and Huffman coding. And after the character string is formed by Huffman coding and decoding and binary reverse coding at the input end, checking the characteristic data to finally obtain the transmission data.
In specific implementation, the processes of adding, decoding and checking data can be completed only by providing a general data processing function at the output end and the input end respectively, and non-intrusive design on a business process can be realized.
The above detailed description of the preferred embodiments of the present application is not intended to limit the present application. Therefore, all technical solutions that can be obtained through logical reasoning and limited experiments according to the idea of the present invention in the technical field should be included in the scope of the present application.
Claims (4)
1. A data encryption verification algorithm based on network service is characterized in that the algorithm completes data encryption at a data output end, and the specific encryption steps are as follows:
first, obtain the current time stamp with length of 13 bits to get t
Second, a unique number is generated (here using the UUIDV4 algorithm) to obtain u
Thirdly, splicing t, u and the original data d to obtain str
The fourth step, hash to str (here using MD5 algorithm), gets s
Fifthly, constructing the JSON format character string from t, u, d and s to obtain str1
Sixthly, str1 is converted into binary data to obtain str2
Seventhly, str2 is encoded through Huffman to generate compressed data, and data is obtained
Eighthly, transmitting the encrypted data through HTTP or HTTPS protocol
At a data receiving end, firstly, data is obtained through an HTTP or HTTPS protocol, and decryption is carried out according to the following steps:
first, data is decompressed using Huffman coding to obtain str2
Second, str2 is converted from binary data into JSON character string to obtain str1
Thirdly, respectively taking out the timestamp t, the unique number u, the original data d and the verification data s from the str1
Fourthly, obtaining the current time stamp t1 of the receiving end, continuing checking if t < t1 and t > t1-3 minutes, otherwise failing to check
Fifthly, judging whether r exists in the cache (file cache is adopted here), if not, continuing to check and recording u in the cache, otherwise, failing to check
Sixthly, splicing t, u and d to obtain str
Seventhly, hashing str (using MD5 algorithm here) to obtain s1, comparing s1 with s, if the two are the same, continuing, otherwise, checking fails
And step eight, d is the result of the transmission.
2. The data encryption verification algorithm based on network services as claimed in claim 1, wherein appointed characteristic data is added to the transmission data to verify data uniqueness, timeliness and legality, and man-in-the-middle attack can be avoided.
3. The data encryption verification algorithm based on network services as claimed in claim 1, wherein the transmitted data is encrypted in a huffman coding mode after binary conversion to ensure data security.
4. A network service-based data encryption verification algorithm as claimed in claim 1, wherein the algorithm can be implemented using Javascript, PHP, JAVA, GO, and so on.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110165017.2A CN112636912A (en) | 2021-02-06 | 2021-02-06 | Data encryption verification algorithm based on network service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110165017.2A CN112636912A (en) | 2021-02-06 | 2021-02-06 | Data encryption verification algorithm based on network service |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112636912A true CN112636912A (en) | 2021-04-09 |
Family
ID=75295384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110165017.2A Pending CN112636912A (en) | 2021-02-06 | 2021-02-06 | Data encryption verification algorithm based on network service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112636912A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117412263A (en) * | 2023-12-14 | 2024-01-16 | 深圳硅山技术有限公司 | Bluetooth and vehicle-mounted black box interaction method, system and equipment |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111885125A (en) * | 2020-07-07 | 2020-11-03 | 普华云创科技(北京)有限公司 | Data transmission method, system and computer readable storage medium for end-to-end network |
-
2021
- 2021-02-06 CN CN202110165017.2A patent/CN112636912A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111885125A (en) * | 2020-07-07 | 2020-11-03 | 普华云创科技(北京)有限公司 | Data transmission method, system and computer readable storage medium for end-to-end network |
Non-Patent Citations (2)
Title |
---|
王素立: "电子文件完整性与一致性保护的Huffman编码方法", 《档案学通讯》 * |
苑思明等: "基于哈夫曼树压缩的加密技术", 《信息记录材料》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117412263A (en) * | 2023-12-14 | 2024-01-16 | 深圳硅山技术有限公司 | Bluetooth and vehicle-mounted black box interaction method, system and equipment |
CN117412263B (en) * | 2023-12-14 | 2024-03-15 | 深圳硅山技术有限公司 | Bluetooth and vehicle-mounted black box interaction method, system and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110933118B (en) | Edge computing gateway secure communication method, system, terminal equipment and server | |
US8112624B2 (en) | Method and system for certificate revocation list compression | |
KR101467067B1 (en) | Embedded sfe: offloading server and network using hardware token | |
CN112511514A (en) | HTTP encrypted transmission method and device, computer equipment and storage medium | |
US10511445B1 (en) | Signature compression for hash-based signature schemes | |
CN112600665A (en) | Covert communication method, device and system based on block chain and encryption technology | |
CN108366370A (en) | Quantify the information transferring method of privately owned asymmetric key based on radio channel characteristic | |
Zhang et al. | An approach of covert communication based on the Ethereum whisper protocol in blockchain | |
CN106789027B (en) | Method and system for confirming consistency of secret key by using unconditional secure transmission | |
CN112636912A (en) | Data encryption verification algorithm based on network service | |
CN113300840B (en) | Data random encryption communication method combining Hamming codes | |
CN110932863B (en) | Generalized signcryption method based on coding | |
CN114978711B (en) | Dynamic key symmetric encryption data transmission method and system | |
Harun et al. | Hybrid m-ary in braided single stage approach for multiphoton quantum secure direct communication protocol | |
CN113992401B (en) | Data processing method and device | |
EP1959386A2 (en) | Signal watermarking in the presence of encryption | |
US11336456B2 (en) | Message authentication system, apparatus, and message verification method | |
CN115098890A (en) | Privacy calculation security audit method and system | |
Barenghi et al. | A security audit of the OpenPGP format | |
CN115102768A (en) | Data processing method and device and computer equipment | |
Adamo et al. | Joint scheme for physical layer error correction and security | |
Yap et al. | Security analysis of M‐DES and key‐based coded permutation ciphers in wireless channels | |
Al-juaifari | Secure SMS Mobile Transaction with Peer to Peer Authentication Design for Mobile Government | |
JP2008028806A (en) | Information transmission method, information reception method, information transmission device, information reception device, and program | |
TWI763474B (en) | Public key encryption QR code method and its application |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210409 |