CN116992495A - Office file encryption storage method, system, storage medium and electronic equipment - Google Patents

Office file encryption storage method, system, storage medium and electronic equipment Download PDF

Info

Publication number
CN116992495A
CN116992495A CN202311255945.3A CN202311255945A CN116992495A CN 116992495 A CN116992495 A CN 116992495A CN 202311255945 A CN202311255945 A CN 202311255945A CN 116992495 A CN116992495 A CN 116992495A
Authority
CN
China
Prior art keywords
file
encryption
office
chain
office file
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.)
Granted
Application number
CN202311255945.3A
Other languages
Chinese (zh)
Other versions
CN116992495B (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.)
Jiangling Motors Corp Ltd
Original Assignee
Jiangling Motors Corp 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 Jiangling Motors Corp Ltd filed Critical Jiangling Motors Corp Ltd
Priority to CN202311255945.3A priority Critical patent/CN116992495B/en
Publication of CN116992495A publication Critical patent/CN116992495A/en
Application granted granted Critical
Publication of CN116992495B publication Critical patent/CN116992495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses an office file encryption storage method, an office file encryption storage system, a storage medium and electronic equipment, wherein the office file encryption storage method comprises the following steps: acquiring the file completion time of the office file generated by the office, and determining a target sub-database for storing the office file from a plurality of sub-databases according to the file completion time of the office file; determining the file name, the file type and the byte number of the office file respectively, and determining an encryption chain of the office file according to a sequence consisting of the file name, the file type and the byte number; acquiring random numbers of the number required by the current passwords input by the user and used for encryption, copying corresponding chain bits from an encryption chain according to the random numbers, and taking a chain formed by the chain bits as a preposed encryption chain of the office file; and determining a target encryption chain of the office file according to the pre-encryption chain and the encryption chain, and encrypting and storing the office file into a target sub-database according to the target encryption chain. The invention solves the problem of low office file storage security in the prior art.

Description

Office file encryption storage method, system, storage medium and electronic equipment
Technical Field
The present invention relates to the field of file management technologies, and in particular, to an office file encryption storage method, system, storage medium, and device.
Background
With the rapid development of computer technology, paperless office work has become a trend, and more important files are stored in computers. For these important documents, once they are viewed or even leaked by unauthorized personnel, the consequences are not considered, and therefore, measures need to be taken to protect the documents from illegal retrieval or leakage.
In the prior art, most of the prior art directly stores data in a file into a disk, however, the storage security of the storage mode is low.
Disclosure of Invention
In view of the above, the present invention aims to provide an office file encryption storage method, an office file encryption storage system, a readable storage medium and an electronic device, which are used for solving the problem that in the prior art, the password security is low and the data is easy to leak.
The invention is realized in the following way:
an office file encryption storage method for encrypting and storing an office file of a user into a preset file database, wherein the preset file database comprises a plurality of sub-databases divided according to time attributes of the office file, and the method comprises the following steps:
acquiring the file completion time of an office file generated by an office, and determining a target sub-database for storing the office file from the plurality of sub-databases according to the file completion time of the office file;
determining the file name, the file type and the byte number of the office file respectively, and determining an encryption chain of the office file according to a sequence consisting of the file name, the file type and the byte number;
acquiring random numbers of the number required by the current passwords input by the user and used for encryption, copying corresponding chain bits from the encryption chain according to the random numbers, and taking a chain formed by the chain bits as a preposed encryption chain of the office file;
and determining a target encryption chain of the office file according to the pre-encryption chain and the encryption chain, and encrypting and storing the office file into the target sub-database according to the target encryption chain.
Further, in the above office file encryption storage method, the preset file database includes a plurality of sub-databases divided according to the completion date of the office file, each of the sub-databases is used for storing the office file with the same completion date, the step of obtaining the file completion time of the office file generated by the office, and determining the target sub-database for storing the office file from among the plurality of sub-databases according to the file completion time of the office file includes:
acquiring the preservation time of the office file after the office file is input with the password for encryption, and determining the preservation time as the file completion time;
determining the current completion date of the office file according to the file completion time, and determining a target sub-database of the office file for storing the current completion date from the plurality of sub-databases according to the current completion date of the office file.
Further, in the office file encryption storage method, the step of determining the file name, the file type and the byte number of the office file respectively, and determining the encryption chain of the office file according to the sequence consisting of the file name, the file type and the byte number includes:
respectively determining the spelling letters of the file names of the office files, the extension letters of the file types and the byte numbers;
and sequentially sequencing the pinyin letters of the file names, the extension letters of the file types and the byte numbers to form a sequence, so as to obtain the encryption chain of the office file.
Further, the office file encryption storage method, wherein the step of determining the pinyin letters of the file name, the extension letters of the file type and the byte number of the office file respectively includes:
extracting the first letter of each character in the file name of the office file, and sequentially arranging and determining the first letters of a plurality of characters as the pinyin letters of the file name.
Further, in the office file encryption storage method, the step of obtaining the random number of the number required by the password for encryption currently input by the user, copying corresponding chain bits from the encryption chain according to the random number, and taking the chain formed by the chain bits as the front encryption chain of the office file comprises the steps of:
acquiring a random number generation function, setting a random seed, and generating a random number by using the random number generation function;
and generating random numbers by sequentially utilizing the random number generation function so as to generate random numbers with the number required by the password of the user.
Further, in the office file encryption storage method, the step of determining a target encryption chain of the office file according to the pre-encryption chain and the encryption chain and encrypting and storing the office file into the target sub-database according to the target encryption chain includes:
dividing the encryption chain into different sub-encryption chains according to a preset rule, sequentially extracting encryption elements from the sub-encryption chains, and obtaining a target encryption chain of the office file according to the encryption elements and the pre-encryption chain.
Further, the office file encryption storage method further comprises the following steps:
dividing the encryption chain according to the number required by the passwords for encryption to obtain a plurality of sub-encryption chains with the same length as the number required by the passwords for encryption;
determining the file storage quantity in the target sub-database, and determining the group number of the random numbers for copying the chain bits in a preset mapping table according to the file storage quantity;
and respectively carrying out random copying in the sub encryption chain according to the group number of the random number to obtain the pre-encryption chain.
Another object of the present invention is to provide an office file encryption storage system for encrypting and storing an office file of a user into a preset file database, the preset file database including a plurality of sub-databases divided according to time attributes of the office file, wherein the system includes:
the acquisition module is used for acquiring the file completion time of the office file generated by the office, and determining a target sub-database for storing the office file from the plurality of sub-databases according to the file completion time of the office file;
the determining module is used for respectively determining the file name, the file type and the byte number of the office file and determining an encryption chain of the office file according to a sequence formed by the file name, the file type and the byte number;
the copying module is used for obtaining random numbers of the number required by the passwords which are input by the user currently and used for encryption, copying corresponding chain bits from the encryption chains respectively according to the random numbers, and taking a chain formed by the chain bits as a front encryption chain of the office file;
and the encryption module is used for determining a target encryption chain of the office file according to the pre-encryption chain and the encryption chain, and encrypting and storing the office file into the target sub-database according to the target encryption chain.
Another object of the present invention is to provide a readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor realizes the steps of the method according to any of the above.
Another object of the invention is to provide an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, said processor implementing the steps of the method described above when executing said program.
The method divides the database into a plurality of sub-databases according to time data, obtains the encryption chain of the encrypted file according to the characteristic of the file such as the file name, the file type, the byte number and the like of the file, determines the front encryption chain from the encryption chain in a random number mode, thereby determining the final target encryption chain, determining the target sub-databases according to the completion time of the office file, encrypting the file according to the obtained target encryption chain, avoiding the risk of being broken by the known chain attack or probability attack, and solving the problem of low file storage security in the prior art.
Drawings
FIG. 1 is a flowchart of an office file encryption storage method according to a first embodiment of the present invention;
fig. 2 is a block diagram showing the structure of an office file encryption storage system according to a third embodiment of the present invention.
The invention will be further described in the following detailed description in conjunction with the above-described figures.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Several embodiments of the invention are presented in the figures. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "mounted" on another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like are used herein for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed types.
How to improve the storage security of office files will be described in detail below with reference to specific embodiments and drawings.
Example 1
Referring to fig. 1, an office file encryption storage method according to a first embodiment of the present invention is used for encrypting and storing an office file of a user into a preset file database, wherein the preset file database includes a plurality of sub-databases divided according to time attributes of the office file, and the method includes steps S10 to S13.
Step S10, acquiring the file completion time of the office file generated by the office, and determining a target sub-database for storing the office file from the plurality of sub-databases according to the file completion time of the office file.
The preset file database for storing office files is divided into a plurality of sub-databases, data management is facilitated, and a target sub-database for storing office files is determined from the plurality of sub-databases according to file completion time.
Further, in some optional embodiments of the present invention, the preset file database includes a plurality of sub-databases divided according to the completion date of the office file, each of the sub-databases is used for storing the office file with the same completion date, the step of obtaining the file completion time of the office file generated by the office, and determining the target sub-database for storing the office file from among the plurality of sub-databases according to the file completion time of the office file includes:
acquiring the preservation time of the office file after the office file is input with the password for encryption, and determining the preservation time as the file completion time;
determining the current completion date of the office file according to the file completion time, and determining a target sub-database of the office file for storing the current completion date from the plurality of sub-databases according to the current completion date of the office file.
When the user performs the final file saving, that is, the file is the file that needs to be saved finally, the saved date is determined, for example, when the current saving time is 2023, 5, 20 days, the saved date is 20 days, and the files saved on 20 days are uniformly stored in the target sub-databases corresponding to 20 days.
Step S11, determining the file name, the file type and the byte number of the office file respectively, and determining an encryption chain of the office file according to a sequence formed by the file name, the file type and the byte number.
Specifically, each office file has a file name, a file type and a byte number, for example, when the file to be stored is a Word file of a file encryption method, the corresponding file name is a file encryption method, the file type is doc, the byte number is the byte number of the file, for example 31,667 bytes, the byte number is 31667, and the corresponding sequence should be file encryption method+doc+ 31667.
Specifically, the pinyin letters of the file names of the office files, the extension letters of the file types and the byte numbers are respectively determined;
and sequentially sequencing the spelling letters of the file names, the extension letters of the file types and the byte numbers to form a sequence to obtain the encryption chain of the office file.
The file name is represented by a pinyin letter, and specifically, a sequence consisting of the pinyin letter of the file name, an extension letter of the file type and the number of bytes is wenjianjiamamifangfac 31667, namely an encryption chain.
In addition, in some alternative embodiments of the present invention, the first letter of each character in the file name of the office file is also extracted, and the first letters of the plurality of characters are sequentially arranged to be determined as pinyin letters of the file name, for example, the encryption chain with the sequence of wenjiajiamifagfac 31667 may also be wjjmffdoc31667.
Step S12, obtaining the random numbers of the numbers needed by the passwords which are input by the users currently and used for encryption, copying corresponding chain bits from the encryption chains respectively according to the random numbers, and taking the chains formed by the chain bits as the front encryption chains of the office files.
Specifically, when the secure storage is performed, the system may send a password input or confirm a prompt interface to allow the user to input the password, further encrypt the file storage, or determine whether the user needs to encrypt the file through the password input interface, where the number of random numbers required by the password is the number of random numbers input by the user, for example, when the password input by the user is 123456, the random numbers should be six random numbers, for example, 2, 6, 3, 5, 7, and 1, and copy the corresponding chain bits from the encrypted chain according to the random numbers, that is, copy the corresponding chain bits in the second chain bit, the sixth chain bit, and the third chain bit … … in the encrypted chain, that is, e, a, n … …, respectively, and use the formed chain as the pre-encrypted chain, that is, eaniw.
Further, the step of randomly generating the random number of the number required by the password of the user includes:
acquiring a random number generation function, setting a random seed, and generating a random number by using the random number generation function;
and generating random numbers by sequentially utilizing the random number generation function so as to generate random numbers with the number required by the password of the user.
Wherein, a random seed can be set, a random number is generated by using a random generation function so as to ensure the randomness of the random number, the random is sequentially carried out, and the random number with the number required by the user password is obtained after the corresponding number generated randomly.
And step S13, determining a target encryption chain of the office file according to the pre-encryption chain and the encryption chain, and encrypting and storing the office file into the target sub-database according to the target encryption chain.
Specifically, the encryption chain is wenjiajiamifangfac 31667, the front encryption chain is eaniw, so that the finally obtained target encryption chain is eaniw-wenjiajiamifangfac 31667, further, as the sequence values in the encryption chain are all determined by the characteristics of the file, the uniqueness of file encryption is ensured, and in order to further improve the security of file encryption, the hash value obtained by hash operation of the encryption chain can be combined with the front encryption chain to obtain the target encryption chain.
In summary, according to the office file encryption storage method in the embodiment of the invention, the database is divided into a plurality of sub-databases according to time data, the encryption chain of the encrypted file is obtained according to the specific characteristics of the file such as the file name, the file type and the byte number of the file, and the front encryption chain is determined from the encryption chain in a random number mode, so that the final target encryption chain is determined, the target sub-databases are determined according to the completion time of the office file, the file is encrypted according to the obtained target encryption chain, the risk of being broken by the known chain attack or probability attack is avoided, and the problem of low file storage security in the prior art is solved.
Example two
The embodiment of the invention also provides an office file encryption storage method which is substantially the same as the office file encryption storage method provided by the embodiment of the invention, and is different from the office file encryption storage method provided by the embodiment of the invention in that:
the step S13 includes:
dividing the encryption chain into different sub-encryption chains according to a preset rule, sequentially extracting encryption elements from the sub-encryption chains, and obtaining a target encryption chain of the office file according to the encryption elements and the pre-encryption chain.
Specifically, the encryption chain is divided into different sub-encryption chains, encryption elements are extracted from the sub-encryption chains, and a target sub-database is obtained according to the encryption elements and the pre-encryption chain.
Further, in some optional embodiments of the present invention, the method further comprises:
dividing the encryption chain according to the number required by the passwords for encryption to obtain a plurality of sub-encryption chains with the same length as the number required by the passwords for encryption;
determining the file storage quantity in the target sub-database, and determining the group number of the random numbers for copying the chain bits in a preset mapping table according to the file storage quantity;
and respectively carrying out random copying in the sub encryption chain according to the group number of the random number to obtain the pre-encryption chain.
In order to further improve the security of file encryption and storage, the pre-encryption chain is dynamically adjusted, so that the encryption effect is further deepened, for example, when the number of files is large, the length of the pre-encryption chain is properly increased, specifically, after the encryption length of the pre-encryption chain is determined, the number of groups and the range of random numbers are correspondingly increased on the basis of user input, and corresponding chain bits are copied according to the random numbers, so that a plurality of elements are extracted from the encryption chain as much as possible, and the length of the pre-encryption chain is increased.
In summary, according to the office file encryption storage method in the embodiment of the invention, the database is divided into a plurality of sub-databases according to time data, the encryption chain of the encrypted file is obtained according to the specific characteristics of the file such as the file name, the file type and the byte number of the file, and the front encryption chain is determined from the encryption chain in a random number mode, so that the final target encryption chain is determined, the target sub-databases are determined according to the completion time of the office file, the file is encrypted according to the obtained target encryption chain, the risk of being broken by the known chain attack or probability attack is avoided, and the problem of low file storage security in the prior art is solved.
Example III
Referring to fig. 2, an office file encryption storage system according to a third embodiment of the present invention is shown, the system includes:
an obtaining module 100, configured to obtain a file completion time of an office file generated by an office, and determine a target sub-database for storing the office file from the plurality of sub-databases according to the file completion time of the office file;
a determining module 200, configured to determine a file name, a file type, and a byte number of the office file, and determine an encryption chain of the office file according to a sequence formed by the file name, the file type, and the byte number;
the copying module 300 is configured to obtain a random number of a number required by a password for encryption currently input by the user, copy corresponding chain bits from the encrypted chain according to the random number, and use a chain formed by the chain bits as a pre-encrypted chain of the office file;
and the encryption module 400 is used for determining a target encryption chain of the office file according to the pre-encryption chain and the encryption chain, and encrypting and storing the office file into the target sub-database according to the target encryption chain.
Further, in some optional embodiments of the present invention, the preset file database includes a plurality of sub-databases divided according to the completion date of the office file, each of the sub-databases is used for storing the office file with the same completion date, and the obtaining module further includes:
the acquisition unit is used for acquiring the save time of the office file after the office file is input with the password for encryption, and determining the save time as the file completion time;
the searching unit is used for determining the current completion date of the office file according to the file completion time, and determining a target sub-database of the office file for storing the current completion date from the plurality of sub-databases according to the current completion date of the office file.
Further, in some optional embodiments of the present invention, the determining module includes:
a determining unit, configured to determine pinyin letters of a file name of the office file, extension letters of a file type, and a byte number, respectively;
and the ordering unit is used for sequentially ordering the spelling letters of the file names, the extension letters of the file types and the byte numbers to form a sequence to obtain the encryption chain of the office file.
Further, in some optional embodiments of the present invention, the sorting unit is specifically configured to:
extracting the first letter of each character in the file name of the office file, and sequentially arranging and determining the first letters of a plurality of characters as the pinyin letters of the file name.
Further, in some optional embodiments of the present invention, the replication module includes:
the setting unit is used for acquiring a random number generation function, setting a random seed and generating a random number by utilizing the random number generation function;
and the generation unit is used for sequentially generating random numbers by utilizing the random number generation function so as to generate the random numbers with the number required by the password of the user.
Further, in some optional embodiments of the present invention, the encryption module includes:
the extraction unit is used for dividing the encryption chain into different sub-encryption chains according to a preset rule, sequentially extracting encryption elements from the sub-encryption chains, and obtaining the target encryption chain of the office file according to the encryption elements and the pre-encryption chain respectively.
Further, in some optional embodiments of the present invention, the system further comprises:
the dividing module is used for dividing the encryption chains according to the number required by the passwords used for encryption to obtain a plurality of sub-encryption chains with the same length as the number required by the passwords used for encryption;
determining the file storage quantity in the target sub-database, and determining the group number of the random numbers for copying the chain bits in a preset mapping table according to the file storage quantity;
and respectively carrying out random copying in the sub encryption chain according to the group number of the random number to obtain the pre-encryption chain.
The functions or operation steps implemented when the above modules are executed are substantially the same as those in the above method embodiments, and are not described herein again.
In summary, in the office file encryption storage system in the above embodiment of the present invention, basic information of a user is obtained, and motionless information is extracted from the basic information, so as to determine a basic salination factor according to the motionless information; encrypting the basic salifying factor by using a preset algorithm to form a secret key factor, and carrying out mixed encryption on the secret key factor and a user password by using the preset algorithm to form a preliminary ciphertext; the secret key factor and the preliminary ciphertext are subjected to exclusive OR operation to obtain an intermediate ciphertext, a random number of the number required by the user password is randomly generated and spliced and mixed with the intermediate ciphertext to form a final user ciphertext, a one-user one-salifying factor strategy is adopted, the salifying factor is also subjected to secondary encryption, the encrypted ciphertext is subjected to secondary confusion, the fixed salifying factor is avoided, in addition, the dynamic salifying factor and the secondary confusion mode are adopted, the encryption degree of the password is enhanced, the password cracking difficulty is increased, and the problem that the password encryption mode in the prior art is low in safety is solved.
Example IV
Another aspect of the present invention also provides a readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method described in the first embodiment above.
Example five
In another aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method according to any of the above embodiments when the program is executed.
The technical features of the above embodiments may be arbitrarily combined, and for brevity, all of the possible combinations of the technical features of the above embodiments are not described, however, they should be considered as the scope of the description of the present specification as long as there is no contradiction between the combinations of the technical features.
Those of skill in the art will appreciate that the logic and/or steps represented in the flow diagrams or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (10)

1. An office file encryption storage method, which is used for encrypting and storing an office file of a user into a preset file database, wherein the preset file database comprises a plurality of sub-databases divided according to time attributes of the office file, and the method comprises the following steps:
acquiring the file completion time of an office file generated by an office, and determining a target sub-database for storing the office file from the plurality of sub-databases according to the file completion time of the office file;
determining the file name, the file type and the byte number of the office file respectively, and determining an encryption chain of the office file according to a sequence consisting of the file name, the file type and the byte number;
acquiring random numbers of the number required by the current passwords input by the user and used for encryption, copying corresponding chain bits from the encryption chain according to the random numbers, and taking a chain formed by the chain bits as a preposed encryption chain of the office file;
and determining a target encryption chain of the office file according to the pre-encryption chain and the encryption chain, and encrypting and storing the office file into the target sub-database according to the target encryption chain.
2. The office file encryption storage method according to claim 1, wherein the preset file database includes a plurality of sub-databases divided according to the completion date of the office file, each of the sub-databases is used for storing the office file with the same completion date, the step of acquiring the file completion time of the office file generated by the office, and determining a target sub-database for storing the office file from among the plurality of sub-databases according to the file completion time of the office file includes:
acquiring the preservation time of the office file after the office file is input with the password for encryption, and determining the preservation time as the file completion time;
determining the current completion date of the office file according to the file completion time, and determining a target sub-database of the office file for storing the current completion date from the plurality of sub-databases according to the current completion date of the office file.
3. The office file encryption storage method according to claim 1, wherein the step of determining the file name, the file type, and the number of bytes of the office file, respectively, and determining the encryption chain of the office file according to the sequence of the file name, the file type, and the number of bytes comprises:
respectively determining the spelling letters of the file names of the office files, the extension letters of the file types and the byte numbers;
and sequentially sequencing the pinyin letters of the file names, the extension letters of the file types and the byte numbers to form a sequence, so as to obtain the encryption chain of the office file.
4. The office file encryption storage method of claim 3, wherein the step of determining pinyin letters of a file name, extension letters of a file type, and byte numbers of the office file, respectively, comprises:
extracting the first letter of each character in the file name of the office file, and sequentially arranging and determining the first letters of a plurality of characters as the pinyin letters of the file name.
5. The office file encryption storage method according to claim 1, wherein the step of acquiring a random number of a number required by a password currently input by the user for encryption, and copying corresponding chain bits from the encryption chain according to the random number, respectively, and taking a chain composed of the chain bits as a pre-encryption chain of the office file comprises:
acquiring a random number generation function, setting a random seed, and generating a random number by using the random number generation function;
and generating random numbers by sequentially utilizing the random number generation function so as to generate random numbers with the number required by the password of the user.
6. The office file encryption storage method according to claim 1, wherein the steps of determining a target encryption chain of the office file according to the pre-encryption chain and the encryption chain, and encrypting and storing the office file into the target sub-database according to the target encryption chain include:
dividing the encryption chain into different sub-encryption chains according to a preset rule, sequentially extracting encryption elements from the sub-encryption chains, and obtaining a target encryption chain of the office file according to the encryption elements and the pre-encryption chain.
7. The office file encryption storage method according to any one of claims 1 to 6, characterized in that the method further comprises:
dividing the encryption chain according to the number required by the passwords for encryption to obtain a plurality of sub-encryption chains with the same length as the number required by the passwords for encryption;
determining the file storage quantity in the target sub-database, and determining the group number of the random numbers for copying the chain bits in a preset mapping table according to the file storage quantity;
and respectively carrying out random copying in the sub encryption chain according to the group number of the random number to obtain the pre-encryption chain.
8. An office file encryption storage system for encrypting and storing a user's office file into a preset file database, the preset file database comprising a plurality of sub-databases divided according to time attributes of the office file, the system comprising:
the acquisition module is used for acquiring the file completion time of the office file generated by the office, and determining a target sub-database for storing the office file from the plurality of sub-databases according to the file completion time of the office file;
the determining module is used for respectively determining the file name, the file type and the byte number of the office file and determining an encryption chain of the office file according to a sequence formed by the file name, the file type and the byte number;
the copying module is used for obtaining random numbers of the number required by the passwords which are input by the user currently and used for encryption, copying corresponding chain bits from the encryption chains respectively according to the random numbers, and taking a chain formed by the chain bits as a front encryption chain of the office file;
and the encryption module is used for determining a target encryption chain of the office file according to the pre-encryption chain and the encryption chain, and encrypting and storing the office file into the target sub-database according to the target encryption chain.
9. A readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method according to any one of claims 1 to 7 when the program is executed.
CN202311255945.3A 2023-09-27 2023-09-27 Office file encryption storage method, system, storage medium and electronic equipment Active CN116992495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311255945.3A CN116992495B (en) 2023-09-27 2023-09-27 Office file encryption storage method, system, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311255945.3A CN116992495B (en) 2023-09-27 2023-09-27 Office file encryption storage method, system, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN116992495A true CN116992495A (en) 2023-11-03
CN116992495B CN116992495B (en) 2024-02-27

Family

ID=88523595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311255945.3A Active CN116992495B (en) 2023-09-27 2023-09-27 Office file encryption storage method, system, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116992495B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109543443A (en) * 2018-10-17 2019-03-29 平安科技(深圳)有限公司 User data management, device, equipment and storage medium based on block chain
AU2020202482A1 (en) * 2019-04-09 2020-10-29 Mark Rodney Anson A computer system implemented method for generating a symmetric encryption key for encrypting and decrypting secure data
CN115955307A (en) * 2023-03-10 2023-04-11 江西曼荼罗软件有限公司 User password salt adding protection method and device, readable storage medium and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109543443A (en) * 2018-10-17 2019-03-29 平安科技(深圳)有限公司 User data management, device, equipment and storage medium based on block chain
AU2020202482A1 (en) * 2019-04-09 2020-10-29 Mark Rodney Anson A computer system implemented method for generating a symmetric encryption key for encrypting and decrypting secure data
CN115955307A (en) * 2023-03-10 2023-04-11 江西曼荼罗软件有限公司 User password salt adding protection method and device, readable storage medium and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HUANG, YL等: "A True Random-Number Encryption Method Employing Block Cipher and PRNG", 《COMPUTER SCIENCE AND INFORMATION SYSTEMS》 *
钱镜洁;林艺滨;陈江勇;: "EFS离线解密方法及其取证应用", 信息网络安全, no. 08 *

Also Published As

Publication number Publication date
CN116992495B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
US10778441B2 (en) Redactable document signatures
US11232216B1 (en) Systems and methods for generation of secure indexes for cryptographically-secure queries
US10089487B2 (en) Masking query data access pattern in encrypted data
US9852306B2 (en) Conjunctive search in encrypted data
US7890774B2 (en) System and method for fast querying of encrypted databases
DE69815599T2 (en) Method and device for protecting application data in secure memory areas
CN106610995B (en) Method, device and system for creating ciphertext index
CN107609418A (en) Desensitization method, device, storage device and the computer equipment of text data
US7152693B2 (en) Password security utility
CN115955307B (en) User password salification protection method and device, readable storage medium and electronic equipment
CN109977684A (en) A kind of data transmission method, device and terminal device
CN108829899B (en) Data table storage, modification, query and statistical method
EP2511848A2 (en) Multiple independent encryption domains
CN103607420A (en) Safe electronic medical system for cloud storage
US20090067624A1 (en) System and method of protecting content of an electronic file using a computer
CN116992495B (en) Office file encryption storage method, system, storage medium and electronic equipment
Vershinin et al. Associative steganography of text messages
EP3502947B1 (en) Method, computer program product and processing system for generating secure alternative representation
US20220286271A1 (en) Registration device, search operation device, and data management device
EP2037390A1 (en) System and method of protecting content of an electronic file for sending and receiving
US12045364B1 (en) Mathematical method for performing homomorphic operations
US11669601B2 (en) Digital watermarking for textual data
EP2037391A1 (en) A portable electronic file protection system
US20230056885A1 (en) Real-time dynamic blockchain securitization platform
US20130036474A1 (en) Method and Apparatus for Secure Data Representation Allowing Efficient Collection, Search and Retrieval

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