CN115174195A - Database file processing method, encryption terminal and decryption terminal - Google Patents

Database file processing method, encryption terminal and decryption terminal Download PDF

Info

Publication number
CN115174195A
CN115174195A CN202210767626.XA CN202210767626A CN115174195A CN 115174195 A CN115174195 A CN 115174195A CN 202210767626 A CN202210767626 A CN 202210767626A CN 115174195 A CN115174195 A CN 115174195A
Authority
CN
China
Prior art keywords
file
encrypted
decryption
decrypted
public
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
CN202210767626.XA
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.)
FAW Group Corp
Original Assignee
FAW Group Corp
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 FAW Group Corp filed Critical FAW Group Corp
Priority to CN202210767626.XA priority Critical patent/CN115174195A/en
Publication of CN115174195A publication Critical patent/CN115174195A/en
Pending legal-status Critical Current

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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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
    • H04L9/3239Cryptographic 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 involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD

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 a database file processing method, an encryption terminal and a decryption terminal. The method comprises the following steps: encrypting a database file to be encrypted by a random password with a preset digit to obtain an encrypted file; determining a first hash value of the encrypted file; acquiring a pre-generated public and private key pair; generating a decryption file according to the first hash value, the public and private key pair and the random password; and sending the encrypted file and the decrypted file to a decryption end so that the decryption end decrypts according to the encrypted file and the decrypted file to obtain the database file. The scheme provided by the embodiment of the invention can encrypt the vehicle-mounted network bus database, and can be opened and analyzed at a specific decryption end, so that the detailed data of the database file can be analyzed while the database file is encrypted, the detailed communication content is not displayed in the transmission process of the database file, and the communication encryption of the database file is realized.

Description

Database file processing method, encryption terminal and decryption terminal
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a database file processing method, an encryption side, and a decryption side.
Background
When performing road experiments on automobiles, data generated by test vehicles need to be acquired. At present, a data collection device may collect a database file obtained by testing a vehicle, and the database file may be analyzed to obtain relevant data of a road experiment.
Because the database file is used as a core confidential file of an automobile enterprise, when the database file is collected, a detailed communication signal in the database file is deleted and then the database file is collected by a data collecting device.
However, the requirement for detailed analysis of the database file cannot be met by deleting the detailed communication signal, so a method is needed for encrypting the vehicle-mounted network bus database file and meeting the requirement for detailed analysis of the database file by an automobile enterprise.
Disclosure of Invention
The invention provides a database file processing method, an encryption terminal and a decryption terminal, which can encrypt a journey communication database file and meet the requirement of detailed analysis of the database file.
According to an aspect of the present invention, there is provided a database file processing method applied to an encryption side, including:
encrypting a database file to be encrypted by a random password with a preset digit to obtain an encrypted file;
determining a first hash value of the encrypted file;
acquiring a pre-generated public and private key pair;
generating a decryption file according to the first hash value, the public and private key pair and the random password;
and sending the encrypted file and the decrypted file to a decryption end so that the decryption end decrypts according to the encrypted file and the decrypted file to obtain the database file.
Optionally, the obtaining a pre-generated public-private key pair includes:
requesting an available private key from a cloud server, wherein the cloud server generates a public-private key pair consisting of a public key and a private key according to a preset time period;
and acquiring the public and private key pair returned by the cloud server.
Optionally, the generating a decryption file according to the first hash value, the public-private key pair, and the random password includes:
encrypting the random password through a private key in the public-private key pair to obtain an encrypted password;
and generating a decryption file according to the encryption password and the first hash value.
Optionally, generating a decrypted file according to the encrypted password and the first hash value includes:
determining a current first time value and a time limit value;
and writing the first time value, the time period limit value, the first hash value, the public key and the encrypted password into a file template to obtain the decrypted file.
According to another aspect of the present invention, there is provided a database file processing method applied to a decryption side, including:
receiving the encrypted file and the decrypted file sent by the encryption terminal;
obtaining a random password of the encrypted file from the decrypted file;
and decrypting the encrypted file through the random password to obtain a database file.
Optionally, after receiving the encrypted file and the decrypted file sent by the encryption terminal, the method further includes:
performing hash calculation on the encrypted file to obtain a second hash value of the encrypted file;
and when the second hash value is the same as the first hash value included in the encrypted file, decrypting the encrypted file through the random password.
Optionally, after receiving the encrypted file and the decrypted file sent by the encryption terminal, the method further includes:
acquiring a first time value and a time limit value from the decrypted file;
determining whether a current second time value exceeds a sum of the first time value and the time limit value;
decrypting the encrypted file with the random password when the second time value does not exceed the sum of the first time value and the time period limit.
Optionally, the obtaining a random password of an encrypted file from the decrypted file includes:
obtaining a public key from the decrypted file;
and decrypting the encrypted password in the decrypted file through the public key to obtain the random password.
According to another aspect of the present invention, there is provided an encryption terminal including:
the file encryption unit is used for encrypting the database file to be encrypted through a random password with a preset digit number to obtain an encrypted file;
a hash value determination unit configured to determine a first hash value of the encrypted file;
a key obtaining unit, configured to obtain a pre-generated public-private key pair;
a decrypted file generating unit, configured to generate a decrypted file according to the first hash value, the public-private key pair, and the random password;
and the decryption file sending unit is used for sending the encrypted file and the decryption file to a decryption end so that the decryption end decrypts the encrypted file and the decryption file to obtain the database file.
According to another aspect of the present invention, there is provided a decryption side comprising:
the file receiving unit is used for receiving the encrypted file and the decrypted file sent by the encryption terminal;
the password acquisition unit is used for acquiring a random password of the encrypted file from the decrypted file;
and the file decryption unit is used for decrypting the encrypted file through the random password to obtain a database file.
According to the technical scheme of the embodiment of the invention, an encryption end encrypts a database file collected in a vehicle test through a random password with a preset digit to obtain an encrypted file, and a decrypted file is obtained according to a first hash value of the encrypted file, the obtained public and private key pair and the random password used for encrypting the database file; and sending the encrypted file and the decrypted file to a decryption end, and obtaining the database file by the decryption end through the encrypted file and the decrypted file. The scheme provided by the embodiment of the invention can encrypt the vehicle-mounted network bus database, and can be opened and analyzed at a specific decryption end, so that the detailed data of the database file can be analyzed while the database file is encrypted, the detailed communication content is not displayed in the transmission process of the database file, and the communication encryption of the database file is realized.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a database file processing method according to an embodiment of the present invention.
Fig. 2 is a flowchart of a method for acquiring a public-private key pair according to a second embodiment of the present invention.
Fig. 3 is a flowchart of a decrypted file generating method according to a second embodiment of the present invention.
Fig. 4 is a flowchart of a database file processing method according to a third embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an encryption end according to a fourth embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a decryption end according to a fifth embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a database file processing method according to an embodiment of the present invention, where this embodiment is applicable to a case of performing encrypted transmission on a database file obtained in a test of a test vehicle, and the method may be executed by an encryption terminal, where the encryption terminal may be implemented in a form of hardware and/or software, and the encryption terminal may be configured in the test vehicle. As shown in fig. 1, the method includes:
s110, encrypting the database file to be encrypted through a random password with a preset digit number to obtain an encrypted file.
The random password is a randomly generated password with a fixed number and is used for encrypting the database file, for example, a random 16-bit password may be selected. The encryption algorithm used when the database file is encrypted through the random password can be selected from an SM algorithm, an RSA algorithm or an AES algorithm according to requirements, and a decrypted binary encrypted file can be obtained after the database file is encrypted. Without the key, the file may not be decompiled to the original format.
S120, determining a first hash value of the encrypted file.
After the second-level system encrypted file is obtained, performing hash calculation on the encrypted file to obtain a first hash value of the encrypted file. The first hash value is used for file verification and key pair lookup. The hash value may be calculated using a hash value algorithm or an MD5 calculation method. The selection of the encryption algorithm is divided into three scenes, namely a national secret scene, a non-national secret scene and an asymmetric encryption scene. In a state secret scene, the encryption algorithm can adopt an SM2 algorithm, and the hash algorithm can adopt an SM3 algorithm; for a non-national secret scene, the encryption algorithm can adopt an RSA algorithm, and the hash algorithm can adopt an SHA-1 algorithm; for asymmetric encryption scenarios, the encryption algorithm may employ the AES algorithm. The encryption strength under the national secret scene and the non-national secret scene is the same, only the decryption protocol has difference, and when the encryption device is actually used, the adaptive scene can be selected according to the using scene to perform encryption and detailed calculation.
And S130, acquiring a pre-generated public and private key pair.
The public-private key pair may be generated by a generation tool, such as a cloud server or a local password generator. When the tool bit cloud server is generated, the encryption terminal can download the public and private key pair from the remote server platform. The generation algorithm of the public and private key pair can select an SM algorithm or an RSA algorithm as required.
S140, generating a decryption file according to the first hash value, the public and private key pair and the random password.
S150, the encrypted file and the decrypted file are sent to a decryption end, so that the decryption end decrypts the encrypted file and the decrypted file to obtain the database file.
The decryption file comprises a random password used for decrypting the encryption file, a first hash value used for verifying and a public and private key pair. The decryption file may be an excel format record file integrating the first hash value, the public-private key pair, and the random password. Through the encryption process of the encryption terminal, two binary files are generated in total, the encrypted file comprises a database file, and the decrypted file comprises information such as a password for decrypting the database file. The encrypted file and the decrypted file are sent to a decryption end and can be directly transmitted through an SD card or a cloud platform.
According to the technical scheme of the embodiment of the invention, an encryption end encrypts a database file collected in a vehicle test through a random password with a preset digit to obtain an encrypted file, and a decrypted file is obtained according to a first hash value of the encrypted file, the obtained public and private key pair and the random password used for encrypting the database file; and sending the encrypted file and the decrypted file to a decryption end, and obtaining the database file by the decryption end through the encrypted file and the decrypted file. The scheme provided by the embodiment of the invention can encrypt the vehicle-mounted network bus database, and can be opened and analyzed at the specific decryption end, so that the detailed data of the database file can be analyzed while the database file is encrypted, the detailed communication content is not displayed in the transmission process of the database file, and the communication encryption of the database file is realized.
Example two
Fig. 2 is a flowchart of a method for acquiring a public-private key pair according to a second embodiment of the present invention, which is optimized based on the second embodiment. As shown in fig. 2, the method includes:
s210, requesting an available private key from a cloud server, wherein the cloud server generates a public-private key pair consisting of the public key and the private key according to a preset time period.
S220, obtaining the public and private key pair returned by the cloud server.
The cloud server generates a pair of public and private keys according to a preset time period. Such as generating a pair weekly. The encryption terminal can request an available public and private key pair from the cloud server through https, and the cloud server returns the available public and private key pair after receiving the request.
Fig. 3 is a decrypted file generating method according to a second embodiment of the present invention, as shown in fig. 3, the method includes:
s310, encrypting the random password through a private key in the public and private key pair to obtain an encrypted password.
And S320, generating a decryption file according to the encryption password and the first hash value.
After the public and private key pair is obtained, the random password is encrypted by using the private key in the public and private key pair to obtain an encrypted password. The encryption password is encrypted by using a private key, so that the decryption can be performed only through a corresponding public key in the public-private key pair. And after the encrypted password is obtained, writing the encrypted password and the first hash value into a binary file together to obtain a decrypted file.
Optionally, generating a decrypted file according to the encrypted password and the first hash value includes:
determining a current first time value and a time limit value;
and writing the first time value, the time period limit value, the first hash value, the public key and the encrypted password into a file template to obtain the decrypted file.
The first time value and the time limit value are used for setting the validity period of the encrypted file, and the encrypted file is invalidated after exceeding the validity period and cannot be read by the decryption end. The first time value may be a current time value at which the encrypted file is generated for processing, and the time limit value indicates how long after the first time value the encrypted file expires. After the binary encrypted file and the first hash value are generated, the encrypted password, the first hash value, the first time value, and the time limit value may be exported to an excel-format encrypted record file.
Through the encryption process of the encryption terminal, two binary files are generated in total, wherein one binary file comprises a database file, and the other binary file comprises an encryption password for decrypting the database file, the life cycle of the database file and other information.
EXAMPLE III
Fig. 4 is a flowchart of a database file processing method according to a third embodiment of the present invention, where the present embodiment is applicable to a case of decrypting a database file obtained in a test of a test vehicle, and the method may be executed by a decryption side, and the decryption side may be implemented in a form of hardware and/or software.
As shown in fig. 4, the method includes:
s410, receiving the encrypted file and the decrypted file sent by the encryption terminal.
The encryption end can be transmitted through an entity medium such as an SD card or directly through a cloud platform. The encrypted file comprises an encrypted database file, and the decrypted file comprises related information for analyzing the database file.
And S420, obtaining the random password of the encrypted file from the decrypted file.
S430, decrypting the encrypted file through the random password to obtain a database file.
The decryption end can acquire the random password from the decryption file so as to decrypt the encrypted file, and the database file is obtained.
Optionally, after receiving the encrypted file and the decrypted file sent by the encryption terminal, the method further includes:
performing hash calculation on the encrypted file to obtain a second hash value of the encrypted file;
and when the second hash value is the same as the first hash value included in the encrypted file, decrypting the encrypted file through the random password.
Specifically, in order to verify whether the encrypted file is tampered with, verification may be performed by calculating a hash value. The decrypted file includes the first hash value of the encrypted file, and since the hash value of the same file is unique, the second hash value obtained by performing the hash calculation on the encrypted file should be the same as the first hash value. If the first hash value and the second hash value are different, the encrypted file is proved to have the tampering phenomenon, and the encrypted file is invalid.
Optionally, after receiving the encrypted file and the decrypted file sent by the encryption terminal, the method further includes:
acquiring a first time value and a time limit value from the decrypted file;
determining whether a current second time value exceeds a sum of the first time value and the time limit value;
decrypting the encrypted file with the random password when the second time value does not exceed the sum of the first time value and the time period limit.
The first time value and the time limit value are used for representing the valid limit of the encrypted file, the specific time for the encrypted file to expire can be determined according to the sum of the first time value and the time limit value, and then the comparison is carried out according to the second time value during the current decryption to determine whether the encrypted file is expired. The expired encrypted file is directly invalidated and cannot be read by the decryption end.
Optionally, the obtaining a random password of an encrypted file from the decrypted file includes:
obtaining a public key from the decrypted file;
and decrypting the encrypted password in the decrypted file through the public key to obtain the random password.
The decryption end can decrypt the private key used for encrypting the encryption password through the public key to obtain the random password of the plaintext, and the random password can decrypt the encrypted file to obtain the database file of the plaintext.
In addition, after the encryption end generates the encrypted file, the public key in the decrypted file can be changed into the hash value of the private key, then the decrypted file is transmitted to the decryption end, the decryption end can obtain the available public key from the cloud server generating the public and private key pair through the hash value of the private key through the https request, and the encrypted password is decrypted through the public key.
Example four
Fig. 5 is a schematic structural diagram of an encryption end according to a fourth embodiment of the present invention. As shown in fig. 5, the apparatus includes:
the file encryption unit 510 is configured to encrypt the database file to be encrypted by using a random password with a preset number of bits, so as to obtain an encrypted file.
A hash value determination unit 520, configured to determine a first hash value of the encrypted file.
A key obtaining unit 530, configured to obtain a pre-generated public-private key pair.
A decrypted file generating unit 540, configured to generate a decrypted file according to the first hash value, the public-private key pair, and the random password.
A decrypted file sending unit 550, configured to send the encrypted file and the decrypted file to a decryption end, so that the decryption end decrypts the encrypted file and the decrypted file to obtain the database file.
Optionally, the key obtaining unit 530 is configured to perform:
requesting an available private key from a cloud server, wherein the cloud server generates a public-private key pair consisting of a public key and a private key according to a preset time period;
and acquiring the public and private key pair returned by the cloud server.
Optionally, the decrypted file generating unit 540 is configured to perform:
encrypting the random password through a private key in the public-private key pair to obtain an encrypted password;
and generating a decryption file according to the encryption password and the first hash value.
Optionally, the decrypted file generating unit 540 is configured to perform:
generating a decrypted file according to the encrypted password and the first hash value, wherein the method comprises the following steps:
determining a current first time value and a time limit value;
and writing the first time value, the time period limit value, the first hash value, the public key and the encrypted password into a file template to obtain the decrypted file.
EXAMPLE five
Fig. 6 is a schematic structural diagram of a decryption end according to a fifth embodiment of the present invention. As shown in fig. 6, the apparatus includes:
a decrypted file receiving unit 610, configured to receive the encrypted file and the decrypted file sent by the encryption end.
A random password obtaining unit 620, configured to obtain a random password of the encrypted file from the decrypted file;
a file decrypting unit 630, configured to decrypt the encrypted file through the random password to obtain a database file.
Optionally, after performing receiving the encrypted file and the decrypted file sent by the encryption end, the file receiving unit 630 is further configured to perform:
performing hash calculation on the encrypted file to obtain a second hash value of the encrypted file;
and when the second hash value is the same as the first hash value included in the encrypted file, decrypting the encrypted file through the random password.
Optionally, after performing receiving the encrypted file and the decrypted file sent by the encryption end, the file receiving unit 630 is further configured to perform:
acquiring a first time value and a time limit value from the decrypted file;
determining whether a current second time value exceeds a sum of the first time value and the time limit value;
decrypting the encrypted file with the random password when the second time value does not exceed the sum of the first time value and the time period limit.
Optionally, the random password obtaining unit 620 is configured to perform:
acquiring a public key from the decrypted file;
and decrypting the encrypted password in the decrypted file through the public key to obtain the random password.
The encryption terminal and the decryption terminal provided by the embodiment of the invention can respectively execute the database file processing method provided by the corresponding embodiment of the invention, and have the corresponding functional modules and beneficial effects of the execution method.
In each embodiment of the invention, the encryption terminal and the decryption terminal jointly complete the encryption, transmission and decryption of the database file. The database file supported by the encryption terminal comprises a network communication database format supported by library acquisition or debugging equipment, such as dbc, ldf and the like; meanwhile, the encryption tool can also support various configurable functions for different encryption requirements and device capabilities. For example, different encryption algorithms are selected according to different scenes, a life cycle is set for an encrypted file, and a public and private key pair is downloaded from a cloud server.
The scheme provided by each embodiment of the invention can encrypt the whole vehicle communication database, thereby avoiding the leakage of key information; different encryption modes and encryption parameters can be configured, such as encryption algorithm selection, file validity period setting and the like.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A database file processing method is applied to an encryption end and comprises the following steps:
encrypting a database file to be encrypted by a random password with a preset digit to obtain an encrypted file;
determining a first hash value of the encrypted file;
acquiring a pre-generated public and private key pair;
generating a decryption file according to the first hash value, the public and private key pair and the random password;
and sending the encrypted file and the decrypted file to a decryption end so that the decryption end decrypts according to the encrypted file and the decrypted file to obtain the database file.
2. The method of claim 1, wherein obtaining the pre-generated public-private key pair comprises:
requesting an available private key from a cloud server, wherein the cloud server generates a public-private key pair consisting of a public key and a private key according to a preset time period;
and acquiring the public and private key pair returned by the cloud server.
3. The method of claim 2, wherein generating a decrypted file from the first hash value, the public-private key pair, and the random password comprises:
encrypting the random password through a private key in the public-private key pair to obtain an encrypted password;
and generating a decryption file according to the encryption password and the first hash value.
4. The method of claim 3, wherein generating a decrypted file from the encrypted password and the first hash value comprises:
determining a current first time value and a time limit value;
and writing the first time value, the time period limit value, the first hash value, the public key and the encrypted password into a file template to obtain the decrypted file.
5. A database file processing method is applied to a decryption end and comprises the following steps:
receiving the encrypted file and the decrypted file sent by the encryption terminal;
obtaining a random password of the encrypted file from the decrypted file;
and decrypting the encrypted file through the random password to obtain a database file.
6. The method according to claim 5, further comprising, after receiving the encrypted file and the decrypted file from the encryption end:
performing hash calculation on the encrypted file to obtain a second hash value of the encrypted file;
and when the second hash value is the same as the first hash value included in the encrypted file, decrypting the encrypted file through the random password.
7. The method according to claim 5, further comprising, after receiving the encrypted file and the decrypted file from the encryption end:
acquiring a first time value and a time limit value from the decrypted file;
determining whether a current second time value exceeds a sum of the first time value and the time limit value;
decrypting the encrypted file with the random password when the second time value does not exceed the sum of the first time value and the time period limit.
8. The method of claim 5, wherein obtaining the random password of the encrypted file from the decrypted file comprises:
acquiring a public key from the decrypted file;
and decrypting the encrypted password in the decrypted file through the public key to obtain the random password.
9. An encryption peer, comprising:
the file encryption unit is used for encrypting the database file to be encrypted through a random password with a preset digit number to obtain an encrypted file;
a hash value determination unit configured to determine a first hash value of the encrypted file;
a key obtaining unit, configured to obtain a pre-generated public-private key pair;
a decryption file generating unit, configured to generate a decryption file according to the first hash value, the public-private key pair, and the random password;
and the decryption file sending unit is used for sending the encrypted file and the decryption file to a decryption end so that the decryption end decrypts the encrypted file and the decryption file to obtain the database file.
10. A decryption side, comprising:
the file receiving unit is used for receiving the encrypted file and the decrypted file sent by the encryption terminal;
the password obtaining unit is used for obtaining a random password of the encrypted file from the decrypted file;
and the file decryption unit is used for decrypting the encrypted file through the random password to obtain a database file.
CN202210767626.XA 2022-06-30 2022-06-30 Database file processing method, encryption terminal and decryption terminal Pending CN115174195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210767626.XA CN115174195A (en) 2022-06-30 2022-06-30 Database file processing method, encryption terminal and decryption terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210767626.XA CN115174195A (en) 2022-06-30 2022-06-30 Database file processing method, encryption terminal and decryption terminal

Publications (1)

Publication Number Publication Date
CN115174195A true CN115174195A (en) 2022-10-11

Family

ID=83489015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210767626.XA Pending CN115174195A (en) 2022-06-30 2022-06-30 Database file processing method, encryption terminal and decryption terminal

Country Status (1)

Country Link
CN (1) CN115174195A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150024117A (en) * 2013-08-26 2015-03-06 고려대학교 산학협력단 Data certification and acquisition method for vehicle
WO2018076365A1 (en) * 2016-10-31 2018-05-03 美的智慧家居科技有限公司 Key negotiation method and device
CN112134911A (en) * 2019-06-25 2020-12-25 联合汽车电子有限公司 Remote program upgrading method, device and medium
CN114024710A (en) * 2021-09-27 2022-02-08 中诚信征信有限公司 Data transmission method, device, system and equipment
CN114239014A (en) * 2021-12-15 2022-03-25 北京百度网讯科技有限公司 File processing method and device based on offline device and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150024117A (en) * 2013-08-26 2015-03-06 고려대학교 산학협력단 Data certification and acquisition method for vehicle
WO2018076365A1 (en) * 2016-10-31 2018-05-03 美的智慧家居科技有限公司 Key negotiation method and device
CN112134911A (en) * 2019-06-25 2020-12-25 联合汽车电子有限公司 Remote program upgrading method, device and medium
CN114024710A (en) * 2021-09-27 2022-02-08 中诚信征信有限公司 Data transmission method, device, system and equipment
CN114239014A (en) * 2021-12-15 2022-03-25 北京百度网讯科技有限公司 File processing method and device based on offline device and electronic device

Similar Documents

Publication Publication Date Title
CN110474898B (en) Data encryption and decryption and key distribution method, device, equipment and readable storage medium
US7697692B2 (en) Cryptographic communication system and method
CN108768972B (en) Vehicle data storage and access method, device, system and electronic equipment
CN111181928B (en) Vehicle diagnosis method, server, and computer-readable storage medium
CN106571951B (en) Audit log obtaining method, system and device
EP1775879A2 (en) Method and Apparatus for Securely Transmitting and Receiving Data in Peer-to-Peer Manner
CN109254734B (en) Data storage method, device and equipment and computer readable storage medium
CN101651714A (en) Downloading method and related system and equipment
CN113452526B (en) Electronic file certification method, verification method and corresponding devices
CN111639357A (en) Encryption network disk system and authentication method and device thereof
CN111404892A (en) Data supervision method and device and server
CN112699352B (en) Trusted data acquisition terminal identity verification method, computer storage medium and electronic equipment
CN107645500B (en) Broadcast data interaction method and device
CN116781263B (en) Identity authentication and secret key self-updating method among in-vehicle ECUs and readable storage medium
CN104462877A (en) Digital resource acquisition method and system under copyright protection
CN101399663B (en) Method, system and device for digital content authentication
CN112528309A (en) Data storage encryption and decryption method and device
CN115017529B (en) Encryption method for automobile diagnosis software
CN115001869B (en) Encryption transmission method and system
CN115174195A (en) Database file processing method, encryption terminal and decryption terminal
CN116204903A (en) Financial data security management method and device, electronic equipment and storage medium
CN113127930B (en) Charging data processing method, device and computer readable storage medium
CN115941328A (en) Sharable user data encryption processing method, device and system
CN111988133B (en) System SM4 encryption and decryption verification method, device, equipment and storage medium
CN111865891B (en) Data transmission method, user terminal, electronic equipment and readable storage medium

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