CN116707801A - File data protection method, device, equipment and storage medium for program test - Google Patents

File data protection method, device, equipment and storage medium for program test Download PDF

Info

Publication number
CN116707801A
CN116707801A CN202310974583.7A CN202310974583A CN116707801A CN 116707801 A CN116707801 A CN 116707801A CN 202310974583 A CN202310974583 A CN 202310974583A CN 116707801 A CN116707801 A CN 116707801A
Authority
CN
China
Prior art keywords
key
program
plaintext
file data
ciphertext
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
CN202310974583.7A
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.)
Beijing Deepexi Technology Co Ltd
Original Assignee
Beijing Deepexi 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 Beijing Deepexi Technology Co Ltd filed Critical Beijing Deepexi Technology Co Ltd
Priority to CN202310974583.7A priority Critical patent/CN116707801A/en
Publication of CN116707801A publication Critical patent/CN116707801A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • 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/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/34Encoding or coding, e.g. Huffman coding or error correction
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a file data protection method, a device, equipment and a storage medium for program test, which relate to the field of data protection and comprise the steps of responding to an encryption request, confirming a target master key according to a key code in the encryption request and generating a plaintext key; encrypting the plaintext key by using the target master key to obtain a ciphertext key; the method comprises the steps of sending a plaintext key and a ciphertext key to a program to be tested, enabling the program to be tested to encrypt plaintext file data into ciphertext file data by using the plaintext key, and storing the ciphertext file data and the ciphertext key; responding to the decryption request, and determining a target master key according to a key code in the decryption request; decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key; the plaintext key is sent to the program to be tested. The invention solves the technical problems of low encryption efficiency and low security of file data encryption storage.

Description

File data protection method, device, equipment and storage medium for program test
Technical Field
The present invention relates to the field of data protection, and in particular, to a method, an apparatus, a device, and a storage medium for protecting file data for program testing.
Background
With the development of electronic information technology, the number of applications is increasing. File data of an application program in a development test stage is an important asset of a program development enterprise, and loss, damage or leakage of the file data is likely to bring immeasurable loss to the enterprise. The encryption storage of the file data in the development test stage is one of the common means in data security protection, and at present, the file data is usually stored after being manually encrypted, and the encryption mode is single, so that the problems of low encryption efficiency and low security exist.
Disclosure of Invention
The main purpose of the invention is that: the method, the device, the equipment and the storage medium for protecting the file data for program test are provided, and the technical problems of low encryption efficiency and low security of file data encryption storage in the prior art are solved.
In order to achieve the above purpose, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a method for protecting file data for program test, the method comprising:
responding to an encryption request of a program to be tested, confirming a target master key according to a key code in the encryption request, and generating a plaintext key;
encrypting the plaintext key by using the target master key to obtain a ciphertext key;
the plaintext key and the ciphertext key are sent to the program to be tested, so that the program to be tested encrypts plaintext file data into ciphertext file data by using the plaintext key, and the ciphertext file data and the ciphertext key are stored;
responding to a decryption request of the program to be tested, and determining a target master key according to a key code in the decryption request;
decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key;
and sending the plaintext key to the program to be tested, so that the program to be tested decrypts the ciphertext file data into plaintext file data by using the plaintext key.
Optionally, in the method for protecting file data for program test, after the step of confirming the target master key according to the key code in the encryption request and generating the plaintext key, the method further comprises,
judging whether the target master key is correct or not according to the length value of the target master key;
encrypting the plaintext key using the target master key to obtain a ciphertext key, including,
and if the target master key is correct, encrypting the plaintext key by using the target master key to obtain a ciphertext key.
Optionally, in the file data protection method for program test, the validating the target master key according to the key code in the encryption request includes,
and sending the key codes to a database so that the database determines a target master key among a plurality of keys.
Optionally, in the file data protection method for program test, the storing the ciphertext file data and the ciphertext key includes,
and storing the ciphertext file data and the ciphertext key in a node machine of the distributed file system.
Optionally, in the file data protection method for program test, the responding to the encryption request of the program to be tested confirms the target master key according to the key code in the encryption request and generates the plaintext key, which comprises,
responding to an encryption request of a program to be tested, and confirming a target master key according to a key code in the encryption request;
determining a target plaintext key in the plaintext keys in a database according to the preset corresponding relation between the target master key or the key code and the plaintext key;
encrypting the plaintext key using the target master key to obtain a ciphertext key, including,
and encrypting the target plaintext key by using the target master key to obtain a ciphertext key.
In a second aspect, the present invention provides a file data protection device for program test, the device comprising:
the encryption module is used for responding to an encryption request of a program to be tested, confirming a target master key according to a key code in the encryption request and generating a plaintext key;
encrypting the plaintext key by using the target master key to obtain a ciphertext key;
the plaintext key and the ciphertext key are sent to the program to be tested, so that the program to be tested encrypts plaintext file data into ciphertext file data by using the plaintext key, and the ciphertext file data and the ciphertext key are stored;
the decryption module is used for responding to the decryption request of the program to be tested and determining a target master key according to the key code in the decryption request;
decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key;
and sending the plaintext key to the program to be tested, so that the program to be tested decrypts the ciphertext file data into plaintext file data by using the plaintext key.
In a third aspect, the present invention provides a file data protection device for program test, where the file data protection device for program test includes a processor and a memory, where protection is stored in the memory, and when the protection program is executed by the processor, the file data protection method for program test is implemented as described above.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by one or more processors, implements a method for protecting file data for program testing as described above.
The one or more technical schemes provided by the invention can have the following advantages or at least realize the following technical effects:
the invention provides a file data protection method, a device, equipment and a storage medium for program test, which are used for responding to an encryption request of a program to be tested, confirming a target master key according to a key code in the encryption request and generating a plaintext key; encrypting the plaintext key by using the target master key to obtain a ciphertext key; the plaintext key and the ciphertext key are sent to the program to be tested, so that the program to be tested encrypts plaintext file data into ciphertext file data by using the plaintext key, and the ciphertext file data and the ciphertext key are stored; responding to a decryption request of the program to be tested, and determining a target master key according to a key code in the decryption request; decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key; the plaintext key is sent to the program to be tested, so that the program to be tested decrypts the ciphertext file data into plaintext file data by utilizing the plaintext key, the technical problems of low encryption efficiency and low safety of file data encryption storage are solved, automatic encryption and decryption of the file data are realized, and the safety of the file data is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are required in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings may be obtained from the drawings provided without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a first embodiment of a method for protecting file data for program test according to the present invention;
FIG. 2 is a schematic hardware structure of a file data protection device for program test according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a method for protecting file data for program test according to the present invention;
fig. 4 is a schematic functional block diagram of a first embodiment of a file data protection device for program testing according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, in the present disclosure, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
In the present invention, suffixes such as "module", "part" or "unit" used for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances. In addition, the technical solutions of the embodiments may be combined with each other, but it is based on the fact that those skilled in the art can implement the combination of the technical solutions, when the technical solutions contradict each other or cannot be implemented, the combination of the technical solutions should be considered as not existing and not falling within the protection scope of the present invention.
Example 1
Referring to the flowchart of fig. 1, a first embodiment of the method for protecting file data for program test according to the present invention is provided, and the method for protecting file data for program test is applied to the device for protecting file data for program test.
The file data protection device for program test is a terminal device or a network device, and the file data protection device for program test can be a terminal device such as a mobile phone, a computer, a tablet personal computer, an embedded industrial personal computer, and the like, and can also be a network device such as a server, a cloud platform, and the like.
Fig. 2 is a schematic hardware structure of a file data protection device for program test. The file data protection device for program test may include: a processor 1001, such as a CPU (Central Processing Unit ), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005.
It will be appreciated by those skilled in the art that the hardware architecture shown in fig. 2 is not limiting of the file data protection device for program testing of the present invention, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
In particular, communication bus 1002 is configured to enable connective communication between these components;
the user interface 1003 is used for connecting to a client and communicating data with the client, and the user interface 1003 may include an output unit such as a display screen, an input unit such as a keyboard;
the network interface 1004 is used to connect to and communicate data with a background server, and the network interface 1004 may include an input/output interface, such as a standard wired interface, a wireless interface, such as a Wi-Fi interface;
the memory 1005 is used for storing various types of data, and the data may include, for example, instructions of any application program or method in the file data protection device for program test, and data related to the application program, and the memory 1005 may be a high-speed RAM memory or a stable memory, such as a disk memory; optionally, the memory 1005 may also be a storage device independent of the processor 1001, and with continued reference to fig. 2, the memory 1005 may include an operating system, a network communication module, a user interface module, and a protection program;
the processor 1001 is used to call a protection program stored in the memory 1005.
Based on the above-mentioned file data protection device for program test, the following describes the file data protection method for program test of the present embodiment in detail with reference to the flowchart shown in fig. 1. The method may comprise the steps of:
step S10: and responding to an encryption request of a program to be tested, confirming a target master key according to a key code in the encryption request, and generating a plaintext key.
Specifically, when the encryption request is that the program to be tested needs to store file data, the file data is actively or controlled and sent by a user, the number of main keys is several, in practical application, the key code and the program to be tested correspond to the main keys, when the protection device receives the encryption request sent by the program to be tested, the key code in the encryption request is obtained, and the target main key corresponding to the program to be tested is determined through the key code. The plaintext key may correspond to the program to be tested or may be randomly generated, and is not further limited in this embodiment.
Step S30: and encrypting the plaintext key by using the target master key to obtain a ciphertext key.
Specifically, after the protection device generates the plaintext key, the target master key is used to encrypt the plaintext key to obtain the ciphertext key, and it can be understood that the ciphertext key needs to be decrypted by the target master key to be changed into the plaintext key.
Step S40: and sending the plaintext key and the ciphertext key to the program to be tested, so that the program to be tested encrypts plaintext file data into ciphertext file data by using the plaintext key, and stores the ciphertext file data and the ciphertext key.
Specifically, after the protection device generates the ciphertext key, the ciphertext key and the plaintext key are sent to the program to be tested, after the program to be tested receives the ciphertext key and the plaintext key sent by the protection device, the pre-stored plaintext file data is encrypted into ciphertext file data by using the plaintext key, and then the ciphertext file data and the ciphertext key are stored together, wherein the storage position can be a local database or a server.
Step S50: and responding to the decryption request of the program to be tested, and determining a target master key according to the key code in the decryption request.
Step S60: and decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key.
Step S70: and sending the plaintext key to the program to be tested, so that the program to be tested decrypts the ciphertext file data into plaintext file data by using the plaintext key.
According to the file data protection method for program test, provided by the embodiment, a target master key is confirmed according to a key code in an encryption request by responding to the encryption request of a program to be tested, and a plaintext key is generated; encrypting the plaintext key by using the target master key to obtain a ciphertext key; the plaintext key and the ciphertext key are sent to the program to be tested, so that the program to be tested encrypts plaintext file data into ciphertext file data by using the plaintext key, and the ciphertext file data and the ciphertext key are stored; responding to a decryption request of the program to be tested, and determining a target master key according to a key code in the decryption request; decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key; the plaintext key is sent to the program to be tested, so that the program to be tested decrypts the ciphertext file data into plaintext file data by utilizing the plaintext key, the technical problems of low encryption efficiency and low safety of file data encryption storage are solved, automatic encryption and decryption of the file data are realized, and the safety of the file data is improved.
Example two
Based on the same inventive concept, referring to fig. 3, a second embodiment of the file data protection method for program test of the present invention is presented, which is applied to the file data protection device for program test.
The method for protecting file data for program test according to the present embodiment will be described in detail with reference to the flowchart shown in fig. 3. The method may comprise the steps of:
step S11: and responding to an encryption request of a program to be tested, confirming a target master key according to a key code in the encryption request, and generating a plaintext key.
Step S21: and judging whether the target master key is correct or not according to the length value of the target master key.
Specifically, after confirming the target master key, the protection device judges whether the target master key is correct based on the corresponding relation between the preset master key and the length value, and avoids encrypting the plaintext key by using an incorrect master key.
Step S31: and if the target master key is correct, encrypting the plaintext key by using the target master key to obtain a ciphertext key.
Specifically, if the target master password is abnormal, generating alarm information, and stopping encrypting the plaintext key by using the target master key.
Step S41: and sending the plaintext key and the ciphertext key to the program to be tested, so that the program to be tested encrypts plaintext file data into ciphertext file data by using the plaintext key, and stores the ciphertext file data and the ciphertext key.
Step S51: and responding to the decryption request of the program to be tested, and determining a target master key according to the key code in the decryption request.
Step S61: and decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key.
Step S71: and sending the plaintext key to the program to be tested, so that the program to be tested decrypts the ciphertext file data into plaintext file data by using the plaintext key.
Further, step S11 may include:
and sending the key codes to a database so that the database determines a target master key among a plurality of keys.
Further, step S41 may include:
and storing the ciphertext file data and the ciphertext key in a node machine of the distributed file system.
Further, step S11 may include: responding to an encryption request of a program to be tested, and confirming a target master key according to a key code in the encryption request;
and determining a target plaintext key in the plaintext keys in the database according to the preset corresponding relation between the target master key or the key code and the plaintext key.
And step S31 may include:
and the target master key is correct, and the target plaintext key is encrypted by using the target master key to obtain the ciphertext key.
According to the file data protection method for program test, provided by the embodiment, a target master key is confirmed according to a key code in an encryption request by responding to the encryption request of a program to be tested, and a plaintext key is generated; encrypting the plaintext key by using the target master key to obtain a ciphertext key; the plaintext key and the ciphertext key are sent to the program to be tested, so that the program to be tested encrypts plaintext file data into ciphertext file data by using the plaintext key, and the ciphertext file data and the ciphertext key are stored; responding to a decryption request of the program to be tested, and determining a target master key according to a key code in the decryption request; decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key; the plaintext key is sent to the program to be tested, so that the program to be tested decrypts the ciphertext file data into plaintext file data by utilizing the plaintext key, the technical problems of low encryption efficiency and low safety of file data encryption storage are solved, automatic encryption and decryption of the file data are realized, and the safety of the file data is improved. And judging whether the target master key is correct or not according to the length value of the target master key, and determining whether the plaintext key is encrypted by using the target master key or not, so that encryption errors are avoided.
Example III
Based on the same inventive concept, referring to fig. 4, a first embodiment of the file data protection device for program test of the present invention is presented, and the protection device may be a virtual device, and is applied to a file data protection apparatus for program test.
The following describes in detail the file data protection device for program test provided in this embodiment with reference to a schematic functional block diagram shown in fig. 4, where the device may include:
the encryption module is used for responding to an encryption request of a program to be tested, confirming a target master key according to a key code in the encryption request and generating a plaintext key; encrypting the plaintext key by using the target master key to obtain a ciphertext key; the plaintext key and the ciphertext key are sent to the program to be tested, so that the program to be tested encrypts plaintext file data into ciphertext file data by using the plaintext key, and the ciphertext file data and the ciphertext key are stored;
the decryption module is used for responding to the decryption request of the program to be tested and determining a target master key according to the key code in the decryption request; decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key; and sending the plaintext key to the program to be tested, so that the program to be tested decrypts the ciphertext file data into plaintext file data by using the plaintext key.
It should be noted that, the functions and the corresponding technical effects that can be achieved by each module in the file data protection device for program test provided in this embodiment may refer to descriptions of specific embodiments in each embodiment of the file data protection method for program test of the present invention, and for brevity of description, no further description is given here.
Example IV
Based on the same inventive concept, referring to the hardware structure schematic diagram of fig. 2, this embodiment provides a file data protection device for program test, where the file data protection device for program test may include a processor and a memory, where the memory stores protection, and when the protection is executed by the processor, all or part of steps of each embodiment of the file data protection method for program test of the present invention are implemented.
Specifically, the file data protection device for program test is a terminal device or a network device, which may be a terminal device such as a mobile phone, a computer, a tablet computer, a portable computer, or a network device such as a server and a cloud platform.
It will be appreciated that the program test file data protection device may also include a communication bus, a user interface and a network interface. Wherein the communication bus is used for realizing connection communication among the components; the user interface is used for connecting the client and communicating data with the client, and can comprise an output unit such as a display screen and an input unit such as a keyboard; the network interface is used to connect to and communicate data with the background server, and may include an input/output interface, such as a standard wired interface, a wireless interface.
The memory is used to store various types of data, which may include, for example, instructions of any application or method in the program test file data protection device, as well as application-related data. The Memory may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as static random access Memory (Static Random Access Memory, SRAM for short), random access Memory (Random Access Memory, RAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic or optical disk, optionally, the Memory may also be a processor-independent Memory device.
The processor is used to call the protection program stored in the memory and execute the file data protection method for program test as described above, and the processor may be an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), a digital signal processor (Digital Signal Processor, abbreviated as DSP), a digital signal processing device (Digital Signal Processing Device, abbreviated as DSPD), a programmable logic device (Programmable Logic Device, abbreviated as PLD), a field programmable gate array (Field Programmable Gate Array, abbreviated as FPGA), a controller, a microcontroller, a microprocessor or other electronic components for executing all or part of the steps of the file data protection method for program test as described above in various embodiments.
Example five
Based on the same inventive concept, the present embodiment provides a computer readable storage medium such as a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic memory, a magnetic disk, an optical disk, a server, etc., on which a computer program is stored, which computer program is executable by one or more processors, and which computer program, when executed by the processors, can implement all or part of the steps of the various embodiments of the file data protection method for program test of the present invention.
It should be noted that, the foregoing reference numerals of the embodiments of the present invention are only for describing the embodiments, and do not represent the advantages and disadvantages of the embodiments. The above embodiments are only optional embodiments of the present invention, and not limiting the scope of the present invention, and all equivalent structures or equivalent processes using the descriptions of the present invention and the accompanying drawings or direct or indirect application in other related technical fields are included in the scope of the present invention.

Claims (8)

1. A method for protecting file data for program test, the method comprising:
responding to an encryption request of a program to be tested, confirming a target master key according to a key code in the encryption request, and generating a plaintext key;
encrypting the plaintext key by using the target master key to obtain a ciphertext key;
the plaintext key and the ciphertext key are sent to the program to be tested, so that the program to be tested encrypts plaintext file data into ciphertext file data by using the plaintext key, and the ciphertext file data and the ciphertext key are stored;
responding to a decryption request of the program to be tested, and determining a target master key according to a key code in the decryption request;
decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key;
and sending the plaintext key to the program to be tested, so that the program to be tested decrypts the ciphertext file data into plaintext file data by using the plaintext key.
2. The method for protecting file data for program test according to claim 1, wherein after the steps of validating a target master key based on a key code in the encryption request and generating a plaintext key, the method further comprises,
judging whether the target master key is correct or not according to the length value of the target master key;
encrypting the plaintext key using the target master key to obtain a ciphertext key, including,
and if the target master key is correct, encrypting the plaintext key by using the target master key to obtain a ciphertext key.
3. The method for protecting file data for program test according to claim 1, wherein said validating the target master key based on the key code in the encryption request comprises,
and sending the key codes to a database so that the database determines a target master key among a plurality of keys.
4. The method for protecting file data for program test according to claim 1, wherein storing the ciphertext file data and ciphertext key comprises,
and storing the ciphertext file data and the ciphertext key in a node machine of the distributed file system.
5. The method for protecting file data for program test according to claim 1, wherein said responding to the encryption request of the program to be tested, confirming the target master key according to the key code in the encryption request, and generating the plaintext key comprises,
responding to an encryption request of a program to be tested, and confirming a target master key according to a key code in the encryption request;
determining a target plaintext key in the plaintext keys in a database according to the preset corresponding relation between the target master key or the key code and the plaintext key;
encrypting the plaintext key using the target master key to obtain a ciphertext key, including,
and encrypting the target plaintext key by using the target master key to obtain a ciphertext key.
6. A document data protection device for program testing, the device comprising:
the encryption module is used for responding to an encryption request of a program to be tested, confirming a target master key according to a key code in the encryption request and generating a plaintext key; encrypting the plaintext key by using the target master key to obtain a ciphertext key; the plaintext key and the ciphertext key are sent to the program to be tested, so that the program to be tested encrypts plaintext file data into ciphertext file data by using the plaintext key, and the ciphertext file data and the ciphertext key are stored;
the decryption module is used for responding to the decryption request of the program to be tested and determining a target master key according to the key code in the decryption request; decrypting the ciphertext key in the decryption request by using the target master key to obtain a plaintext key; and sending the plaintext key to the program to be tested, so that the program to be tested decrypts the ciphertext file data into plaintext file data by using the plaintext key.
7. A program-testing-use file data protection device, characterized in that the device comprises a processor and a memory, on which a protection program is stored, which protection program, when executed by the processor, implements the program-testing-use file data protection method according to any one of claims 1 to 5.
8. A computer-readable storage medium, wherein the storage medium has stored thereon a computer program which, when executed by one or more processors, implements the method for protecting file data for program testing according to any one of claims 1 to 5.
CN202310974583.7A 2023-08-04 2023-08-04 File data protection method, device, equipment and storage medium for program test Pending CN116707801A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310974583.7A CN116707801A (en) 2023-08-04 2023-08-04 File data protection method, device, equipment and storage medium for program test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310974583.7A CN116707801A (en) 2023-08-04 2023-08-04 File data protection method, device, equipment and storage medium for program test

Publications (1)

Publication Number Publication Date
CN116707801A true CN116707801A (en) 2023-09-05

Family

ID=87832535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310974583.7A Pending CN116707801A (en) 2023-08-04 2023-08-04 File data protection method, device, equipment and storage medium for program test

Country Status (1)

Country Link
CN (1) CN116707801A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170286695A1 (en) * 2016-04-01 2017-10-05 Egnyte, Inc. Methods for Improving Performance and Security in a Cloud Computing System
CN110061957A (en) * 2018-12-20 2019-07-26 中智关爱通(上海)科技股份有限公司 Data encryption, decryption method, user terminal, server and data management system
CN110752924A (en) * 2019-10-30 2020-02-04 四川长虹电器股份有限公司 Key safety management method based on safety multi-party calculation
CN111917540A (en) * 2020-08-07 2020-11-10 广州市百果园信息技术有限公司 Data encryption and decryption method and device, mobile terminal and storage medium
CN114884697A (en) * 2022-04-12 2022-08-09 平安国际智慧城市科技股份有限公司 Data encryption and decryption method based on state cryptographic algorithm and related equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170286695A1 (en) * 2016-04-01 2017-10-05 Egnyte, Inc. Methods for Improving Performance and Security in a Cloud Computing System
CN110061957A (en) * 2018-12-20 2019-07-26 中智关爱通(上海)科技股份有限公司 Data encryption, decryption method, user terminal, server and data management system
CN110752924A (en) * 2019-10-30 2020-02-04 四川长虹电器股份有限公司 Key safety management method based on safety multi-party calculation
CN111917540A (en) * 2020-08-07 2020-11-10 广州市百果园信息技术有限公司 Data encryption and decryption method and device, mobile terminal and storage medium
CN114884697A (en) * 2022-04-12 2022-08-09 平安国际智慧城市科技股份有限公司 Data encryption and decryption method based on state cryptographic algorithm and related equipment

Similar Documents

Publication Publication Date Title
CN110365670B (en) Blacklist sharing method and device, computer equipment and storage medium
US11076295B2 (en) Remote management method, and device
KR101744747B1 (en) Mobile terminal, terminal and method for authentication using security cookie
US20200026882A1 (en) Methods and systems for activating measurement based on a trusted card
CN111178884A (en) Information processing method, device, equipment and readable storage medium
CN108880812B (en) Method and system for data encryption
CN107124279B (en) Method and device for erasing terminal data
CN112734361B (en) Distributed cooperative office data processing method and system
CN111200593A (en) Application login method and device and electronic equipment
CN111628863B (en) Data signature method and device, electronic equipment and storage medium
CN112733180A (en) Data query method and device and electronic equipment
CN111404892B (en) Data supervision method and device and server
CN108418679B (en) Method and device for processing secret key under multiple data centers and electronic equipment
CN112446782A (en) Method for downloading initial key, computer equipment and storage medium
CN112307503A (en) Signature management method and device and electronic equipment
CN109995534B (en) Method and device for carrying out security authentication on application program
CN111949996A (en) Generation method, encryption method, system, device and medium of security private key
CN116707801A (en) File data protection method, device, equipment and storage medium for program test
CN112769565B (en) Method, device, computing equipment and medium for upgrading cryptographic algorithm
CN112866987B (en) Networking verification method, networking verification device and computer readable storage medium
CN114117388A (en) Device registration method, device registration apparatus, electronic device, and storage medium
CN110995437B (en) ETC system-based user information input method, device, equipment and storage medium
CN109688158B (en) Financial execution chain authentication method, electronic device and storage medium
CN113439292B (en) System and method for managing trusted applications in computer chip modules
JP6284301B2 (en) Maintenance work determination apparatus and maintenance work determination method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20230905

RJ01 Rejection of invention patent application after publication