CN115208705B - Encryption and decryption method and device based on link data self-adaptive adjustment - Google Patents

Encryption and decryption method and device based on link data self-adaptive adjustment Download PDF

Info

Publication number
CN115208705B
CN115208705B CN202211127979.XA CN202211127979A CN115208705B CN 115208705 B CN115208705 B CN 115208705B CN 202211127979 A CN202211127979 A CN 202211127979A CN 115208705 B CN115208705 B CN 115208705B
Authority
CN
China
Prior art keywords
encryption
key
algorithm
terminal
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.)
Active
Application number
CN202211127979.XA
Other languages
Chinese (zh)
Other versions
CN115208705A (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.)
Guangzhou Wise Security Technology Co Ltd
Original Assignee
Guangzhou Wise Security Technology 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 Guangzhou Wise Security Technology Co Ltd filed Critical Guangzhou Wise Security Technology Co Ltd
Priority to CN202211127979.XA priority Critical patent/CN115208705B/en
Publication of CN115208705A publication Critical patent/CN115208705A/en
Application granted granted Critical
Publication of CN115208705B publication Critical patent/CN115208705B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses an encryption and decryption method and device based on link data self-adaptive adjustment, wherein the method comprises the steps that a server receives connection establishment information, determines the data scene type of a first terminal according to the connection establishment information, and acquires the safety record data of a second terminal; determining a key identifier and an algorithm identifier based on the data scene type and the safety record data, and respectively sending the key identifier and the algorithm identifier to the first terminal and the second terminal; determining a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, encrypting data through the encryption key and the encryption algorithm, and sending the encrypted data to the second terminal; and determining a corresponding decryption key and a decryption algorithm based on the key identification and the algorithm identification, and decrypting the received encrypted data through the decryption key and the decryption algorithm. According to the scheme, the encryption transmission mechanism of the encrypted information is optimized, and the safety is ensured while the data processing efficiency is improved.

Description

Encryption and decryption method and device based on link data self-adaptive adjustment
Technical Field
The application relates to the technical field of security chips, in particular to an encryption and decryption method and device based on link data self-adaptive adjustment.
Background
With the development of big data and network transmission, data security is more and more emphasized. If the sending end and the data receiving end of the data are integrated with the security chips, the security chips are integrated with the encryption algorithm, the encryption key is stored in the security chips, the sending data are encrypted through the encryption key and the encryption algorithm, and the corresponding receiving end uses the stored decryption algorithm and the stored decryption key to perform corresponding decryption.
In the related art, for example, patent document CN114266083A proposes a secure storage method for a key in a chip, which uses the feature of rebootrom boot after the chip is powered on, to obtain the configuration of a chip user in a flash memory flash in a bootrom boot process, where the user sets the key of the chip according to the requirement, and configures the read-write permission of the key in an encryption module; the configuration in the flash memory can be divided into a key configuration area and a key storage area according to an address space; the key configuration area can be configured with read protection and write protection of the encryption module key, and the key storage area stores the key of the chip; after the chip is powered on, the encryption module downloads a key from the flash memory for an encryption algorithm in the module to use; the key storage area in the flash memory flash is always read protected, the key cannot be read at any time, after the used chip key is determined, the key storage area in the whole flash memory flash is configured to be write protected, meanwhile, the write protection is irreversible, and the key is solidified in the flash memory flash, so that the key cannot be changed by any user in subsequent use. However, in most existing schemes, data encryption is performed by adopting a fixed key fixed encryption algorithm, and even though there are schemes of changing keys and changing encryption algorithms, random updating is performed mostly only from the perspective of security, and adjustment cannot be performed by integrating the transmission condition of the whole link and the specific use scene.
Disclosure of Invention
The invention provides an encryption and decryption method and device based on link data self-adaptive adjustment, which solve the problem that in the related technology, mostly only from the perspective of safety, random updating is carried out, and the transmission condition of the whole link and the specific use scene cannot be integrated for adjustment, optimize the encryption transmission mechanism of encrypted information, improve the data processing efficiency and ensure the safety.
In a first aspect, the present invention provides an encryption and decryption method based on link data adaptive adjustment, where the method includes:
the first terminal sends connection establishment information to the server, wherein the connection establishment information is used for establishing communication transmission with the second terminal;
the server receives the connection establishment information, determines the data scene type of the first terminal according to the connection establishment information, and acquires the safety record data of the second terminal;
the server determines a key identifier and an algorithm identifier based on the data scene type and the safety record data, and sends the key identifier and the algorithm identifier to the first terminal and the second terminal respectively;
the first terminal and the second terminal receive the key identification and the algorithm identification, the first terminal determines a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, and data encryption is carried out through the encryption key and the encryption algorithm and sent to the second terminal;
and the second terminal determines a corresponding decryption key and a decryption algorithm based on the key identification and the algorithm identification, and decrypts the received encrypted data through the decryption key and the decryption algorithm.
Optionally, the determining a data scene type of the first terminal according to the connection establishment information, and acquiring security record data of the second terminal include:
determining the data scene type of the first terminal according to networking data recorded in the connection establishment information, wherein the networking data comprises a safe networking identifier and a non-safe networking identifier;
and acquiring the attack times and the attack information of the second terminal, which are respectively received and stored in advance by a database.
Optionally, the determining, by the server, a key identifier and an algorithm identifier based on the data scene type and the security record data includes:
the server determines an encryption algorithm based on the data scene type, and the server determines the complexity of an encryption key based on the security record data;
matching is carried out on the stored multiple encryption algorithms and key data based on the encryption algorithms and the encryption key complexity to obtain matched encryption algorithms and key data;
and determining the position information of the matched encryption algorithm and key data in a plurality of encryption algorithms and key data, and generating a key identification and an algorithm identification based on the position information.
Optionally, the determining, by the server, an encryption algorithm based on the data scene type includes:
and inquiring one or more encryption algorithms corresponding to the data scene type according to pre-recorded security level standard information, wherein the security level standard information records encryption algorithms with different security levels and complexity.
Optionally, the determining, by the server, the complexity of the encryption key based on the security record data includes:
determining an attacked probability and a cracked probability based on the security record data;
and determining the complexity of an encryption key according to the attacked probability, the cracked probability and the respectively set probability threshold.
Optionally, the determining, by the first terminal, a corresponding encryption key and an encryption algorithm based on the key identifier and the algorithm identifier includes:
the first terminal acquires a pre-stored encryption algorithm and a pre-stored encryption key, wherein the first terminal and the server pre-store a plurality of same encryption algorithms and encryption keys which have the same sequence;
and determining the encryption algorithm and the encryption key which are currently used from the pre-stored encryption algorithm and encryption key based on the key identification and the algorithm identification.
Optionally, the determining, by the second terminal, a corresponding decryption key and decryption algorithm based on the key identifier and the algorithm identifier includes:
the second terminal determines an encryption algorithm and an encryption key used by the first terminal based on the key identification and the algorithm identification;
and acquiring a decryption algorithm and a decryption key corresponding to the encryption algorithm and the encryption key used by the first terminal.
In a second aspect, the present invention further provides an encryption and decryption apparatus based on link data adaptive adjustment, including:
the information sending module is configured to send connection establishment information to the server by the first terminal, wherein the connection establishment information is used for establishing communication transmission with the second terminal;
the information determining module is configured to receive the connection establishment information by the server, determine the data scene type of the first terminal according to the connection establishment information, and acquire the safety record data of the second terminal;
the identification determining module is configured to determine a key identification and an algorithm identification by the server based on the data scene type and the safety record data, and respectively send the key identification and the algorithm identification to the first terminal and the second terminal;
the encryption module is configured to enable the first terminal and the second terminal to receive the key identification and the algorithm identification, enable the first terminal to determine a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, encrypt data through the encryption key and the encryption algorithm, and send the encrypted data to the second terminal;
and the decryption module is configured to determine a corresponding decryption key and a corresponding decryption algorithm based on the key identifier and the algorithm identifier, and decrypt the received encrypted data through the decryption key and the decryption algorithm.
In a third aspect, the present invention further provides an encryption and decryption device adaptively adjusted based on link data, where the device includes:
one or more processors;
a memory security chip device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the encryption and decryption method based on link data adaptive adjustment according to the present invention.
In a fourth aspect, the present invention also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing the link data adaptive adjustment-based encryption and decryption method of the present invention.
In a fifth aspect, the present application further provides a computer program product, which includes a computer program, the computer program is stored in a computer-readable storage medium, and at least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device executes the link data adaptive adjustment-based encryption and decryption method described in the present application.
In the invention, the first terminal sends connection establishment information to the server, wherein the connection establishment information is used for establishing communication transmission with the second terminal; the server receives the connection establishment information, determines the data scene type of the first terminal according to the connection establishment information, and acquires the safety record data of the second terminal; the server determines a key identifier and an algorithm identifier based on the data scene type and the safety record data, and respectively sends the key identifier and the algorithm identifier to the first terminal and the second terminal; the first terminal and the second terminal receive the key identification and the algorithm identification, the first terminal determines a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, and data encryption is carried out through the encryption key and the encryption algorithm and is sent to the second terminal; and the second terminal determines a corresponding decryption key and a corresponding decryption algorithm based on the key identification and the algorithm identification, and decrypts the received encrypted data through the decryption key and the decryption algorithm. The scheme solves the problem that in the related technology, mostly only from the perspective of safety, random updating is carried out, and the transmission condition of the whole link and the specific use scene cannot be integrated for adjustment, optimizes the encryption transmission mechanism of the encrypted information, improves the data processing efficiency and ensures the safety.
Drawings
Fig. 1 is a flowchart of an encryption and decryption method based on link data adaptive adjustment according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for determining a key identifier and an algorithm identifier according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for determining respective keys and algorithms by a first terminal and a second terminal according to an embodiment of the present invention;
fig. 4 is a block diagram of a structure of an encryption and decryption apparatus based on adaptive adjustment of link data according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an encryption and decryption device based on link data adaptive adjustment according to an embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of the invention and do not delimit the embodiments. It should be further noted that, for convenience of description, only some structures related to the embodiments of the present invention are shown in the drawings, not all of them.
Fig. 1 is a flowchart of an encryption and decryption method based on link data adaptive adjustment according to an embodiment of the present invention, and an embodiment of the present invention specifically includes the following steps:
step S101, the first terminal sends connection establishment information to the server, and the connection establishment information is used for establishing communication transmission with the second terminal.
The first terminal and the second terminal are both terminal equipment which is integrated with a security chip and can encrypt and decrypt data information. Such as a car networking terminal, a video monitoring terminal, etc. When the first terminal and the second terminal are ready for data communication transmission, the first terminal firstly sends connection establishment information to the server. The connection establishment information is used for triggering the establishment of the connection between the first terminal and the second terminal, and simultaneously carries relevant information for the server to determine a subsequent algorithm and a key.
Optionally, the server receives the connection establishment information, sends a corresponding instruction to the second terminal according to the second terminal identifier recorded in the connection establishment information, and responds to the first terminal to complete establishment of the connection between the first terminal and the second terminal.
And step S102, the server receives the connection establishment information, determines the data scene type of the first terminal according to the connection establishment information, and acquires the safety record data of the second terminal.
In one embodiment, the server receives the connection establishment information, determines the data scene type of the first terminal according to the connection establishment information, and acquires the security record data of the second terminal. The data scene type represents the networking type of the scene where the first terminal is located, and the safety record data comprises the recorded attack times and attack information related to the terminal.
When the security record data of the second terminal is determined, the server may query the security record data of the second terminal corresponding to the identifier recorded in the database according to the identifier of the second terminal recorded in the connection establishment information. When determining the data scene type, the scene type can be determined according to the networking data recorded in the connection establishment information.
Optionally, the following may be: determining the data scene type of the first terminal according to networking data recorded in the connection establishment information, wherein the networking data comprises a safe networking identifier and a non-safe networking identifier; and acquiring the attack times and the attack information of the second terminal, which are respectively received and stored in advance by a database. The secure networking identifier and the non-secure networking identifier may be added to the connection establishment information, the secure networking identifier exemplarily corresponds to a secure internal networking or wifi networking, and the non-secure networking identifier corresponds to a public network or a networking network without a key connection. The attack frequency may include the frequency of attack access, malicious information acquisition, information tampering, or the like, and the attack information includes attack types or attack contents corresponding to specific different attack frequencies.
Step S103, the server determines a key identifier and an algorithm identifier based on the data scene type and the safety record data, and sends the key identifier and the algorithm identifier to the first terminal and the second terminal respectively.
In one embodiment, after the server determines the data scene type and the security record data, the key identification and the algorithm identification are determined based on the data scene type and the security record data. The key identifier is used to indicate the used key, and includes an encryption key and a decryption key (in the case of a symmetric encryption algorithm, the two are the same), and the algorithm identifier is used to indicate the specific encryption algorithm used. And after determining the key identification and the algorithm identification, respectively sending the key identification and the algorithm identification to the first terminal and the second terminal.
Optionally, a process of determining the key identifier and the algorithm identifier is shown in fig. 2, where fig. 2 is a flowchart of a method for determining the key identifier and the algorithm identifier according to an embodiment of the present invention, and specifically includes:
and step S1031, the server determines an encryption algorithm based on the data scene type, and the server determines the complexity of an encryption key based on the safety record data.
In one embodiment, the process of determining an encryption algorithm based on the data scene type may be: and inquiring one or more encryption algorithms corresponding to the data scene type according to pre-recorded safety level standard information, wherein the safety level standard information records encryption algorithms with different safety levels and complexity. The safety level standard information may be algorithms with different safety levels set by preset industry standards or national safety standards.
In one embodiment, the process of the server determining the encryption key complexity based on the security record data may be: determining an attacked probability and a cracked probability based on the security record data; and determining the complexity of an encryption key according to the attacked probability, the cracked probability and the respectively set probability threshold. The attack probability is determined by recorded attack information, for example, the number of days of the attack date is determined, the attack probability is calculated according to the number of days of the attack date occupying the statistical period, for example, 30 days is taken as one statistical period, the number of days of the attack date is recorded as 2 days, the attack probability is 1/15, when the crack probability is determined, and the attack frequency and the information tampering condition are determined, for example, the frequency of information leakage or tampering caused by cracking is divided by the attack frequency to obtain the crack probability. And when the complexity of the encryption key is determined, determining the complexity of the encryption key according to the attacked probability, the cracked probability and the respectively set probability threshold values. For example, the probability threshold may be set as multiple groups according to different key complexities, and when the attacked probability and the cracked probability meet the set corresponding probability threshold interval, the complexity of the key corresponding to the probability threshold interval is selected as the encryption key complexity, where the different complexities may refer to key lengths.
And S1032, matching is carried out on the plurality of stored encryption algorithms and key data based on the encryption algorithm and the encryption key complexity to obtain matched encryption algorithms and key data.
Step S1033, determining location information of the matched encryption algorithm and key data in the plurality of encryption algorithms and key data, and generating a key identification and an algorithm identification based on the location information.
In one embodiment, the encryption algorithm and encryption key complexity is followed by matching among a pre-stored number of available encryption algorithms and keys. Illustratively, four encryption algorithms of RSA, ECC, 3DES and AES are recorded in sequence, if the encryption algorithm used is determined to be ECC, the sequence identifiers (identifiers are 1, 2, 3 and 4 in sequence) are correspondingly used as examples, and the determined algorithm identifier is 2 according to the second position of the position where the algorithm is located; correspondingly, the server stores a plurality of keys with different complexities in advance, for example, four keys with complexity 1, complexity 2, complexity 3 and complexity 4 are stored in the server, and the identifiers are 1, 2, 3 and 4 in sequence, if the complexity of the used encryption key is determined to be 3, and the corresponding key identifier is 3 according to the position of the encryption key as a third bit. Of course, the above is only an exemplary illustration, and the number of keys in the actual use process is not limited.
And step S104, the first terminal and the second terminal receive the key identification and the algorithm identification, the first terminal determines a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, and data encryption is carried out through the encryption key and the encryption algorithm and is sent to the second terminal.
In one embodiment, after determining the key identifier and the algorithm identifier, the server sends the key identifier and the algorithm identifier to the first terminal and the second terminal, and the first terminal determines an encryption key and an encryption algorithm used for data encryption based on the key identifier and the algorithm identifier to complete data encryption.
And S105, the second terminal determines a corresponding decryption key and a decryption algorithm based on the key identification and the algorithm identification, and decrypts the received encrypted data through the decryption key and the decryption algorithm.
In one embodiment, after receiving the key identifier and the algorithm identifier, the second terminal determines a decryption key and a decryption algorithm for decrypting the data based on the key identifier and the algorithm identifier. Of course, in the first terminal and the second terminal, taking the case that the first terminal transmits data and the second terminal receives data as an example, the first terminal performs encryption and the second terminal performs decryption, and the two terminals can perform exchange between the transmitting end and the receiving end, and similarly, the encryption and decryption processes are exchanged.
As can be seen from the above, connection establishment information is sent to the server through the first terminal, and the connection establishment information is used for establishing communication transmission with the second terminal; the server receives the connection establishment information, determines the data scene type of the first terminal according to the connection establishment information, and acquires the safety record data of the second terminal; the server determines a key identifier and an algorithm identifier based on the data scene type and the safety record data, and respectively sends the key identifier and the algorithm identifier to the first terminal and the second terminal; the first terminal and the second terminal receive the key identification and the algorithm identification, the first terminal determines a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, and data encryption is carried out through the encryption key and the encryption algorithm and is sent to the second terminal; and the second terminal determines a corresponding decryption key and a corresponding decryption algorithm based on the key identification and the algorithm identification, and decrypts the received encrypted data through the decryption key and the decryption algorithm. The scheme solves the problem that in the related technology, mostly only from the perspective of safety, random updating is carried out, and the transmission condition of the whole link and the specific use scene cannot be integrated for adjustment, optimizes the encryption transmission mechanism of the encrypted information, improves the data processing efficiency and ensures the safety.
Fig. 3 is a flowchart of a method for determining respective keys and algorithms by a first terminal and a second terminal according to an embodiment of the present invention, as shown in fig. 3, specifically including:
step S201, the first terminal sends connection establishment information to a server, and the connection establishment information is used for establishing communication transmission with the second terminal.
Step S202, the server receives the connection establishment information, determines the data scene type of the first terminal according to the connection establishment information, and acquires the safety record data of the second terminal.
Step S203, the server determines an encryption algorithm based on the data scene type, determines the complexity of an encryption key based on the security record data, matches the encryption algorithm and the encryption key complexity in a plurality of stored encryption algorithms and key data to obtain matched encryption algorithm and key data, determines the position information of the matched encryption algorithm and key data in the plurality of encryption algorithms and key data, generates a key identifier and an algorithm identifier based on the position information, and sends the key identifier and the algorithm identifier to the first terminal and the second terminal respectively.
Step S204, the first terminal and the second terminal receive the key identification and the algorithm identification, the first terminal obtains a pre-stored encryption algorithm and an encryption key, wherein the first terminal and the server pre-store a plurality of same encryption algorithms and encryption keys, the same encryption algorithms and encryption keys have the same sequence, the encryption algorithm and the encryption key which are currently used are determined in the pre-stored encryption algorithms and encryption keys based on the key identification and the algorithm identification, and data encryption is performed through the encryption key and the encryption algorithm and sent to the second terminal.
In one embodiment, in order to ensure the security of the key and the confidentiality of the used encryption algorithm, the first terminal, the second terminal and the server store the set key and algorithm which are recorded in a consistent sequence in advance, and the unique determination is carried out in an identification mode. If the algorithm corresponding to the algorithm identifier a in the server and the first terminal is the same algorithm, and the key corresponding to the key identifier b in the server and the first terminal is the same key text, the encryption algorithm and the encryption key are determined.
Step S205, the second terminal determines, based on the key identifier and the algorithm identifier, an encryption algorithm and an encryption key used by the first terminal, obtains a decryption algorithm and a decryption key corresponding to the encryption algorithm and the encryption key used by the first terminal, and decrypts the received encrypted data through the decryption key and the decryption algorithm.
In one embodiment, if the symmetric encryption algorithm is adopted, the synchronization step S204 is consistent, and it can be determined that the corresponding encryption algorithm and encryption key are also used for decryption, and if the asymmetric encryption algorithm is adopted, the corresponding decryption key stored in association with the determined encryption key is obtained for decrypting the received encrypted data, wherein the decryption algorithm can be consistent with the encryption algorithm.
As can be seen from the above, connection establishment information is sent to the server through the first terminal, and the connection establishment information is used for establishing communication transmission with the second terminal; the server receives the connection establishment information, determines the data scene type of the first terminal according to the connection establishment information, and acquires the safety record data of the second terminal; the server determines a key identifier and an algorithm identifier based on the data scene type and the safety record data, and sends the key identifier and the algorithm identifier to the first terminal and the second terminal respectively; the first terminal and the second terminal receive the key identification and the algorithm identification, the first terminal determines a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, and data encryption is carried out through the encryption key and the encryption algorithm and sent to the second terminal; and the second terminal determines a corresponding decryption key and a corresponding decryption algorithm based on the key identification and the algorithm identification, and decrypts the received encrypted data through the decryption key and the decryption algorithm. The scheme solves the problem that in the related technology, mostly only from the perspective of safety, random updating is carried out, and the transmission condition of the whole link and the specific use scene cannot be integrated for adjustment, optimizes the encryption transmission mechanism of the encrypted information, improves the data processing efficiency and ensures the safety.
Fig. 4 is a block diagram of an encryption and decryption apparatus based on link data adaptive adjustment according to an embodiment of the present invention, where the security chip apparatus is configured to execute an encryption and decryption method based on link data adaptive adjustment according to the above-mentioned data receiving end embodiment, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 4, the security chip apparatus specifically includes: an information transmission module 101, an information determination module 102, an identification determination module 103, an encryption module 104, and a decryption module 105, wherein,
an information sending module 101 configured to send, by a first terminal, connection establishment information to a server, where the connection establishment information is used to establish communication transmission with a second terminal;
an information determining module 102, configured to receive the connection establishment information, determine a data scene type of the first terminal according to the connection establishment information, and obtain security record data of the second terminal;
an identifier determining module 103, configured to determine, by the server, a key identifier and an algorithm identifier based on the data scene type and the security record data, and send the key identifier and the algorithm identifier to the first terminal and the second terminal, respectively;
the encryption module 104 is configured to receive the key identifier and the algorithm identifier by the first terminal and the second terminal, determine a corresponding encryption key and an encryption algorithm based on the key identifier and the algorithm identifier by the first terminal, encrypt data through the encryption key and the encryption algorithm, and send the encrypted data to the second terminal;
a decryption module 105 configured to determine a corresponding decryption key and decryption algorithm based on the key identifier and algorithm identifier, and decrypt the received encrypted data through the decryption key and the decryption algorithm.
According to the scheme, the connection establishment information is sent to the server through the first terminal, and the connection establishment information is used for establishing communication transmission with the second terminal; the server receives the connection establishment information, determines the data scene type of the first terminal according to the connection establishment information, and acquires the safety record data of the second terminal; the server determines a key identifier and an algorithm identifier based on the data scene type and the safety record data, and respectively sends the key identifier and the algorithm identifier to the first terminal and the second terminal; the first terminal and the second terminal receive the key identification and the algorithm identification, the first terminal determines a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, and data encryption is carried out through the encryption key and the encryption algorithm and is sent to the second terminal; and the second terminal determines a corresponding decryption key and a decryption algorithm based on the key identification and the algorithm identification, and decrypts the received encrypted data through the decryption key and the decryption algorithm. The scheme solves the problem that in the related technology, mostly only from the perspective of safety, random updating is carried out, and the transmission condition of the whole link and the specific use scene cannot be integrated for adjustment, optimizes the encryption transmission mechanism of the encrypted information, improves the data processing efficiency and ensures the safety. Correspondingly, the functions executed by the modules are respectively as follows:
in a possible embodiment, the determining the data scene type of the first terminal according to the connection establishment information and acquiring the security record data of the second terminal includes:
determining the data scene type of the first terminal according to networking data recorded in the connection establishment information, wherein the networking data comprises a safe networking identifier and a non-safe networking identifier;
and acquiring the attack times and the attack information of the second terminal, which are respectively received and stored in advance by a database.
In one possible embodiment, the server determines a key identification and an algorithm identification based on the data scene type and the security record data, including:
the server determines an encryption algorithm based on the data scene type, and the server determines the complexity of an encryption key based on the security record data;
matching among a plurality of stored encryption algorithms and key data based on the encryption algorithm and the encryption key complexity to obtain matched encryption algorithms and key data;
and determining the position information of the matched encryption algorithm and key data in a plurality of encryption algorithms and key data, and generating a key identification and an algorithm identification based on the position information.
In one possible embodiment, the server determines an encryption algorithm based on the data scene type, including:
and inquiring one or more encryption algorithms corresponding to the data scene type according to pre-recorded security level standard information, wherein the security level standard information records encryption algorithms with different security levels and complexity.
In one possible embodiment, the server determines an encryption key complexity based on the security record data, including:
determining an attacked probability and a cracked probability based on the security record data;
and determining the complexity of an encryption key according to the attacked probability, the cracked probability and the respectively set probability threshold.
In one possible embodiment, the determining, by the first terminal, a corresponding encryption key and an encryption algorithm based on the key identifier and the algorithm identifier includes:
the first terminal acquires a pre-stored encryption algorithm and a pre-stored encryption key, wherein the first terminal and the server pre-store a plurality of same encryption algorithms and encryption keys which have the same sequence;
and determining the encryption algorithm and the encryption key which are currently used from the pre-stored encryption algorithm and encryption key based on the key identification and the algorithm identification.
In one possible embodiment, the second terminal determines a corresponding decryption key and decryption algorithm based on the key identifier and algorithm identifier, including:
the second terminal determines an encryption algorithm and an encryption key used by the first terminal based on the key identification and the algorithm identification;
and acquiring a decryption algorithm and a decryption key corresponding to the encryption algorithm and the encryption key used by the first terminal.
Fig. 5 is a schematic structural diagram of an encryption and decryption apparatus based on link data adaptive adjustment according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of the processors 201 in the device may be one or more, and one processor 201 is taken as an example in fig. 5; the processor 201, the memory 202, the input device 203 and the output device 204 in the apparatus may be connected by a bus or other means, and fig. 5 illustrates the connection by a bus as an example. The memory 202 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the encryption and decryption method based on link data adaptive adjustment in the embodiment of the present invention. The processor 201 executes various functional applications of the device and data processing, i.e., implements the above-described encryption and decryption method based on link data adaptive adjustment, by running software programs, instructions, and modules stored in the memory 202. The input device 203 may be used to receive input numeric or character information and generate key signal inputs relating to user settings and function controls of the apparatus. The output device 204 may include a display device such as a display screen.
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a method for encryption and decryption based on link data adaptive adjustment, where the method includes:
the first terminal sends connection establishment information to the server, wherein the connection establishment information is used for establishing communication transmission with the second terminal;
the server receives the connection establishment information, determines the data scene type of the first terminal according to the connection establishment information, and acquires the safety record data of the second terminal;
the server determines a key identifier and an algorithm identifier based on the data scene type and the safety record data, and respectively sends the key identifier and the algorithm identifier to the first terminal and the second terminal;
the first terminal and the second terminal receive the key identification and the algorithm identification, the first terminal determines a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, and data encryption is carried out through the encryption key and the encryption algorithm and is sent to the second terminal;
and the second terminal determines a corresponding decryption key and a decryption algorithm based on the key identification and the algorithm identification, and decrypts the received encrypted data through the decryption key and the decryption algorithm.
From the above description of the embodiments, it is obvious for those skilled in the art that the embodiments of the present invention can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to make a computer device (which may be a personal computer, a service, or a network device) perform the methods described in the embodiments of the present invention.
It should be noted that, in the embodiment of the encryption and decryption apparatus based on link data adaptive adjustment, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the present invention.
In some possible embodiments, various aspects of the methods provided by the present application may also be implemented in a form of a program product, which includes program code for causing a computer device to perform the steps in the methods according to various exemplary embodiments of the present application described above in this specification when the program product runs on the computer device, for example, the computer device may perform the encryption and decryption method based on link data adaptation described in the embodiments of the present application. The program product may be implemented using any combination of one or more readable media.
It should be noted that the foregoing is only a preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will appreciate that the embodiments of the present invention are not limited to the specific embodiments described herein, and that various obvious changes, rearrangements and substitutions can be made by those skilled in the art without departing from the scope of the embodiments of the invention. Therefore, although the embodiments of the present invention have been described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and many other equivalent embodiments can be included without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.

Claims (9)

1. The encryption and decryption method based on the link data self-adaptive adjustment is characterized by comprising the following steps:
the first terminal sends connection establishment information to the server, wherein the connection establishment information is used for establishing communication transmission with the second terminal;
the server receives the connection establishment information, determines the data scene type of the first terminal according to the connection establishment information, and acquires the safety record data of the second terminal;
the server determines a key identifier and an algorithm identifier based on the data scene type and the security record data, wherein the method comprises the steps that the server determines an encryption algorithm based on the data scene type, the server determines encryption key complexity based on the security record data, matching is carried out in a plurality of stored encryption algorithms and key data based on the encryption algorithm and the encryption key complexity to obtain matched encryption algorithms and key data, position information of the matched encryption algorithms and key data in the plurality of encryption algorithms and key data is determined, the key identifier and the algorithm identifier are generated based on the position information, and the key identifier and the algorithm identifier are respectively sent to the first terminal and the second terminal;
the first terminal and the second terminal receive the key identification and the algorithm identification, the first terminal determines a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, and data encryption is carried out through the encryption key and the encryption algorithm and is sent to the second terminal;
and the second terminal determines a corresponding decryption key and a corresponding decryption algorithm based on the key identification and the algorithm identification, and decrypts the received encrypted data through the decryption key and the decryption algorithm.
2. The encryption and decryption method based on link data adaptive adjustment according to claim 1, wherein the determining a data scene type of the first terminal according to the connection establishment information and acquiring security record data of the second terminal includes:
determining the data scene type of the first terminal according to networking data recorded in the connection establishment information, wherein the networking data comprises a safe networking identifier and a non-safe networking identifier;
and acquiring the attack times and the attack information of the second terminal, which are respectively received and stored in advance by a database.
3. The encryption and decryption method based on link data adaptive adjustment according to claim 1, wherein the server determines an encryption algorithm based on the data scene type, and the method comprises:
and inquiring one or more encryption algorithms corresponding to the data scene type according to pre-recorded safety level standard information, wherein the safety level standard information records encryption algorithms with different safety levels and complexity.
4. The encryption and decryption method based on link data adaptive adjustment according to claim 1, wherein the server determines the complexity of an encryption key based on the security record data, and comprises:
determining an attacked probability and a cracked probability based on the security record data;
and determining the complexity of an encryption key according to the attacked probability, the cracked probability and the respectively set probability threshold.
5. The encryption and decryption method based on link data adaptive adjustment according to any one of claims 1-4, wherein the first terminal determines the corresponding encryption key and encryption algorithm based on the key identification and algorithm identification, and comprises:
the first terminal acquires a pre-stored encryption algorithm and a pre-stored encryption key, wherein the first terminal and the server pre-store a plurality of same encryption algorithms and encryption keys which have the same sequence;
and determining the encryption algorithm and the encryption key which are currently used from the pre-stored encryption algorithm and encryption key based on the key identification and the algorithm identification.
6. The encryption and decryption method based on link data adaptive adjustment according to any one of claims 1-4, wherein the second terminal determines a corresponding decryption key and decryption algorithm based on the key identifier and algorithm identifier, and comprises:
the second terminal determines an encryption algorithm and an encryption key used by the first terminal based on the key identification and the algorithm identification;
and acquiring a decryption algorithm and a decryption key corresponding to the encryption algorithm and the encryption key used by the first terminal.
7. The encryption and decryption device based on the link data self-adaptive adjustment is characterized by comprising the following components:
the information sending module is configured to send connection establishment information to the server by the first terminal, wherein the connection establishment information is used for establishing communication transmission with the second terminal;
the information determining module is configured to receive the connection establishment information by the server, determine the data scene type of the first terminal according to the connection establishment information, and acquire the security record data of the second terminal;
an identifier determining module configured to determine, by the server, a key identifier and an algorithm identifier based on the data scene type and the security record data, wherein the server determines an encryption algorithm based on the data scene type, the server determines an encryption key complexity based on the security record data, matches the encryption algorithm and the encryption key complexity in a plurality of stored encryption algorithms and key data to obtain a matched encryption algorithm and key data, determines location information of the matched encryption algorithm and key data in the plurality of encryption algorithms and key data, generates a key identifier and an algorithm identifier based on the location information, and sends the key identifier and the algorithm identifier to the first terminal and the second terminal, respectively;
the encryption module is configured to enable the first terminal and the second terminal to receive the key identification and the algorithm identification, enable the first terminal to determine a corresponding encryption key and an encryption algorithm based on the key identification and the algorithm identification, encrypt data through the encryption key and the encryption algorithm, and send the encrypted data to the second terminal;
and the decryption module is configured to determine a corresponding decryption key and a decryption algorithm based on the key identifier and the algorithm identifier, and decrypt the received encrypted data through the decryption key and the decryption algorithm.
8. An encryption and decryption device adaptively adjusted based on link data, the device comprising: one or more processors; a storage security chip device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the link data adaptation-based encryption and decryption method according to any one of claims 1 to 6.
9. A storage medium containing computer executable instructions for performing the link data adaptation based encryption and decryption method of any one of claims 1-6 when executed by a computer processor.
CN202211127979.XA 2022-09-16 2022-09-16 Encryption and decryption method and device based on link data self-adaptive adjustment Active CN115208705B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211127979.XA CN115208705B (en) 2022-09-16 2022-09-16 Encryption and decryption method and device based on link data self-adaptive adjustment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211127979.XA CN115208705B (en) 2022-09-16 2022-09-16 Encryption and decryption method and device based on link data self-adaptive adjustment

Publications (2)

Publication Number Publication Date
CN115208705A CN115208705A (en) 2022-10-18
CN115208705B true CN115208705B (en) 2022-12-20

Family

ID=83571751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211127979.XA Active CN115208705B (en) 2022-09-16 2022-09-16 Encryption and decryption method and device based on link data self-adaptive adjustment

Country Status (1)

Country Link
CN (1) CN115208705B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115941279A (en) * 2022-11-10 2023-04-07 阿里巴巴(中国)有限公司 Encryption and decryption method, system and equipment for user identification in data
CN116094815B (en) * 2023-02-03 2023-12-22 广州万协通信息技术有限公司 Data encryption processing method and device based on flow self-adaptive control adjustment
CN116132035B (en) * 2023-02-03 2024-04-12 广州万协通信息技术有限公司 High-performance password operation method and device based on multi-parameter dynamic adjustment
CN116866015B (en) * 2023-06-26 2024-04-02 天津航天中为数据系统科技有限公司 Self-adaptive adjustment unmanned aerial vehicle data link encryption transmission system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102412967A (en) * 2011-09-29 2012-04-11 用友软件股份有限公司 Data transmission system and method
CN102780558A (en) * 2012-04-28 2012-11-14 华为终端有限公司 Data encryption and transmission method, algorithm distribution method, equipment and system
CN105391691A (en) * 2015-10-19 2016-03-09 浪潮(北京)电子信息产业有限公司 Communication control method, device and system based on cloud computing
CN114520727A (en) * 2022-04-15 2022-05-20 广州万协通信息技术有限公司 Security chip data protection method and system
CN114915457A (en) * 2022-04-27 2022-08-16 烽台科技(北京)有限公司 Message transmission method, dynamic encryption method, device, electronic equipment and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106921493B (en) * 2017-03-31 2019-12-31 山东汇佳软件科技股份有限公司 Encryption method and system
CN109215170B (en) * 2017-07-04 2021-03-02 百度在线网络技术(北京)有限公司 Driving data storage method, device and equipment
CN112511549B (en) * 2020-12-03 2023-03-31 珠海格力电器股份有限公司 Data transmission method, device, equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102412967A (en) * 2011-09-29 2012-04-11 用友软件股份有限公司 Data transmission system and method
CN102780558A (en) * 2012-04-28 2012-11-14 华为终端有限公司 Data encryption and transmission method, algorithm distribution method, equipment and system
CN105391691A (en) * 2015-10-19 2016-03-09 浪潮(北京)电子信息产业有限公司 Communication control method, device and system based on cloud computing
CN114520727A (en) * 2022-04-15 2022-05-20 广州万协通信息技术有限公司 Security chip data protection method and system
CN114915457A (en) * 2022-04-27 2022-08-16 烽台科技(北京)有限公司 Message transmission method, dynamic encryption method, device, electronic equipment and medium

Also Published As

Publication number Publication date
CN115208705A (en) 2022-10-18

Similar Documents

Publication Publication Date Title
CN115208705B (en) Encryption and decryption method and device based on link data self-adaptive adjustment
CN107770182B (en) Data storage method of home gateway and home gateway
CN106790223B (en) Data transmission method, equipment and system
CN110099064B (en) File processing method, device, equipment and storage medium based on Internet of things
KR101704569B1 (en) Method, Apparatus and System For Controlling Dynamic Vehicle Security Communication Based on Ignition
CN109857479B (en) Interface data processing method, device, computer equipment and storage medium
CN111080857B (en) Vehicle digital key management and use method and device, mobile terminal and storage medium
CN114637987B (en) Security chip firmware downloading method and system based on platform verification
US20230224701A1 (en) Network connection method, terminal, device to be connected to network, and storage medium
CN110505066A (en) A kind of data transmission method, device, equipment and storage medium
CN108848413B (en) System, method and device for preventing video from replay attack and storage medium
CN115514561B (en) Data security communication system and method
CN115208697A (en) Adaptive data encryption method and device based on attack behavior
CN108965279A (en) Data processing method, device, terminal device and computer readable storage medium
CN110855616A (en) Digital key generation system
CN115118419A (en) Data transmission method of security chip, security chip device, equipment and medium
CN117240625A (en) Tamper-resistant data processing method and device and electronic equipment
CN109088729B (en) Key storage method and device
CN108471406B (en) Network attack monitoring method, device, equipment and storage medium
CN113992427A (en) Data encryption sending method and device based on adjacent nodes
CN115567200B (en) Http interface anti-brushing method, system and related equipment
CN113141333A (en) Communication method, device, server, system and storage medium for network access device
CN111431846B (en) Data transmission method, device and system
CN109302284B (en) Hardware wallet
CN115001716B (en) Network data processing method and system of education all-in-one machine and education all-in-one machine

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