CN112636912A - Data encryption verification algorithm based on network service - Google Patents

Data encryption verification algorithm based on network service Download PDF

Info

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
Application number
CN202110165017.2A
Other languages
Chinese (zh)
Inventor
陈武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202110165017.2A priority Critical patent/CN112636912A/en
Publication of CN112636912A publication Critical patent/CN112636912A/en
Pending legal-status Critical Current

Links

Images

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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • 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/32Cryptographic 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/3236Cryptographic 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

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

Data encryption verification algorithm based on network service
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.
CN202110165017.2A 2021-02-06 2021-02-06 Data encryption verification algorithm based on network service Pending CN112636912A (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (1)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
王素立: "电子文件完整性与一致性保护的Huffman编码方法", 《档案学通讯》 *
苑思明等: "基于哈夫曼树压缩的加密技术", 《信息记录材料》 *

Cited By (2)

* Cited by examiner, † Cited by third party
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
US8687800B2 (en) Encryption method for message authentication
CN110933118A (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
US20080189545A1 (en) Method and system for certificate revocation list pre-compression encoding
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
Zhang et al. An approach of covert communication based on the Ethereum whisper protocol in blockchain
US9515989B1 (en) Methods and apparatus for silent alarm channels using one-time passcode authentication tokens
US8024574B2 (en) Unidirectional message masking and validation system and method
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
US8055903B2 (en) Signal watermarking in the presence of encryption
CN113992401B (en) Data processing method and device
CN115098890A (en) Privacy calculation security audit method and system
Harun et al. Hybrid M-Ary in Braided Single Stage Approach for Multiphoton Quantum Secure Direct Communication Protocol
US11336456B2 (en) Message authentication system, apparatus, and message verification method
CN115102768A (en) Data processing method and device and computer equipment
Barenghi et al. A security audit of the OpenPGP format
Fraczek et al. Steg Blocks: Ensuring perfect undetectability of network steganography
Al-juaifari Secure SMS Mobile Transaction with Peer to Peer Authentication Design for Mobile Government
Yap et al. Security analysis of M‐DES and key‐based coded permutation ciphers in wireless channels

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