CN1109187A - Method and floppy disk for file encryption - Google Patents

Method and floppy disk for file encryption Download PDF

Info

Publication number
CN1109187A
CN1109187A CN 94108443 CN94108443A CN1109187A CN 1109187 A CN1109187 A CN 1109187A CN 94108443 CN94108443 CN 94108443 CN 94108443 A CN94108443 A CN 94108443A CN 1109187 A CN1109187 A CN 1109187A
Authority
CN
China
Prior art keywords
key
noise source
file
source
merchant
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
CN 94108443
Other languages
Chinese (zh)
Other versions
CN1102310C (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN94108443A priority Critical patent/CN1102310C/en
Publication of CN1109187A publication Critical patent/CN1109187A/en
Application granted granted Critical
Publication of CN1102310C publication Critical patent/CN1102310C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The file encryption method features using such encryption techniques for data encryption as dividing source file into groups (128 bits for each) in slide mode, fragments treatment, supplement of user password, pseudo-random number processing, compression displacement, logic shift to generate sub-password, initial displacement of each code block in source file, product translation, inverse transform, using encrypted functions, expanding transform,e tc. and resultant executable file is written on floppy disk to provide to users. Its advantages include high security, and easy to use.

Description

A kind of file encryption disposal route and floppy disk thereof
The present invention relates to the file encryption treatment technology, is a kind of file encryption (deciphering) disposal route and floppy disk thereof of being applicable to, belongs to computer data and handles class.
Because information is a kind of resource, so she just exists the necessity of safeguard protection.In computer storage and computer communication system, information is to use the various combination of " 0 " and " 1 " to constitute, and that is to say that all information are all represented with data in computing machine.For the safety of data, produced the technical scheme of many data encryptions.Wherein, DES Cipher (Data EncryptionStandard) algorithm is present general data encryption method.Yet this algorithm has following shortcoming: (1). its key length is 8 bytes, and size of key is 95 8In the today that high-speed computer occurred, this size of key has seemed littler.Because the code breaker can use the method for exhaustion to obtain key on high-speed computer.This is for those important information, and needing to preserve the ciphertext of long period is very disadvantageous with different cryptographic objects is adopted same key.(2). one of its basis is to be replaced by the compression that the alternative close box that is called S_Box is finished.Substituting in the close box has 8 substitution tables, in some substitution tables, on number different position of row identical element value is arranged at identical row number; And identical row number, row number but have identical element value in different substitution tables.Such element is more than 76 pairs.(3). its conversion E is substituting of a kind of symmetric form, and this just makes the researcher of DES can S_Box and conversion E is separated analyze, and this facilitates the decoding ciphertext.
In the practical application of DES algorithm, once adopted cryptographic block chaining method CBC (CipherBlock Chaining), this method has two shortcomings: (1). and when changing any bit of source file, can not make that each bit of file destination is all vicissitudinous may.(2). need encrypt transmission to initializaing variable IV (Initial Vaariable).
In view of the problem of above-mentioned existence,
The objective of the invention is to develop a kind of disposal route and floppy disk thereof of file encryption, and will be based on the external encryption order (or the suffix of filename is the executable file of " EXE " type) of operating system that this method produces, make it in computer storage system and computer communication system, this encrypted command file (or the suffix of filename is the executable file of " EXE " type) can be encrypted (or deciphering) to the data file of arbitrary format certain-length, and this executable file is stored on the floppy disk, as the product that provides the user to use.Also can form the instruction group identical, it is write among read-only memory ROM or the program read-only memory PROM according to this method with the encrypted command file function.
The technical scheme that realizes the object of the invention is such:
A kind of file encryption disposal route and floppy disk thereof, comprise computer storage system, computer communication system, central processing unit, internal memory, keyboard, display, disc driver, printer, communication interface, floppy disk, couple together with control bus, address bus, data bus between them, as shown in Figure 1, it is characterized in that:
Memory block A (Fig. 1) deposits the encrypted command file, memory block B (Fig. 1) deposits encryption (or deciphering) object, be source file and file destination, the start address of memory block A is determined by operating system, memory block B is positioned at the high-end of calculator memory, after encrypted command was finished encryption (or deciphering) work, memory block B was controlled by operating system;
Memory block A is provided with a byte physical location depositing encryption (or deciphering) operation mode information, (not marking among Fig. 1) is provided with the physical location of a word again, is used for the deposit operation system information, it shows that system belongs to Chinese operating system, or English operation system (not marking among Fig. 1);
The logical relation that the present invention finishes encryption (or deciphering) work as shown in Figure 2, according to screen prompt, the user answers following four problems respectively: encrypt the mode of operation of (or deciphering), source filename and path thereof, file destination name and path thereof, user key;
After the user has determined the pattern of encryption (or deciphering), deposit the state of the physical location of encryption (or deciphering) pattern information among the memory block A and also just and then decided;
After the user imports correct source filename and path thereof, can then source file be read to go to memory block B according to size and the start address of the operating position decision memory block B of the length of this source file and memory source; To the grouping of sliding of the source file among the memory block B, calculate slip block code number of blocks and handle fragment, back and forth each code block of source file is carried out cryptographic algorithm then;
After the full content of the source file among the memory block B being encrypted (or deciphering), just wherein ciphertext (or expressly) is write in the file destination;
User key is obtained by keyboard;
The large and small key of writing of 26 English letters on the keyboard, sign has the gearshift of uplink and downlink character keys position, totally 95 code values such as space bars etc. are used as user key, its ASCII character value by 20H to 7EH; User key length can change between 1~16 byte, obtains source key by user key then, calculates sub-key by source key;
Obtain source key by user key,, supply 16 bytes to key length, and high 4 of the every byte of user key are carried out pseudo random number and handle when user key length during less than 16 bytes; (as shown in Figure 3 above-mentioned);
The size of key that replenishes as period, first byte of user key as first noise source, the end byte is as second noise source, in loop body, earlier first noise source be multiply by second noise source, its product is divided by 10, if its merchant's least-significant byte equals zero, then merchant's most-significant byte key as a supplement, if its merchant's least-significant byte is not equal to zero, then merchant's least-significant byte key as a supplement, then supplementary key as second noise source, if circulation the beginning that does not finish to get back to again loop body, carry out the operation in the loop body, as loop ends, then the first byte logical multiply 1FH of supplementary key, (as shown in Figure 4 above-mentioned);
User key length as period, first byte of key as first noise source, the 16th byte is as second noise source, in loop body, earlier first noise source be multiply by second noise source, above-mentioned product is divided by 10, if its merchant's least-significant byte equals zero, then merchant's most-significant byte as second noise source, if its merchant's least-significant byte is not equal to zero, then merchant's least-significant byte as second noise source; Operation below carrying out then, if high 4 of second noise source equal zero, then low 4 of high 4 XOR second noise sources of key, if high 4 of second noise source are not equal to zero, high 4 high 4 XOR second noise sources of key then; Second noise source in the The above results is circulated as next round-robin input, as circulation and do not finish, get back to the beginning of loop body again, carry out the operation in the loop body, then enter next step (as shown in Figure 5 above-mentioned) as loop ends;
Calculate sub-key by source key, the source key of 16 bytes has 128 bits, earlier this 128 bit is begun to be numbered 1,2,3 according to sequence of positions from stem ..., 127,128, become C through overcompression displacement 1 0D 0, become C through logical shift again iD i, compression displacement 2 back outputs, (as shown in Figure 6), C wherein shown in Figure 6 iD iThe generation of (i=1,32) is by function LM iWith C I-1, D I-1Decision respectively, promptly by shown in the following formula:
C i=LM i(C i-1)
D i=LM i(D i-1)
Function LM wherein iFig. 8 is seen in the presentation logic displacement;
Compression displacement 1 is seen shown in Figure 7;
Compression displacement 2 is seen shown in Figure 9;
To the source file grouping of sliding, disposal route is two bytes in back of the encryption of last group code piece (or deciphering) result the first two byte as back one code block, its forward slide pattern as shown in figure 10, then again with the grouping of sliding of reverse mode, promptly since the grouping of sliding of the afterbody of a data series, as shown in figure 11, wherein N is a natural number;
The method of calculating code block quantity and fragment length is to get file size earlier divided by 14, then looks its remainder and whether waits zero as encrypting, and is non-vanishing as remainder, then (merchant+1) as the merchant, then (14-remainder) as fragment length, discussing to code block quantity; As not encrypting, then directly give code block quantity the merchant, see Figure 12;
Handling fragment promptly handles some the remaining cleartext informations of grouping that slide, its method is to increase some information one group of data that makes it to gather together enough, it is fragment length that the information that is increased must include a specific information, make it when deciphering, in view of the above the information that increases newly to be blocked, intactly recover the looks of former plaintext, remaining newly-added information is filled with pseudo random number, its way is that as period, period equals zero (fragment length-1), directly fragment length is delivered to the fragment district; Period is not equal to zero, then the first byte of key as first noise source, the last byte of key as second noise source, in loop body, earlier first noise source be multiply by second noise source, above-mentioned product is divided by 10, if its merchant's least-significant byte equals zero, then merchant's most-significant byte as second noise source, if its merchant's least-significant byte is not equal to zero, then merchant's least-significant byte as second noise source; Then second noise source is delivered to the fragment district, as the end end that circulates, then turn back to the beginning of loop body again, carry out the operation in the loop body, loop ends is then delivered to the fragment district to fragment length, as shown in figure 13;
It is to be begun successively each grouping code block that slides to be encrypted (or deciphering) by file header for the first time that the form of back and forth carrying out, its method have been taked in encryption (or deciphering), for the second time then from tail of file, and reverse carrying out; At first be as period code block quantity, source data address pointer and target data address pointer are all pointed to the filebuf first address, in loop body, carry out cryptographic algorithm earlier, then the source data address pointer, the target data address pointer all increases by 14, the beginning of loop body is finished then to turn back to again in the circulation end, carry out the operation in the loop body, the encryption (or deciphering) of reverse mode is then carried out in loop ends, code block quantity as period, is all pointed to last of file the 16th byte place to source data address pointer and target data address pointer, in loop body, carry out cryptographic algorithm earlier, then the source data address pointer, the target data address pointer all reduces 14, finishes then to get back to the beginning of loop body as circulating, and carries out the operation in the loop body, finished then return system as circulation, specifically seen shown in Figure 14;
The staircase chart of data encryption algorithm such as Figure 15, by initial permutation, product of transformation, contrary initial permutation is formed, and imports 32 of the plaintext (ciphertext) of 128 bits and sub-keys that length is 16 bytes, and its output is the ciphertext (expressly) of 128 bits, as shown in figure 15; The scheme of initial permutation such as Figure 16, scheme such as Figure 17 of contrary initial permutation, product of transformation is the process of a continuous iteration, carry out altogether 32 times, the output of initial permutation is as the input of the iteration first time, later operation is exactly the input of the output of a preceding iteration as a back iteration, and the result of the 32nd iteration is as the input of contrary initial permutation; Represent the odd bytes of the output of iteration each time (or input) data with O, E represents even bytes, and F represents encryption function, during encryption, the i time iteration has been used sub-key K i, and O i=E I-1, E i=F (E I-1) _ O I-1(i=1,32) during deciphering, have used sub-key K to the i time iteration 33-i, and E i=O I-1, O i=F (O I-1) _ E I-1(i=1,32);
Encryption function F is the core of algorithm, it is by transform expansion, the computing of XOR sub-key, and close box substitutes, conversion E forms, as shown in figure 18, for the data of input 64 bits, become the data of 96 bits earlier through transform expansion, act as the data of 96 bits again through the sub-key XOR of 96 bits, be replaced into the data of 64 bits again through close box, pass through conversion E at last, export 64 Bit datas;
Figure 19 has represented the rule of transform expansion, and it becomes the input data of 64 bits the output data of 96 bits;
It is that a kind of compression is replaced that close box substitutes, 16 close tables are arranged in the close box of the present invention, each close table is divided into 4 row * 16 row, 16 close tables such as Figure 20, shown in Figure 21,96 Bit datas of input are divided into 16 groups successively, every group 6 bit, alternative corresponding successively close table of each group, in the input data of 6 bits, 2 bits are formed capable number end to end, middle 4 bits are formed row number, row number, row number extract element value as output in the close table of correspondence according to this, and output of each group is combined successively, becomes output data 64 bits that close box substitutes;
The program circuit of conversion E as shown in figure 22, conversion E is a kind of scramble, substitutes the input of resulting 64 Bit datas as this process by close box, concrete operations are, earlier the SX of input 8 bytes i(i=0,7) search for SX from head and the tail respectively iNonzero value, find as the end, then make SX 0=7, SX i(i=1,7)=0 is SX i(i=0,7) as the result of encryption function F output, if found, then from SX iStem first nonzero value of beginning to search as first noise source, from SX iFirst nonzero value that afterbody begins to search is as second noise source, 8 as period, and makes variable i=0, in loop body, earlier first noise source be multiply by second noise source, its product divided by 10, equal zero as the merchant, then give second noise source remainder, then SX iValue XOR second noise source, give SX the XOR result i, be not equal to zero as the merchant, see then whether merchant's least-significant byte waits zero, be to wait zero, then give second noise source merchant's most-significant byte, otherwise give second noise source merchant's least-significant byte, then SX iValue XOR second noise source, give SX the result of XOR i, then variable i is added 1, do not finish as circulation, then get back to the beginning of loop body again, carry out the operation in the loop body, finished then SX as circulation i(i=0,7) are as result's output of encryption function F;
Illustrate as follows:
Fig. 1. overall hardware synoptic diagram of the present invention
Fig. 2. file encryption disposal route sketch plan
Fig. 3. obtain the procedure chart of source key by user key
Fig. 4. the method program figure of supplementary key
Fig. 5. to high 4 method program figure that handle of user key
Fig. 6. produce the method program figure of sub-key by source key
Fig. 7. the method figure of compression displacement 1
Fig. 8. logical shift function composition
Fig. 9. the method figure of compression displacement 2
Figure 10. forward slip grouping synoptic diagram
Figure 11. reverse slip grouping synoptic diagram
Figure 12. calculate the procedure chart of code block quantity and fragment length
Figure 13. handle the method program figure of fragment
Figure 14. source file is encrypted the procedure chart of (or deciphering)
Figure 15. the staircase chart of data encryption algorithm
Figure 16. initial permutation method figure
Figure 17. contrary initial permutation method figure
Figure 18. the logical diagram of encryption function
Figure 19. transform expansion method figure
Figure 20. preceding 8 the close charts in the close box
Figure 21. back 8 the close charts in the close box
Figure 22. the procedure chart of conversion E
Now further specify application concrete grammar of the present invention and step by embodiment in conjunction with the accompanying drawings.
Embodiment:
According to file encryption disposal route discussed above, just can form the external encryption command file of operating system by operations such as further detailed design, programming, compiling, connections, (or have suffix " EXE " executable file).In order to improve the quality of encrypted command file, to note the problem of the following aspects in the embodiment of this invention: (1). at detailed design phase: from the above, when the data file being encrypted (or deciphering), in fact all source file is carried out various " bit manipulations ".So, expertly use the function of each register in the computing machine, for the computing machine that 32 bit registers are arranged, will use the machine instruction that can carry out 32 bit manipulations as best one can, this can be very helpful when reducing machine.The funcall that also will utilize resource among the read-only memory ROM on the computing machine and operating system to provide fully.Be noted that especially and needn't in program, open up a special data field for data file, but will be to internal memory that is positioned at high-end address of operating system application, memory block B as shown in fig. 1 is used for placing data file.If the internal memory resource of computing machine allows, according to the technology that present operating system provides, once can encrypt the data file of 1 megabyte length, promptly can encrypt a Chinese book of nearly 500,000 words.Otherwise, decipher as the same.(2). when programming, should use assembly language.(3). for operations such as compiling, connections, the instructions that provides according to producer (company) is provided does just passable.
Above-mentioned encrypted command file (or executable file of band suffix " EXE ") is write on the floppy disk, and this floppy disk just can enter the field of circulation, has also made things convenient for the user.
Use the operation steps of this floppy disk as follows: when computer storage system and computer communication system are in the display operation system prompt, this floppy disk is inserted in the floppy disk of computing machine, and shut the door of driver, transposition driver prompt is the current drive prompt, title by input encrypted command on the keyboard, and adding an enter key, computing machine just automatically reads in internal memory to this command file, and gives it control.This order can demonstrate some relevant information on screen when carrying out, the user makes answer respectively according to these promptings, such as the operator scheme of encryption or deciphering, the title of source file and path thereof, the title of file destination and path thereof, user key etc.After this, encrypted command is just automatically finished encryption (or deciphering) task for the user.The order end of run is just given back operating system to the control of computing machine.Commonly used is that the encrypted command file on the floppy disk is copied on the hard disk, allows computing machine get on to read this encrypted command file and bootup window from hard disk.
Also can write the relative section of above-mentioned encrypted command (the instruction group that contains encryption function) among read-only memory ROM or the program read-only memory PROM.
In computer storage and computer communication system, the file destination that encrypted command produced can be delivered on the relevant external unit easily.Such as, printer, magnetic tape station, disk drive, display and communication interface etc.If it is necessary that the user thinks, can also be encrypting the file destination that produced for the first time as the source file of encrypting for the second time, the rest may be inferred, can carry out encryption repeatedly, how many times has been carried out in encryption, and deciphering also will be carried out identical number of times, just can recover previous plaintext.
Encrypted command comprises can be used in Chinese operating system, also can be used in the English operation system.
In computer storage system and computer communication system, the present invention goes for comprising text, form document, graphic file, image file, built-in function file and even executable file etc.
The data encryption method that the present invention proposes can also be used in the real-time communication system, comprises being used for the image digitization signal, the encrypt and decrypt of sound figure signal.Also can be used in the radio communication.
The data file cipher processing method that the present invention proposes comprises and can be used on the microcomputer, also can be used on the small-size computer.
The data file cipher processing method that the present invention proposes comprises and is applicable to single user operating system, also is applicable to multi-user operating system.
The present invention compares with the DES algorithm and the mutation thereof of present home and abroad, and following beneficial technical effects is arranged: 1. size of key is big, and key length is variable.Size of key of the present invention than the size of key of DES algorithm big at least 6.7 * 10 15Doubly, the possibility of decoding key is zero no better than.2. in substituting close box, 16 close tables are arranged; Identical row number, the row element number in each close table has nothing in common with each other; In each close table, same each element value difference that lists, also inequality with each element in the delegation.So close box each time substitutes has implemented " one-time pad " system.This does not have in the DES algorithm.3. conversion E and pseudo random number are connected, make conversion E become " black box ".In encryption function, it is formed by connecting with alternative close box and is one.This point and DES algorithm have important difference.4. the data file has been used shuttle slip grouping chaining method.It has two benefits: (1). and change the arbitrary bit value in the source file, all can make the arbitrary bit in the file destination that the possibility that changes is all arranged.(2). do not need the initializaing variable IV among the cryptographic block chaining method CBC, make the present invention be convenient to be connected with RSA arithmetic.(3). more difficult decoding.5. to high 4 XORs that carry out respectively with the pseudorandom number sequence of user key code value, people's behavioural habits can not showed in ciphertext, increase and decoded difficulty.6. in technical scheme proposed by the invention, is operand that data file is placed on the high-end of calculator memory, so just can encrypt (or deciphering) to the data file of random length, and can also form the external encryption order of operating system, strengthen the function of file management type command, enriched the content of operating system.

Claims (2)

1. file encryption disposal route and floppy disk thereof, comprise computer storage system, computer communication system, central processing unit, internal memory, keyboard, display, disc driver, printer, communication interface, floppy disk, couple together with control bus, address bus, data bus between them, it is characterized in that:
(1). memory block A deposits the encrypted command file, memory block B deposits encryption (or deciphering) object, be source file and file destination, the start address of memory block A is determined by operating system, memory block B is positioned at the high-end of calculator memory, after encrypted command was finished encryption (or deciphering) work, memory block B was controlled by operating system; Memory block A is provided with a byte physical location of depositing encryption (or deciphering) operational mode status information, and the physical location that is provided with a word again shows that with what deposit operation system information system belongs to Chinese operating system, or English operation system;
(2). after the user imports correct source filename and path thereof, can then source file be read to go to memory block B according to size and the start address of the operating position decision memory block B of the length of this source file and memory source; After the full content of the source file among the memory block B being encrypted (or deciphering), just wherein ciphertext (or expressly) is write in the file destination; File destination name and path thereof are answered according to the prompting on the screen by the user, and user key is obtained by keyboard; The large and small key of writing of 26 English letters on the keyboard, sign has the gearshift of uplink and downlink character keys position, totally 95 code values such as space bars etc. are used as user key, its ASCII character value by 20H to 7EH; User key length can change between 1~16 byte;
(3). obtain source key by user key,, supply 16 bytes to key length, and high 4 of the every byte of user key are carried out pseudo random number and handle when user key length during less than 16 bytes;
(4). the size of key that replenishes as period, first byte of user key as noise source, the end byte is as second noise source, in loop body, earlier first noise source be multiply by second noise source, its product is divided by 10, if its merchant's least-significant byte equals zero, then merchant's most-significant byte key as a supplement, if its merchant's least-significant byte is not equal to zero, then merchant's least-significant byte key as a supplement, then supplementary key as second noise source, if circulation not to finish to get back to again the beginning of loop body, carry out the operation in the loop body, as loop ends, then the first byte logical multiply 1FH of supplementary key;
(5). user key length as period, first byte of key as noise source, the 16th byte is as second noise source, in loop body, earlier first noise source be multiply by second noise source, above-mentioned product is divided by 10, if its merchant's least-significant byte equals zero, then merchant's most-significant byte as second noise source, if its merchant's least-significant byte is not equal to zero, then merchant's least-significant byte as second noise source; If high 4 of second noise source equal zero, low 4 high 4 XOR second noise sources of key then, if high 4 of second noise source are not equal to zero, high 4 high 4 XOR second noise sources of key then; Input circulates as next round-robin with second noise source in the The above results, as circulation and does not finish, and gets back in the loop body again to begin, and carries out the operation in the loop body, then enters next step as loop ends;
(6). calculate sub-key by source key, the source key of 16 bytes has 128 bits, earlier this 128 bit is begun to be numbered 1,2,3 according to sequence of positions from stem ..., 128, become C through overcompression displacement 1 0D 0, become C through logical shift iD i, compressed again displacement 2 back outputs, C wherein i, D iThe generation of (i=1,32) is by function LM iWith C I-1, D I-1Decision respectively, promptly by shown in the following formula:
C i=LM i(C i-1)
D i=LM i(D i-1)
Function LM wherein iThe presentation logic displacement;
Compression displacement 1;
Compression displacement 2;
(7). to the source file grouping of sliding, disposal route is undertaken by forward and reverse two kinds of operations, it is two bytes in back of the encryption of last group code piece (or deciphering) result the first two byte (Figure 10) as a back code block that its forward slides, then again with the grouping of sliding of reverse mode, promptly since the grouping (Figure 11) of sliding of the afterbody of a data series;
(8). whether the method for calculating code block quantity and fragment length is to get file size earlier divided by 14, then look its remainder and equal zero as encrypting, and is non-vanishing as remainder, then (merchant+1) as the merchant, and then (14-remainder) as fragment length, the merchant to code block quantity; As not encrypting, then directly give code block quantity the merchant;
(9). handle fragment and promptly some the remaining cleartext informations of grouping that slide are handled, its method is to increase some information one group of data that makes it to gather together enough, it is fragment length that the information that is increased must include a specific information, make it when deciphering, in view of the above the information that increases newly to be blocked, intactly recover the looks of former plaintext, remaining newly-added information is filled with pseudo random number, its way is that as period, period equals zero (fragment length-1), directly fragment length is delivered to the fragment district; Be not equal to zero as period, then the first byte of source key as first noise source, the last byte of source key as second noise source, in loop body, earlier first noise source be multiply by second noise source, above-mentioned product is divided by 10, if its merchant's least-significant byte equals zero, then merchant's most-significant byte as second noise source, if its merchant's least-significant byte is not equal to zero, then merchant's least-significant byte as second noise source; Then second noise source is delivered to the fragment district, as the end end that circulates, then turn back to the beginning of loop body again, carry out the operation in the loop body, loop ends is then delivered to the fragment district to fragment length, (Figure 13);
(10). it is to be begun successively each grouping code block that slides to be encrypted (or deciphering) by file header for the first time that the form of back and forth carrying out, its method have been taked in encryption (or deciphering), for the second time then from tail of file, reverse carrying out; At first be as period code block quantity, source data address pointer and target data address pointer are all pointed to the filebuf first address, in loop body, carry out cryptographic algorithm earlier, then the source data address pointer, the target data address pointer all increases by 14, circulation does not finish then to turn back to again the beginning of loop body, carry out the operation of loop body, the encryption (or deciphering) of reverse mode is then carried out in loop ends, code block quantity as period, source data address pointer and target data address pointer are all pointed to last of file the 16th byte place, in loop body, carry out cryptographic algorithm earlier, then the source data address pointer, the target data address pointer all reduces 14, finish then to get back to the beginning of loop body as circulating, carry out the operation in the loop body, finished then return system (Figure 14) as circulation;
(11). the ladder of data encryption algorithm (Figure 15) is by initial permutation, product of transformation, contrary initial permutation is formed, and imports 32 of the plaintext (ciphertext) of 128 bits and sub-keys that length is 16 bytes, and its output is the ciphertext (expressly) of 128 bits, (Figure 15); The scheme of initial permutation (Figure 16), the scheme (Figure 17) of contrary initial permutation, product of transformation is the process of a continuous iteration, carry out altogether 32 times, the output of initial permutation is as the input of the iteration first time, later operation is exactly the input of the output of a preceding iteration as a back iteration, and the result of the 32nd iteration is as the input of contrary initial permutation; Represent the odd bytes of the output of iteration each time (or input) data with O, E represents even bytes, and F represents encryption function, during encryption, the i time iteration has been used sub-key K i, and O i=E I-1, E i=F (E I-1) _ O I-1(i=1,32) during deciphering, have used sub-key K to the i time iteration 33-i, and E i=O I-1, O i=F (O I-1) _ E I-1(i=1,32);
(12). encryption function F is the core of algorithm, it is by transform expansion, the computing of XOR sub-key, and close box substitutes, conversion E forms, (Figure 18), for the data of input 64 bits, become the data of 96 bits earlier through transform expansion, act as the data of 96 bits again through the sub-key XOR of 96 bits, be replaced into the data of 64 bits again through close box, pass through conversion E at last, export 64 Bit datas;
(13). the rule of transform expansion (Figure 19), it becomes the input data of 64 bits the output data of 96 bits;
(14). it is that a kind of compression is replaced that close box substitutes, 16 close tables are arranged in the close box, each close table is divided into 4 row * 16 row, (Figure 20, Figure 21), its operation is that 96 Bit datas of input are divided into 16 groups successively, every group 6 bit, alternative corresponding successively close table of each group, in the input data of 6 bits, 2 bits are formed capable number end to end, middle 4 bits are formed row number, row number, row number extract element value as output in the close table of correspondence according to this, and output of each group is combined successively, becomes output data 64 bits that close box substitutes;
(15). the program circuit of conversion E (Figure 22), conversion E are a kind of scrambles, substitute the input of resulting 64 Bit datas as this process by close box, and concrete operations are to import the SX of 8 bytes earlier i(i=0,7) search for SX from head and the tail respectively iNonzero value, find as the end, then make SX 0=7, SX i(i=1,7)=0 is SX i(i=0,7) as the result of encryption function F output, as found, then from SX iStem first nonzero value of beginning to search as first noise source, from SX iFirst nonzero value that afterbody begins to search is as second noise source, 8 as period, and makes variable i=0, in loop body, earlier first noise source be multiply by second noise source, its product divided by 10, equal zero as the merchant, then give second noise source remainder, SX iValue XOR second noise source, give SX the XOR result i, be not equal to zero as the merchant, see then whether merchant's least-significant byte waits zero, be to wait zero, then give second noise source merchant's most-significant byte, otherwise give second noise source merchant's least-significant byte, then SX iValue XOR second noise source, give SX the result of XOR i, then variable i is added 1, do not finish as circulation, then get back to the beginning of loop body again, carry out the operation in the loop body, finished then SX as circulation i(i=0,7) are as result's output of encryption function F;
2. file encryption disposal route and floppy disk thereof is characterized in that having its range of application
(1). the encryption that is formed by this method (or deciphering) command file (or executable file of band suffix " EXE " type) can write on and comprise floppy disk, on the hard disk, also can form instruction group, it is write on read-only memory ROM with encryption function, or on the program read-only memory PROM;
(2). such product is applicable to and comprises text that the encryption of image file etc. (or deciphering) also can be used in the real-time system, comprises the image digitization signal, or the real-time communication of sound figure signal;
(3). it is applicable to single user operating system, or multi-user operating system, or small-size computer, or microcomputer.
CN94108443A 1994-07-14 1994-07-14 Method and floppy disk for file encryption Expired - Fee Related CN1102310C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN94108443A CN1102310C (en) 1994-07-14 1994-07-14 Method and floppy disk for file encryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN94108443A CN1102310C (en) 1994-07-14 1994-07-14 Method and floppy disk for file encryption

Publications (2)

Publication Number Publication Date
CN1109187A true CN1109187A (en) 1995-09-27
CN1102310C CN1102310C (en) 2003-02-26

Family

ID=5033480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN94108443A Expired - Fee Related CN1102310C (en) 1994-07-14 1994-07-14 Method and floppy disk for file encryption

Country Status (1)

Country Link
CN (1) CN1102310C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090312B (en) * 2007-05-24 2011-12-14 华中科技大学 Improved speech code flow enciphering Improved speech code flow enciphering method
CN107491699A (en) * 2016-06-10 2017-12-19 波音公司 For the method and system to data encoding
CN108133147A (en) * 2017-12-20 2018-06-08 中兴通讯股份有限公司 Guard method, equipment and the readable storage medium storing program for executing of executable code

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SE464991B (en) * 1989-06-16 1991-07-08 Televerket BUILDING CIRCUIT CONSTRUCTION WITH GATE MATRIX TECHNOLOGY
JPH067930A (en) * 1992-05-08 1994-01-18 Sony Corp Device for applying flux
US5495580A (en) * 1992-10-20 1996-02-27 Xlnt Designs, Inc. Ring network security system with encoding of data entering a subnetwork and decoding of data leaving a subnetwork
NL9202284A (en) * 1992-12-29 1994-07-18 Nederland Ptt Block encryption based on algebraic encoding methods.

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090312B (en) * 2007-05-24 2011-12-14 华中科技大学 Improved speech code flow enciphering Improved speech code flow enciphering method
CN107491699A (en) * 2016-06-10 2017-12-19 波音公司 For the method and system to data encoding
CN107491699B (en) * 2016-06-10 2023-09-19 波音公司 Method and system for encoding data
CN108133147A (en) * 2017-12-20 2018-06-08 中兴通讯股份有限公司 Guard method, equipment and the readable storage medium storing program for executing of executable code
CN108133147B (en) * 2017-12-20 2023-12-22 中兴通讯股份有限公司 Method and device for protecting executable code and readable storage medium

Also Published As

Publication number Publication date
CN1102310C (en) 2003-02-26

Similar Documents

Publication Publication Date Title
US5835597A (en) Software-efficient pseudorandom function and the use thereof for decryption
Chai et al. A new chaos-based image encryption algorithm with dynamic key selection mechanisms
US6125182A (en) Cryptographic engine using logic and base conversions
US6259789B1 (en) Computer implemented secret object key block cipher encryption and digital signature device and method
US5222139A (en) Cryptographic method and apparatus
JP3229148B2 (en) Encryption method and system
US8683218B2 (en) System and method for N-dimensional encryption
CN1921382B (en) Encrypting-decrypting method based on AES algorithm and encrypting-decrypting device
US7801307B2 (en) Method of symmetric key data encryption
EP0725511A2 (en) Method for data encryption/decryption using cipher block chaining (CBC) and message authetication codes (MAC)
JPH11509940A (en) Cryptographic method and apparatus for non-linearly combining data blocks and keys
CA2302784A1 (en) Improved block cipher method
CN113037488B (en) Format-preserving encryption method and decryption method based on cryptographic hash algorithm
CN1286077C (en) Data encipher and decipher system based on dynamic variable-length code
CN1251444A (en) Efficient block encryption method
CN1133297C (en) A kind of file encryption processing method
US20040120521A1 (en) Method and system for data encryption and decryption
CN1109187A (en) Method and floppy disk for file encryption
WO1997012459A1 (en) A method for encryption of file
EP1016240A1 (en) Improved block cipher method
US20030165242A1 (en) Confusion encryption
CN113541942B (en) Digital content encryption and decryption method based on ARX white-box block cipher
CN1286855A (en) Cryptographic conversion of binary data blocks
CN111159721A (en) Code control type data encryption method of variable secret key
KR100350207B1 (en) Method for cryptographic conversion of l-bit input blocks of digital data into l-bit output blocks

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C14 Grant of patent or utility model
GR01 Patent grant
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee