A file encryption apparatus
By using a matrix transformation algorithm in the file encryption device, the problems of high computational load and high cost of existing encryption devices are solved, providing a low-computation, low-latency, and low-cost encryption solution suitable for electronic data protection in daily life.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHONGKE FANYU (WUHAN) TECH CO LTD
- Filing Date
- 2022-04-20
- Publication Date
- 2026-05-05
AI Technical Summary
Existing encryption devices are computationally intensive, expensive, and complex to use. Low-cost encryption devices do not disclose their algorithms, raising concerns about their reliability and verifiability.
It employs a file input pool, formatter, matrix multiplier, inverse matrix generator, output pool, user password manager, encryption matrix generator, general DES encryptor and decryptor, and performs data encryption and decryption through matrix transformation algorithms, generating invertible integer matrices for encryption, thereby reducing computational load and cost.
It achieves a low computational load, low latency, and low cost encryption scheme, which is very expensive to crack. It is suitable for electronic data protection in daily life and is applicable to 8-bit, 16-bit, and 32-bit SOC systems, reducing the cost of using professional encryption hardware and software.
Smart Images

Figure CN115374468B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data encryption or data conversion technology, and in particular to a file encryption device. Background Technology
[0002] With the advancement of science and technology, humanity has entered the digital age. Sensor data, personal or private data, information, and documents are stored through common electronic media, posing a significant challenge to the protection of human privacy.
[0003] When electronic data files are stored in plaintext on electronic media, they pose a significant security risk. Encrypting these electronic data files using a method that is appropriately complex, low-cost, computationally efficient, and convenient is a feasible and practical solution.
[0004] Existing professional encryption devices are computationally intensive, expensive, and complex to use; while inexpensive encryption devices or programs generally do not disclose their encryption algorithms, raising significant concerns among users regarding their reliability and algorithm verifiability. Summary of the Invention
[0005] In view of the shortcomings of the prior art and the actual needs of users, the purpose of this invention is to provide a file encryption device to solve the problems existing in the prior art and meet the actual needs of users.
[0006] To achieve the above and other related objectives, the present invention provides a file encryption device, comprising:
[0007] File input pool, file formatter, matrix multiplier, inverse matrix generator, file output pool, user password manager, encryption matrix generator, general DES encryptor, encryption matrix array module, and general DES decryptor;
[0008] The file input pool is used to receive user data files;
[0009] The file formatter is used to extract user file format, file information and file data. The file data is read sequentially in byte stream mode and the file data byte stream is divided into several matrix data blocks in the form of N rows * N columns. When the number of bytes at the end of the file data byte stream is less than N*N data, it is filled with data "0". The file formatter is connected to the file input pool, where N is the matrix dimension set by the user in the user password manager, ranging from 64 to 4096.
[0010] The matrix multiplier is used to calculate the product of the matrix data block and the encrypted matrix array;
[0011] The inverse matrix is used to find the inverse of the matrix in the encryption matrix array module;
[0012] The file output pool is used to store the encrypted files and file format information;
[0013] The user password manager is used for users to set passwords, enter passwords, modify passwords, delete passwords, and set the dimensions of the matrix in the encryption matrix array module;
[0014] The encryption matrix generator randomly generates an N-row * N-column invertible integer matrix based on the user-input password sequence.
[0015] The encryption matrix array module is used to store matrix data encrypted by the DES encryptor.
[0016] The general-purpose DES encryptor is used to encrypt the encryption matrix array module;
[0017] The general-purpose DES decryptor and the general-purpose DES encryptor are inverse operations of each other, and are used to decrypt the encryption matrix array module.
[0018] Optionally, the user password manager is connected to the encryption matrix array module and the encryption matrix generator, and is located at the top layer of the file encryption device.
[0019] Optionally, the encryption matrix generator is connected to the encryption matrix array module and is located in the next layer below the user password manager;
[0020] Optionally, the general-purpose DES cipher is connected upwards to the encryption matrix generator;
[0021] Optionally, the encryption matrix array module is connected upward to the general-purpose DES encryptor and stores the output data of the general-purpose DES encryptor in the array;
[0022] Optionally, the file input pool is used for user input or selection of data files to be encrypted and is connected to the file formatter;
[0023] Optionally, the file formatter is used to extract the user file format, is connected to the matrix multiplier, and is located in the next layer of the file input pool;
[0024] Optionally, the matrix multiplier is an N*N integer matrix multiplier, located at the next level of the file formatter;
[0025] Optionally, the inverse matrix operator is an N*N integer matrix inverse operator, connected to the matrix multiplier, and located in the next layer below the matrix multiplier.
[0026] Optionally, a file encryption device may be a microcontroller system device running this algorithm, an executable file, or a system service program;
[0027] As described above, the present invention can meet the needs of people's daily electronic data for low security and large data volume, avoid the use of expensive professional data encryption hardware or software, and avoid low-cost data cracking; it provides an encryption device based on matrix transformation algorithm with low computational load, low latency, and low cost. Attached Figure Description
[0028] Figure 1 A schematic diagram of a file encryption device system architecture is provided in one embodiment;
[0029] Figure 2 This is a schematic diagram of the encryption / decryption file selection input / output interface of a file encryption device according to one embodiment;
[0030] Figure 3 This is a schematic diagram of the password setting and dimension setting interface of a file encryption device provided in one embodiment.
[0031] Figure 4 This is a schematic diagram of the constituent modules of a file encryption device provided in one embodiment. Detailed Implementation
[0032] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0033] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0034] Please see Figure 1 and Figure 4 As shown, the present invention provides a file encryption device, comprising:
[0035] File input pool, file formatter, matrix multiplier, inverse matrix generator, file output pool, user password manager, encryption matrix generator, general DES encryptor, encryption matrix array, and general DES decryptor;
[0036] The file input pool is used to receive user data files;
[0037] The file formatter is used to extract user file format, file information and file data. The file data is read sequentially in byte stream mode and the file data byte stream is divided into several matrix data blocks in the form of N rows * N columns. When the number of bytes at the end of the file data byte stream is less than N*N data, it is filled with data "0". The file formatter is connected to the file input pool, where N is the matrix dimension set by the user in the user password manager, ranging from 64 to 4096.
[0038] The matrix multiplier is used to calculate the product of the matrix data block and the encrypted matrix array;
[0039] The inverse matrix generator is used to find the inverse matrix of the encrypted matrix array;
[0040] The file output pool is used to store the encrypted files and file format information;
[0041] The user password manager is used for users to set passwords, enter passwords, modify passwords, delete passwords, and set the dimensions of the encryption matrix array;
[0042] The encryption matrix generator randomly generates an N-row * N-column invertible integer matrix based on the user-input password sequence.
[0043] The encryption matrix array is used to store matrix data encrypted by the DES encryptor;
[0044] The general-purpose DES encryptor is used to encrypt the encryption matrix array;
[0045] The general-purpose DES decryptor and the general-purpose DES encryptor are inverse operations of each other, and are used to decrypt the encryption matrix array.
[0046] In one exemplary embodiment, the user password manager is located at the top layer of the file encryption device; the encryption matrix generator is located at the next layer below the user password manager; the general DES encryptor is connected upwards to the encryption matrix generator; the encryption matrix array is connected upwards to the general DES encryptor and stores the output data of the general DES encryptor in the array; the file input pool is used for user input or selection of data files to be encrypted; the file formatter is used to extract user file formats and is located at the next layer below the file input pool; the matrix multiplier is an N*N integer matrix multiplier and is located at the next layer below the file formatter; the inverse matrix is an N*N integer matrix inverse matrix operator and is located at the next layer below the matrix multiplier.
[0047] In the encryption phase, the general-purpose DES decryptor retrieves the encryption matrix from the encryption matrix array, decrypts it, and outputs it to the matrix multiplier. The matrix multiplier then extracts data from the data stream output by the file formatter according to the matrix dimensions output by the general-purpose DES decryptor and performs matrix multiplication. The resulting matrix data is the encrypted data, which is output to the file output pool for storage. According to mathematical principles, the difficulty for a cracker to decrypt data without knowing the operation matrix is geometrically proportional to the size of the encryption matrix's dimensions. In the decryption phase, the general-purpose DES decryptor retrieves the encryption matrix from the encryption matrix array, decrypts it, and outputs it to the matrix multiplier. The matrix multiplier activates the inverse matrix unit, performs an inverse operation on the encryption matrix, and then extracts data from the data stream output by the file formatter according to the matrix dimensions output by the inverse matrix unit and performs matrix multiplication. The resulting matrix data is the decrypted data, which is output to the file output pool to return the original data file to the user.
[0048] Therefore, this embodiment addresses the needs of people's daily electronic data in terms of low security and large data volume, avoiding the use of expensive professional data encryption hardware or software and preventing low-cost data cracking. It provides a low-computation, low-latency, and low-cost encryption device based on matrix transformation algorithms. By cleverly integrating matrix multiplication into data encryption through matrix operation principles, the computational load for encryption and decryption is geometrically reduced, while the computational load for cracking is geometrically multiple, making cracking costly. Thus, this embodiment overcomes the shortcomings of existing technologies and achieves the effect of protecting people's daily electronic data. Furthermore, this extremely low-computation data file encryption scheme can be implemented in 8-bit, 16-bit, and 32-bit SOC systems, enabling the design or manufacture of low-cost file encryption devices and accelerating the popularization of such devices.
[0049] like Figure 2 As shown, in another exemplary embodiment, the apparatus of the present invention is an executable file or system service program written in C++ and compiled by Microsoft Visual Studio in the WINDOWS operating system; the executable file or system service program includes: a file input pool module, a file formatter module, a matrix multiplier module, an inverse matrix module, a file output pool module, a user password manager module, an encryption matrix generator module, a general DES encryptor module, an encryption matrix array module, and a general DES decryptor module.
[0050] In this embodiment, the file input pool module is used to receive the raw data file input by the user. Specifically, it is a file selection dialog program in the Windows operating system. The returned parameters include the file name, path, and encryption or decryption options selected by the user. Logically, it is located at the top level of the software system. The file formatter module receives return parameters from the file input pool module and reads the file name and content, then streams the file content. The matrix multiplier module performs encryption or decryption operations in two paths based on the parameters passed by the file formatter module. When the file formatter module performs an encryption operation, the matrix multiplier module directly obtains the encryption matrix from the inverse matrix module and performs multiplication operations on blocks according to the encryption matrix dimension of the data stream from the file formatter module. The data after multiplication is the encrypted data. When the file formatter module performs a decryption operation, the matrix multiplier module activates the inverse matrix module to obtain the inverse matrix of the encryption matrix and performs multiplication operations on blocks according to the encryption matrix dimension of the data stream from the file formatter module. The data after multiplication is the decrypted data. When the last frame of the file stream data is smaller than the encryption matrix dimension, the matrix multiplier module fills the matrix with zeros to satisfy the operation. When the file stream reaches the end marker, the encryption and decryption operations are completed, and the matrix multiplier module outputs the data to the file output pool module. The file output pool module outputs encrypted or decrypted files according to the file structure information recorded in the received data stream. At this point, the encryption or decryption operation is complete.
[0051] like Figure 3 As shown, in the user key initialization configuration stage of a specific embodiment, the user password manager module is used by the user to set encryption and decryption keys. In this embodiment, it is specifically a text input dialog program in the Windows operating system. The program returns parameters containing the key string input by the user and is logically located at the top level of the system initialization configuration. After the user inputs the encryption key, the user password manager module returns the key string and calls the encryption matrix generator module. The encryption matrix generator module generates an N*N encryption matrix based on the key string input by the user. The dimension of the encryption matrix can be set in the user password manager module. According to the mathematical principle of matrix operations, when the dimension N of the encryption matrix is larger, the amount of computation for cracking increases geometrically, while the amount of computation for encryption and decryption does not change geometrically. After the encryption matrix generator module completes the generation of the encryption matrix according to the user initialization configuration, the encryption matrix generator module calls the general DES encryptor module to encrypt the encryption matrix and save it. At this point, the user key initialization configuration process is completed.
[0052] In summary, to meet the needs of people's daily electronic data characterized by low security and large data volume, and to avoid the use of expensive professional data encryption hardware or software, thus preventing low-cost data cracking, this invention provides a low-computation, low-latency, and low-cost encryption device based on matrix transformation algorithms. It cleverly integrates matrix multiplication with data encryption through matrix operation principles, geometrically reducing the computational load for encryption and decryption, while the computational load for cracking is geometrically multiple of that for encryption and decryption, making cracking costly and prohibitively expensive. Therefore, this embodiment overcomes the shortcomings of existing technologies and achieves the effect of protecting people's electronic data in daily life. In the user initialization configuration process of this embodiment, the matrix dimension N is crucial in determining the computational load for cracking. It is emphasized again that the encryption matrix dimension N has a significant impact; achieving a cracking operation with extremely low computational load has significant practical implications.
[0053] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A file encryption device, characterized in that, It includes: file input pool, file formatter, matrix multiplier, inverse matrix unit, file output pool, user password manager, encryption matrix generator, general DES encryptor, encryption matrix array module and general DES decryptor; The file input pool is used to receive user data files; The file formatter is used to extract user file format, file information and file data. The file data is read sequentially in byte stream mode and the file data byte stream is divided into several matrix data blocks in the form of N rows * N columns. When the number of bytes at the end of the file data byte stream is less than N*N data, it is filled with data "0". The file formatter is connected to the file input pool, where N is the matrix dimension set by the user in the user password manager, ranging from 64 to 4096. The matrix multiplier is used to calculate the product of the matrix data block and the encrypted matrix array; The inverse matrix is used to find the inverse of the matrix in the encryption matrix array module; The file output pool is used to store the encrypted files and file format information; The user password manager is used for users to set passwords, enter passwords, modify passwords, delete passwords, and set the dimensions of the matrix in the encryption matrix array module; The encryption matrix generator randomly generates an N-row * N-column invertible integer matrix based on the user-input password sequence. The encryption matrix array module is used to store matrix data encrypted by the DES encryptor. The general-purpose DES encryptor is used to encrypt the encryption matrix array module; The general-purpose DES decryptor and the general-purpose DES encryptor are inverse operations of each other, and are used to decrypt the encryption matrix array module.
2. The file encryption device according to claim 1, characterized in that, The user password manager is connected to the encryption matrix array module and the encryption matrix generator, and is located at the top layer of the file encryption device.
3. The file encryption device according to claim 1, characterized in that, The encryption matrix generator is connected to the encryption matrix array module and is located in the layer below the user password manager.
4. The file encryption device according to claim 1, characterized in that, The general-purpose DES cipher is connected upwards to the encryption matrix generator.
5. A file encryption device according to claim 1, characterized in that, The encryption matrix array module is connected upwards to the general-purpose DES encryptor and stores the output data of the general-purpose DES encryptor into the array.
6. A file encryption device according to claim 1, characterized in that, In the encryption process, the general-purpose DES decryptor extracts the encryption matrix from the encryption matrix array, decrypts it, and outputs it to the matrix multiplier. The matrix multiplier then extracts data from the data stream output by the file formatter according to the matrix dimension output by the general-purpose DES decryptor and performs matrix multiplication. The matrix data after multiplication is then output to the file output pool for storage.
7. A file encryption device according to claim 1, characterized in that, In the decryption process, the general-purpose DES decryptor retrieves the encryption matrix from the encryption matrix array module, decrypts it, and outputs it to the matrix multiplier. The matrix multiplier activates the inverse matrix, performs an inverse operation on the encryption matrix, extracts data from the data stream output by the file formatter according to the matrix dimension output by the inverse matrix, performs matrix multiplication, outputs the multiplied matrix data to the file output pool, and returns the original data file to the user.
Citation Information
Patent Citations
Enciphering device, decoding device, methods for the sames and recording medium
JP2001358709A
Data encoding method
US20100086132A1