File encryption and decryption method

A file encryption and file technology, applied in the direction of instruments, electrical digital data processing, digital data protection, etc., can solve the problem that the encryption and decryption file method is easy to be cracked, and achieve the effect of ensuring that it will not be deciphered

Inactive Publication Date: 2019-11-22
NAT UNIV OF DEFENSE TECH
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a file encryption and decryption method to solve the technical problem that the existing file encryption and decryption methods are easily cracked

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File encryption and decryption method
  • File encryption and decryption method
  • File encryption and decryption method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] The present embodiment provides a kind of file encryption method, comprises the following steps:

[0047] Step 1, read the file to be encrypted, the length of the file to be encrypted is L; randomly select a section of file with a length of L from the sample file as the current file, and perform an XOR operation between the file to be encrypted and the current file to obtain an intermediate file, Where L is greater than or equal to 1, and the unit is byte;

[0048] Step 2, randomly generate n fragment lengths, and divide the intermediate file into n fragments according to the fragment lengths;

[0049] Step 3, disrupting the order of the n fragments in the intermediate file to obtain the current intermediate file;

[0050] Step 4, XOR operation is performed on the n fragments of the current intermediate file to obtain the preliminary intermediate file;

[0051] Such as figure 1 shown, including:

[0052] Step 41, let i=1, i is the encryption cycle factor;

[0053] ...

Embodiment 2

[0066] This embodiment provides a file decryption method, comprising the following steps:

[0067] Step 1, read the encrypted file in the key, the encrypted file includes m fragments, and use the encrypted file as the current decrypted file;

[0068] Step 2, decrypt the m fragments in the current decrypted file to obtain the plaintext file;

[0069] Such as figure 2 shown, including:

[0070] Step 21, randomly obtain a piece of file from the sample file as the current decrypted slice, and perform an XOR operation on the mth slice in the current decrypted file and the current decrypted slice to obtain the m'th slice of the plaintext file;

[0071] Step 22, let j=m-1, j is decryption cycle factor;

[0072] Step 23, performing an XOR operation on the jth fragment in the current decrypted file and the (j+1)'th fragment of the plaintext file to obtain the j'th fragmentation of the plaintext file;

[0073] Step 24, repeat step 23, until j=1, obtain plaintext file, described pla...

Embodiment 3

[0087] This embodiment provides a file encryption and decryption method, such as Figure 4 As shown, the file encryption method provided in Embodiment 1 and the file decryption method provided in Embodiment 2 are included.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a file encryption and decryption method, and the method comprises the steps: reading a to-be-encrypted file, randomly selecting a segment of file from a sample file as a currentfile, carrying out XOR processing of the to-be-encrypted file and the current file, and obtaining an intermediate file; disorganizing the sequence of fragments in the intermediate file to obtain a current intermediate file; performing exclusive-OR operation on the fragments of the current intermediate file to obtain a preliminary intermediate file; obtaining an encrypted file according to iterative operation of the preliminary encrypted file; generating a key file to obtain an encryption key; reading an encrypted file in a key, and taking the encrypted file as a current decrypted file; decrypting the current decrypted file to obtain a plaintext file; taking the plaintext file as a current decrypted file to obtain a preliminary decrypted file; carrying out exclusive-OR processing on the preliminary decryption file and the sample file to obtain a decryption file; decoding the encrypted file. According to the invention, personalized encryption of each file is realized, an encryption effect of one-time pad is achieved.

Description

technical field [0001] The invention relates to the technical field of data encryption, in particular to a file encryption and decryption method. Background technique [0002] Modern information encryption technology generally adopts the basic idea of ​​"algorithm + key". No matter the symmetric encryption algorithm or the asymmetric encryption algorithm, once the algorithm is selected, the strength of information encryption mainly depends on the strength of the "key". With the continuous improvement of computer computing speed and the continuous emergence of various new and efficient decryption tools, it is possible to crack the encryption algorithm of "algorithm + key", and it is becoming easier to steal confidential information. facing the threat of being cracked. Contents of the invention [0003] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a file encryption and decryption method to solve the technical problem that...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F21/60
CPCG06F21/602
Inventor 刘烔陶波李娟王强王鲸鱼党俊俏郭勇
Owner NAT UNIV OF DEFENSE TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products