Search

CN-115374468-B - File encryption device

CN115374468BCN 115374468 BCN115374468 BCN 115374468BCN-115374468-B

Abstract

The invention provides a file encryption device, comprising: a file input pool, a file formatter, a matrix multiplier, an inverse matrix, a file output pool, a user password manager, an encryption matrix generator, a general DES encryptor, an encryption matrix array and a general DES decryptor; the invention can meet the requirements of low safety and large data volume of electronic data in daily life of people, avoids using professional data encryption hardware or professional data encryption software with high cost, and avoids cracking the data with low cost; an encryption device based on matrix transformation algorithm with low operation amount, low time delay and low cost is provided.

Inventors

  • DENG BIAO

Assignees

  • 中科凡语(武汉)科技有限公司

Dates

Publication Date
20260505
Application Date
20220420

Claims (7)

  1. 1. A file encryption device is characterized by comprising a file input pool, a file formatter, a matrix multiplier, an inverse matrix device, a file output pool, a user password manager, an encryption matrix generator, a general DES encryptor, an encryption matrix array module and a general DES decryptor; The file input pool is used for receiving user data files; The file formatter is used for extracting a user file format, file information and file data, the file data is sequentially read in a byte stream mode, the file data byte stream is divided into a plurality of matrix data blocks in a form of N rows by N columns, when the number of bytes at the tail of the file data byte stream is less than N by N, the data is filled with data '0', and the file formatter is connected with the file input pool, wherein N is a square matrix dimension set by a user in the user password manager, and the range is from 64 to 4096; The matrix multiplier is used for calculating the product of a matrix data block and the encryption matrix array; The inverse matrix device is used for solving the inverse matrix of the matrix in the encryption matrix array module; the file output pool is used for storing the file and file format information after encryption operation; The user password manager is used for setting passwords, inputting passwords, modifying passwords, deleting passwords and setting the dimension of a matrix in the encryption matrix array module by a user; the encryption matrix generator randomly generates a reversible integer matrix of N rows by N columns according to a user input password sequence; The encryption matrix array module is used for storing matrix data encrypted by the DES encryptor; The general DES encryptor is used for encrypting the encryption matrix array module; the general DES decryptor and the general DES encryptor are mutually inverse operations and are used for decrypting the encryption matrix array module.
  2. 2. A file encryption device according to claim 1, wherein 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. 3. A file encryption apparatus according to claim 1, wherein the encryption matrix generator is connected to the encryption matrix array module at a level below the user password manager.
  4. 4. A file encryption apparatus as claimed in claim 1, wherein the generic DES encryptor is connected up to the encryption matrix generator.
  5. 5. The file encryption apparatus of claim 1 wherein the encryption matrix array module is connected up to the generic DES encryptor and stores the generic DES encryptor output data into an array.
  6. 6. The document encryption device according to claim 1, wherein in the encryption step, the general DES decryptor extracts an encryption matrix from the encryption matrix array, decrypts the encryption matrix, outputs the encryption matrix to the matrix multiplier, and the matrix multiplier extracts data from the data stream output from the document formatter according to the matrix dimension output from the general DES decryptor, performs matrix multiplication, and outputs the matrix data after multiplication to the document output pool for storage.
  7. 7. The file encrypting apparatus according to claim 1, wherein in the decrypting step, said general DES decrypting means extracts an encryption matrix from said encryption matrix array module, decrypts the encryption matrix, outputs the decryption matrix to said matrix multiplying means, said matrix multiplying means activates said inverse matrix means, performs an inversion operation on the encryption matrix, extracts data from a data stream outputted from said file formatting means in accordance with a matrix dimension outputted from said inverse matrix means, performs a matrix multiplication operation, outputs the matrix data after the multiplication operation to said file outputting pool, and returns the original data file to the user.

Description

File encryption device Technical Field The invention relates to the technical field of data encryption or data conversion, in particular to a file encryption device. Background The scientific technology is developed to the present day, and people have entered the digital age, and sensor data, personal or private data, data and files are stored through a universal electronic medium, so that great challenges are brought to the protection of private data of the people. When electronic data files are stored in the electronic medium in the clear, considerable hidden danger is brought to the safety of the electronic data files, and the electronic data files can be encrypted and stored in a method with proper complexity, low cost, low operation amount and convenience and rapidness, so that the method is a practical and feasible method. While the existing professional encryption equipment has large operand, high price and complex use, the encryption equipment or program with low price generally does not disclose encryption algorithm, and users have great doubts in the aspects of use reliability and algorithm verifiability. Disclosure of Invention In view of the above-mentioned drawbacks of the prior art and the actual needs of users, an object of the present invention is to provide a file encryption apparatus, which is used for solving the problems existing in the prior art and meeting the actual needs of users. To achieve the above and other related objects, the present invention provides a file encrypting apparatus, comprising: the system comprises a file input pool, a file formatter, a matrix multiplier, an inverse matrix, a file output pool, a user password manager, an encryption matrix generator, a general DES encryptor, an encryption matrix array module and a general DES decryptor; The file input pool is used for receiving user data files; The file formatter is used for extracting a user file format, file information and file data, the file data is sequentially read in a byte stream mode, the file data byte stream is divided into a plurality of matrix data blocks in a form of N rows by N columns, when the number of bytes at the tail of the file data byte stream is less than N by N, the data is filled with data '0', and the file formatter is connected with the file input pool, wherein N is a square matrix dimension set by a user in the user password manager, and the range is from 64 to 4096; The matrix multiplier is used for calculating the product of a matrix data block and the encryption matrix array; The inverse matrix device is used for solving the inverse matrix of the matrix in the encryption matrix array module; the file output pool is used for storing the file and file format information after encryption operation; The user password manager is used for setting passwords, inputting passwords, modifying passwords, deleting passwords and setting the dimension of a matrix in the encryption matrix array module by a user; the encryption matrix generator randomly generates a reversible integer matrix of N rows by N columns according to a user input password sequence; The encryption matrix array module is used for storing matrix data encrypted by the DES encryptor; The general DES encryptor is used for encrypting the encryption matrix array module; the general DES decryptor and the general DES encryptor are mutually inverse operations and are used for decrypting the encryption matrix array module. Optionally, the user password manager is connected with the encryption matrix array module and the encryption matrix generator and is located at the top layer of the file encryption device; Optionally, the encryption matrix generator is connected with the encryption matrix array module and is located at the next layer of the user password manager; Optionally, the generic DES encryptor is connected up to the encryption matrix generator; optionally, the encryption matrix array module is connected up to the generic DES encryptor and stores the generic DES encryptor output data into an array; optionally, the file input pool is used for inputting or selecting a data file to be encrypted by a user, and is connected with the file formatter; Optionally, the file formatter is configured to extract a user file format, and is connected to the matrix multiplier and located at a next layer of the file input pool; optionally, the matrix multiplier is an n×n integer matrix multiplier, located at a next layer of the file formatter; optionally, the inverse matrix device is an n×n integer matrix inversion matrix operator, connected to the matrix multiplier, and located in a next layer of the matrix multiplier. Optionally, the file encrypting device may be a single chip microcomputer system device running the algorithm, an executable file or a system service program; As described above, the invention can meet the requirements of low safety and large data volume of electronic data in daily life of people, avoids using expensive professi