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

Method and floppy disk for file encryption Download PDF

Info

Publication number
CN1102310C
CN1102310C CN94108443A CN94108443A CN1102310C CN 1102310 C CN1102310 C CN 1102310C CN 94108443 A CN94108443 A CN 94108443A CN 94108443 A CN94108443 A CN 94108443A CN 1102310 C CN1102310 C CN 1102310C
Authority
CN
China
Prior art keywords
key
bit
byte
file
source
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.)
Expired - Fee Related
Application number
CN94108443A
Other languages
Chinese (zh)
Other versions
CN1109187A (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

Abstract

The present invention relates to a method and a floppy disk for file encryption. The fragmentary treatment is carried out for a source file by slide grouping, and each group has 128 bits; a sub-encryption key is generated by user secret key supplement, pseudo-random number treatment, compression replacement and logic displacement; code blocks of the source file carry out data encryption by methods of initial displacement, product conversion, reverse initial conversion, encryption function use, expansion conversion, exclusive or sub-encryption key operation, encryption box replacement, conversion E, etc. In this way, a generated executable file is written in the floppy disk to be offered to a user, and the present invention is suitable for encrypting text files, image files, etc. The present invention has strong confidentiality, convenient use and good development product prospect.

Description

A kind of file encryption processing method
The present invention relates to the file encryption treatment technology, is a kind of file encryption (deciphering) processing method that is applicable to, belongs to the cryptography class in the computer data processing.
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 computer.For the safety of data, produced the technical scheme of many data encryptions.Wherein, the DES Cipher algorithm is present general grouped data public encryption method.Document " the computer network secrecy system designs and realizes guide ", work such as Ka Er .H. Meyer, yellow court carries to wait and translates, the Lu Qijun school, 502~509,1987 years, scientific and technical literature publishing house Chongqing branch was done introduction to this.This grouped data public encryption algorithm becomes the plaintext of 64 bits the ciphertext of 64 bits through initial transformation, product of transformation, contrary initial transformation.Yet this algorithm has following shortcoming: (1). its key length is 8 bytes, and the keyboard 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, natural way is arranged, promptly encrypt, the deciphering object-order is divided into each code block that length is 64 bits, then to each code block encrypt, decryption oprerations; The packet mode that adopts band chain to connect is also arranged,, used feedback technique therebetween, strengthen the bulk strength of password with this as cryptographic block chaining method CBC.For example, " encrypted circuit " of Sweden's Mancur Olson (Ohlson) etc., publication number is EP0403456A2.In people's such as Mancur Olson technical scheme, need a multiplexer (MUX MUX, and to carry out feedback data length be 64 bits.Yet these class methods have two shortcomings: (1). 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.
In view of the problem of above-mentioned existence,
The objective of the invention is to develop a kind of processing method 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 processing method, 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/address 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 initial 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;
In computer software technology, can be by the funcall of DOS, acquisition is by the high memory of the computer of user's control, obtain the start address and the size of high memory piece, 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 initial 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 USER_K i(wherein N is a user key length for i=1, N) 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. all can be 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;
As period, as first noise source, last byte is as second noise source first byte of user key the size of key that replenishes; 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 this 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, as shown in Figure 4 above-mentioned the first byte logic multiply 1FH of supplementary key;
To user key USER_K i(i=1, N, wherein N is a user key length), to carry out the operations that pseudo random number handles be such to high 4 of its each byte: the user key length N as period, first byte of user key as first noise source, the 16th byte of user key or the last byte of supplementary key as second noise source, and make i=1, 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 user key USER_K iHigh 4 XOR second noise sources low 4, give user key USER_K the result of XOR iHigh 4, if high 4 of second noise source are not equal to zero, then user key USER_K iHigh 4 XOR second noise sources high 4, give user key USER_K the result of XOR iHigh 4, the input of second noise source in the The above results as next one circulation circulated, as circulation and do not finish, variable i is added 1, get back to the beginning of loop body again, carry out the operation in the loop body, then enter next step as loop ends, as shown in Figure 5 above-mentioned;
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, export sub-key K that each is organized after the compressed again displacement 2 respectively i(i=1,32), 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, promptly No. 115 bit of the source key after the ordering, as C 0D 0No. 1 bit, No. 99 bit of source key after the ordering as C 0D 0No. 2 bit, the rest may be inferred;
Compression displacement 2 is seen shown in Figure 9, promptly C iD iNo. 14 bit as K iNo. 1 bit, C iD iNo. 27 bit as K iNo. 2 bit, the rest may be inferred;
To the source file grouping of sliding, processing method 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, wherein N is a natural number; Then again in reverse mode to the The above results grouping of sliding, promptly from the grouping that begins to slide of the afterbody of the DS of The above results, the processing method of the grouping of sliding is identical with forward, as shown in figure 11, wherein N is a natural number;
During encryption, the method for handling fragment is to increase some information in the back of cleartext information, and the specific information that the information that is increased must include a byte is a fragment length, and remaining newly-added information is filled with pseudo random number; Its way be (fragment length 1) as period, if period equals zero, directly the fragment length information of a byte is delivered to the fragment district; If period is not equal to zero, 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, do not finish as circulation, 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 the fragment length information of a byte, as shown in figure 12; In when deciphering, according to the fragment length information of last byte the information that increases newly is blocked, intactly recover the looks of former plaintext;
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 the encryption (or deciphering) of each code block, 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, 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, finishes then to get back to the beginning of loop body as circulating, and carries out the operation in the loop body, finished then the result to be write in the file destination as circulation, specifically seen shown in Figure 13;
The staircase chart of DEA such as Figure 14, 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 14; The scheme of initial permutation such as Figure 15, the operation of initial permutation is, the plaintext (ciphertext) for 128 bits of input is numbered 1,2,3 according to sequence of positions ..., 127,128; No. 122 bit of input, as No. 1 bit of output, No. 114 bit of input, as No. 2 bit of output, the rest may be inferred; 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, and 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, to the i time iteration use 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); Scheme such as Figure 16 of contrary initial permutation, the operation of contrary initial permutation is result data 128 bits product of transformation, is numbered 1 according to sequence of positions, 2,3 ..., 127,128, No. 80 bit of input, as No. 1 bit of output, No. 16 bit of input, as No. 2 bit of output, the rest may be inferred;
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 17, 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 18 has represented the rule of transform expansion, and 64 Bit datas of input are numbered 1,2 according to sequence of positions ..., 63,64, the number of each bit of input by shown in Figure 180, is continued to form 96 Bit datas of output from left to right, line by line mutually; It becomes the input data of 64 bits the dateout 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 19, shown in Figure 20,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 dateout 64 bits that close box substitutes;
The program circuit of conversion E as shown in figure 21, conversion E is a kind of displacement, 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, as do not find, then make SX 0=7, 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, be not equal to zero, see then whether merchant's least-significant byte waits zero as the merchant, 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 schematic diagram of the present invention
Fig. 2. file encryption processing method sketch plan
Fig. 3. obtain the program diagram 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 schematic diagram
Figure 11. reverse slip grouping schematic diagram
Figure 12. handle the method program figure of fragment
Figure 13. source file is encrypted the program diagram of (or deciphering)
Figure 14. the staircase chart of DEA
Figure 15. initial permutation method figure
Figure 16. contrary initial permutation method figure
Figure 17. the logic diagram of encryption function
Figure 18. transform expansion method figure
Figure 19. preceding 8 the close charts in the close box
Figure 20. back 8 the close charts in the close box
Figure 21. the program diagram of conversion E
According to file encryption processing method discussed above, just can form by operations such as further detailed design, programming, compiling, connections the external encryption command file of operating system, (or with suffix " EXE " executable file). In order to improve the quality of encrypted command file, to note in the embodiment of this invention the problem of the following aspects: (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 computer, for the computer that 32 bit registers are arranged, will use as best one can the machine instruction that can carry out 32 bit manipulations, this can be very helpful when reducing machine. The funcall that also will utilize fully resource among the read-only memory ROM on the computer and operating system to provide. 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 computer allows, according to the technology that present operating system provides, once can encrypt the data file of 1 Mbytes length, namely can encrypt a Chinese book of nearly 500,000 words. Otherwise, decipher as the same. (2). when programming, should use assembler language. (3). for operations such as compiling, connections, the specification 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 operating procedure 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 computer, 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, computer just automatically reads in internal memory to this command file, and gives it control. This order can demonstrate some relevant information at screen when carrying out, the user makes respectively answer 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 computer. Commonly used is that the encrypted command file on the floppy disk is copied on the hard disk, allows computer 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 produces can be delivered on the relevant external equipment easily. Such as, printer, magnetic tape station, disc unit, display and communication interface etc.
If it is necessary that the user thinks, can also be encrypting for the first time the file destination that produces 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 for the image digitization signal 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 minicom.
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 DES algorithm and the mutation thereof of present home and abroad, and following useful technique effect 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 at least big 6.7 * 1015Doubly, decode the possibility of key no better than zero.
2. in substituting close box, 16 close tables are arranged; Identical line number, the element of row number in each close table are different; In each close table, same each element value difference that lists is not identical with each element in the delegation yet. 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 " flight data recorder ". In encryption function, it is formed by connecting with alternative close box and is integrated. 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 arranged. (2). do not need the initializaing variable IV among the cryptographic block chaining method CBC, so that the present invention is 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, be operand that data file is placed on the high-end of calculator memory, so just can the data file of certain-length be encrypted (or deciphering), 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.
Embodiment:
For the information of some type, such as audio digital signal, between its different Serial No. in correspondence with each other partial data repeatability seldom.For such cryptographic object, as mentioned above, when source file is divided into groups, just do not need to carry out slide; Do not need each code block is carried out shuttle cryptographic operation yet.It implements to specialize ground, and details are as follows:
A kind of file encryption processing method, 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/address bus between them, as shown in Figure 1;
We can (Fig. 1) deposit the encrypted command file in memory block A, memory block B (Fig. 1) deposits encryption (or deciphering) object, be source file and file destination, the initial 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;
In computer software technology, can be by the funcall of DOS, acquisition is by the high memory of the computer of user's control, obtain the start address and the size of high memory piece, 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 initial address of the operating position decision memory block B of the length of this source file and memory source; Source file among the memory block B is divided into groups, calculate the block code number of blocks and handle fragment, then each code block of source file is carried out cryptographic algorithm;
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 USER_K i(wherein N is a user key length for i=1, N) 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;
As period, as first noise source, last byte is as second noise source first byte of user key the size of key that replenishes; 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, as shown in Figure 4 above-mentioned the first byte logic multiply 1FH of supplementary key;
For user key USER_K i(i=1, N, wherein N is a user key length), to carry out the operations that pseudo random number handles be such to high 4 of its every byte: user key length as period, first byte of user key as first noise source, the last byte of the 16th byte of user key or supplementary key as second noise source, and make i=1, 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 user key USER_K iHigh 4 XOR second noise sources low 4, give user key USER_K the result of XOR iHigh 4, if high 4 of second noise source are not equal to zero, then user key USER_K iHigh 4 XOR second noise sources high 4, give user key USER_K the result of XOR iHigh 4, the input of second noise source in the The above results as next one circulation circulated, as circulation and do not finish, variable i is added 1, get back to the beginning of loop body again, carry out the operation in the loop body, then enter next step as loop ends, as shown in Figure 5 above-mentioned;
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, export sub-key K that each is organized after the compressed again displacement 2 respectively i(i=1,32), 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, promptly No. 115 bit of the source key after the ordering, as C 0D 0No. 1 bit, No. 99 bit of source key after the ordering as C 0D 0No. 2 bit, the rest may be inferred;
Compression displacement 2 is seen shown in Figure 9, promptly C iD iNo. 14 bit as K iNo. 1 bit, C iD iNo. 27 bit as K iNo. 2 bit, the rest may be inferred;
Source file is divided into groups every group of 16 bytes; The method of calculating code block quantity and fragment length is to get file size earlier divided by 16, as encrypting then (merchant+1) as the merchant, then (16-remainder) as fragment length, the merchant to code block quantity; As deciphering, then directly give code block quantity the merchant;
During encryption, the method for handling fragment is to increase some information, and the specific information that the information that is increased must include a byte is a fragment length, and remaining newly-added information is filled with pseudo random number; Its way is that as period, period equals zero (fragment length-1), directly the fragment length information of a byte is delivered to the fragment district; Period is not equal to zero, 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 the fragment length information of a byte, as shown in figure 12; In when deciphering, according to the fragment length information of last byte the information that increases newly is blocked, intactly recover the looks of former plaintext;
For the operation of DEA etc. as noted earlier constant.
Now with concrete example performance of the present invention is described, supposing has individual source file, and its content is: AAAAAAAAAAAAAA, and totally 14 byte longs suppose that again user key is ABCDEFGHIJKLMN, totally 14 byte longs, its cryptographic operation is as follows so:
At first, user key is replenished, by the acquiring method of above-mentioned supplementary key, can get its two keys that replenish as calculated and be: FBH, 5FH.First supplementary key FBH logic multiply 1FH, two keys that obtain at last replenishing should be: 1BH, 5FH again.High 4 user key are carried out the pseudo random number processing, obtain source key at last and are: 21H, E2H, 13H, A4H, 15H, 06H, 57H, 28H, 69H, BAH, 2BH, FCH, 9DH, 1EH, 1BH, 5FH.From can seeing here, 14 bytes in front of source key low 4 be respectively 1,2,3 ... D, E, they have user key information, and high 4 be original " 4 " no longer just, but displays certain random character.Be not easy to expose people's behavioural habits like this, increase and decode difficulty.
Then each bit opsition dependent of source key is arranged in proper order, the form that then forms 0,1 Serial No. of source key is:
0010 0001 1110 0010 0001 0011 1010 0100
0001 0101 0000 0110 0101 0111 0010 1000
0110 1001 1011 1010 0010 1011 1111 1100
1001 1101 0001 1110 0001 1011 0101 1111
Of the operation of this 0,1 Serial No., can get by compression displacement 1:
0 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0
1 1 1 1 0 0 0 0 1 1 1 0 0 1 1 0
1 0 1 0 1 0 1 0 1 1 1 1 0 0 0 0C 0=0 0 1 1 0 0 1 1 D 0=1 0 1 0 0 0 0 1
1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 0 0 0 0 1 0 0 1 1 0 0
0 0 0 1 1 0 0 0 1 1 0 0 1 1 1 0
C 0Move to left 1, D 0Move to left 1, can get:
0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 1
1 1 1 0 0 0 0 1 1 1 0 0 1 1 0 1
0 1 0 1 0 1 0 0 1 1 1 0 0 0 0 1C 1=0 1 1 0 0 1 1 1 D 1=0 1 0 0 0 0 1 1
0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0
1 1 1 1 0 0 0 0 1 0 0 1 1 0 0 1
0 0 1 1 0 0 0 0 1 0 0 1 1 1 0 1
C 1D 1The Serial No. of forming can be tried to achieve first group sub-key K by the operation of compression displacement 2 1For:
01100111 01110001 00110101
01111100 01101100 11010000
00111110 10000110 10010110
00,001,101 00,010,110 11111011 similarly, can try to achieve K 2, K 3... K 32Numerical value.
Then source file is carried out fragment and handle, making source file become is 16 byte longs.According to the method for aforementioned calculation fragment length and numerical value, because the first byte of source key is 21H, last byte is 5FH, so learn as calculated: first byte of fragment is 39H, and second byte is that the fragment length information is 02H.Through such processing, the content of cryptographic object then is:
41H,41H,41H,41H,41H,41H,41H,41H,41H,41H,41H,41H,41H,41H,39H,02H。
The method of operation that this cryptographic object is pressed initial permutation, then each bit value of the output of its initial permutation is as follows:
0011 1111 1111 1111 0100 0000 0000 0000
0000 0000 0000 0000 0111 1111 1111 1111
0000 0000 0000 0000 0100 0000 0000 0000
0100 0000 0000 0000 1000 0000 0000 0000
0, the 1 Serial No. O that forms of its odd bytes so 0For:
0011 1111 0100 0000 0000 0000 0111 1111
0000 0000 0100 0000 0100 0000 1000 0000
0, the 1 Serial No. E that its even bytes is formed 0For:
1111 1111 0000 0000 0000 0000 1111 1111
0000 0000 0000 0000 0000 0000 0000 0000
E 0Operate by the transform expansion rule, it is as follows then to obtain its result:
01111111 11101000 00000000 00000000 00010111 11111110
10000000 00000000 00000000 00000000 00000000 00000001
The result of transform expansion and sub-key K 1Carry out xor operation, can obtain:
000110 001001 100100 110101 011111 000111 101100 101110
101111 101000 011010 010110 000011 010001 011011 111010
Input this Serial No. substitutes as close box substitutes through close box, and it is as follows to get its output:
0110 1100 0110 1000 1100 0011 0101 1111
0101 1010 0110 1001 1101 1110 0110 1111
The input of this Serial No. as conversion E, by the pseudo random number replacement operator of conversion E, it is as follows to get its output:
1100 0010 0011 1111 0110 1000 0110 1001
0001 1101 1001 0111 0110 1001 1101 0111
The odd bytes of the XOR as a result O of above-mentioned conversion E 00,1 Serial No. of forming obtains E 1:
1111 1101 0111 1111 0110 1000 0001 0110
0001 1101 1101 0111 0010 1001 0101 0111
From the above, in product of transformation, O 1=E 0, 0,1 Serial No. that the result formed of iteration is so for the first time:
1111 1111 1111 1101 0000 0000 0111 1111
0000 0000 0110 1000 1111 1111 0001 0110
0000 0000 0001 1101 0000 0000 1101 0111
0,000 0,000 0,010 1,001 0,000 0,000 0,101 0111 because O i=E I-1, analogize according to above-mentioned, as long as each E iObtain the iteration result that can obtain each time subsequently respectively in turn.
As shown in Figure 15, initial permutation lists the 5th row, the 16th that No. 1 bit of input has been placed on output, promptly is placed on No. 80 bit of output; As shown in Figure 16, contrary initial permutation lists the 1st row, the 1st that No. 80 bit of input is placed on output, promptly be placed on No. 1 bit of output, this is because against initial permutation and initial permutation inverse operation each other, so both do not have difference in essence in operation.The operation of the output result of product of transformation, can obtain ciphertext by contrary initial permutation.
For this example, we have following a series of data: E 0=11,111,111 00,000,000 00,000,000 11,111,111 00,000,000 00,000,000 00000000
00000000E 1=11111101 01111111 01101000 00010110 00011101 11010111 00101001
01010111E 2=01110110 10100101 10110101 00101010 10001111 01100011 00010101
1010 0011E 3=01001000 00110010 01110010 10111101 00010001 00011011 00010101
1,100 1000 and so on.
Because O i=E I-1So,, here only the caused E of each time ciphering process iVariation investigate, the E of adjacent each time iCompare, promptly find out E iWith E I-1On the position of correspondence, have the bit of identical numerical value between the Serial No., calculate its sum then, be made as HM i, can obtain so: HM 1=30 HM 2=29 HM 3=30 average HM equal 29.7.This just shows: each input that ciphering process produced is compared with output, said have the bit of half to change on the meaning of statistics, the bit no change of half is arranged.This has just illustrated: ciphering process is to have played the effect of encrypting.
In addition, we can obtain each E iIn the number of bits sum that contains " 1 ", be made as BN i, can obtain so: BN 0=16 BN 1=38 BN 2=33 BN 3=27 for E 0, to encrypt as yet, systematicness is the reflection of cleartext information clearly.So adding overstocked E iCorresponding BN iAverage, get BN=32.7.Because E iTotal length be 64 bits, this understands on the other hand that also ciphering process has played the effect of encrypting.
The process of deciphering is similar with encryption, and just when deciphering, that the i time iteration is used is sub-key K 33-i, and E i=O I-1, O i=F (O I-1) E I-1, described i=1,32.

Claims (7)

1. file encryption processing method, through initial permutation, product of transformation, contrary initial permutation operation, formed calculating institute's program and computer storage system, and/or computer communication system, and/or computer Chinese and English operating system combines, finish encryption, deciphering, it is characterized in that data:
(1). user key is obtained by keyboard; User key length can change between 1~16 byte;
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, carry out 32 times following operation then: C I-1, D I-1Become C through logical shift iD i, the sub-key K of compressed again displacement 2 back outputs 12 byte longs i, described i=1,32:
(A). the operating procedure of compression displacement 1 is illustrated in the following table 1,
115 99 83 67 51 35 19 3
117 101 85 69 53 37 21 5
119 103 87 71 55 39 23 7
123 105 89 73 57 41 25 9
125 107 91 75 59 43 27 11
127 109 93 77 61 45 29 13
114 98 82 66 50 34 18 2
128 112 96 80 64 48 32 16
126 110 94 78 62 46 30 14
124 108 92 76 60 44 28 12
122 106 90 74 58 42 26 10
120 104 88 72 56 40 24 8
118 102 86 70 54 38 22 6
116 100 84 68 52 36 20 4
Table 1 is as C the 115th bit of input 0The 1st bit, the input the 99th bit as C 0The 2nd bit, the rest may be inferred; The input the 128th bit as D 0The 1st bit, the input the 112nd bit as D 0The 2nd bit, the rest may be inferred;
(B). the C that logical shift produces i, D iBe by function LM iWith C I-1, D I-1Decision respectively is promptly by shown in the following formula: C i=LM i(C I-1) D i=LM i(D I-1) i=1 wherein, 32, the displacement of function LMi presentation logic, its concrete operations are: work as i=1,2,9,16,17,18,25,32 o'clock, variable C I-1Or D I-11 of ring shift left is when i is worth for other, variable C I-1Or D I-12 of ring shift lefts;
(C). the operating procedure of compression displacement 2 is illustrated in the following table 2,
14 27 31 1 6 101 93 80 4 94 43 26 67 59 15 97
23 57 36 75 50 109 39 9 49 105 69 7 32 72 86 52 102 66 28 78 112 11 38 60 91 8 87 47 81 62 17 103
54 96 16 88 34 110 84 42 73 58 85 21 99 51 2 79
45 111 46 89 56 10 74 68 55 5 106 37 70 95 48 22
13 19 77 104 24 40 90 63 30 108 33 64 20 98 41 82
Table 2 is promptly C iD iNo. 14 bit as K iNo. 1 bit, C iD iNo. 27 bit as K iNo. 2 bit, the rest may be inferred, described i=1,32;
(2) source file being carried out piecemeal, is the text of digital signal or the file of forms such as image or sound or figure or form or built-in function or executable program for the source file as encryption or deciphering object; Source file is divided into groups by every code block 16 byte lengths; The method of handling fragment is to increase some information, and it is fragment length that the information that is increased must include a specific information, and remaining newly-added information is filled with pseudo random number; During deciphering, the information that increases newly is blocked, intactly recover the looks of former plaintext according to the fragment length information;
(3) described each code block is implemented cryptographic algorithm, import the plaintext of 128 bits or ciphertext and length and be 32 of the sub-keys of 16 bytes, its output is the ciphertext of 128 bits or expressly:
(A). the scheme of initial permutation is, the bit B of input 2j+8iWord W as output jThe i position, this moment j=1,4, the bit B that imports (2j-9)+8iWord W as output jThe i position, this moment j=5,8, described i=0,15;
(B). 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, and 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 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, during deciphering, the i time iteration has been used sub-key K 33-i, and E i=O I-1, O i=F (O I-1) E I-1Described i=1,32;
(C). the scheme of contrary initial permutation is such: make IN 1=80, IN 2=16, IN 3=96, IN 4=32, IN 5=112, IN 6=48, IN 7=128, IN 8=64, (the IN of input i-j+1) bit is as the byte BYTE of output j(8-i) position, this moment j=1,16, i=1,8;
Described encryption function F by transform expansion, the computing of XOR sub-key, close box substitute, conversion E formed, data for 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:
(a). the operation of described transform expansion is such: for 64 bits of input, at first be divided into 16 groups since second bit order, every group 4 bit, and first bit is placed on the 62nd, 63,64 bits forms last group afterwards, promptly form following arrangement: 23456789
10 11 12 13 ... 62 63 64 1 are extended to 6 bits to each group then, the method of expansion is that back 2 bit-order of each group are copied in its back, promptly forms following arrangement: 234545678989
10 11 12 13 12 13 ... 62 63 64 1 64 1
At last, two bits in back of last group after the expansion promptly the 64th, the 1st bit-order move first group the front that is placed on after the expansion, just formed the output result of transform expansion;
(b). 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, 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, and 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, become dateout 64 bits that close box substitutes, described close table such as following table 3, table 4: Row numbers 0123456789 10 11 12 13 14 15 The capable 0 No. 123 S1 S2 S3 S4 S5 S6 S7 of S0 15 1 5 6 10 9 4 12 8 11 2 7 3 0 13 14 6 5 15 10 9 4 1 2 0 7 13 12 11 14 8 3 8 6 14 1 3 7 9 0 12 10 5 4 2 11 15 13 1 2 0 8 11 5 10 13 9 14 6 15 4 7 3 12 10 2 7 8 4 6 15 5 9 0 1 13 14 12 3 11 15 6 2 9 12 3 0 8 7 5 11 10 4 13 14 1 9 0 15 4 2 10 1 3 13 11 6 5 7 14 8 12 0 14 6 7 15 13 9 10 8 1 3 4 11 2 12 5 14 10 8 7 3 5 2 6 15 9 0 4 12 11 1 13 7 4 1 8 15 0 5 10 3 6 12 11 9 2 13 14 1 7 6 12 5 9 11 8 10 2 14 3 4 13 0 15 10 15 2 0 12 14 1 11 7 8 13 6 5 4 9 3 13 0 10 5 9 8 14 3 11 1 15 12 6 7 2 4 8 7 0 1 11 15 4 9 5 13 10 14 3 12 6 2 2 1 5 3 4 11 12 7 15 9 13 10 8 0 14 6 11 5 4 2 3 12 0 14 6 15 8 13 10 9 7 1 7 9 6 4 2 13 5 11 12 10 14 1 15 3 0 8 3 2 5 7 14 1 8 0 6 4 15 9 13 10 11 12 10 15 4 2 7 12 0 5 14 8 9 11 6 1 13 3 9 6 15 5 13 10 4 1 3 11 7 14 2 12 8 0 3 11 9 2 8 12 13 4 7 5 10 6 1 15 14 0 9 8 6 3 10 14 7 1 4 2 0 15 12 11 5 13 11 14 7 0 1 13 10 2 5 6 1 9 15 4 3 8 8 7 14 4 0 11 3 15 12 10 5 2 6 1 13 9 8 4 15 9 5 10 3 1 2 12 13 0 11 14 7 6 5 14 9 12 8 11 6 13 1 10 4 7 2 0 3 15 14 10 3 13 12 8 5 6 11 4 7 15 9 2 1 0 4 3 10 15 1 9 11 12 5 2 14 8 13 6 0 7 4 3 2 10 12 15 6 9 1 8 7 14 0 13 11 5 14 12 8 11 1 13 9 3 10 0 6 5 7 15 2 4 0 9 13 6 11 14 8 15 4 3 1 7 12 10 5 2 3 13 1 9 6 0 7 8 2 12 10 11 14 5 4 15
Table 3 Row numbers 0123456789 10 11 12 13 14 15 S8 line number 0123 S9 S10 S11 S12 S13 S14 S15 6 5 14 0 15 11 8 7 10 13 12 2 4 1 9 3 0 11 7 6 3 5 14 12 15 9 2 13 1 4 10 8 13 2 1 5 6 15 3 14 9 7 10 8 0 12 4 11 2 4 3 1 10 7 12 5 13 0 11 9 15 8 6 14 0 13 12 11 6 7 1 8 14 3 9 15 2 5 4 10 11 3 14 5 2 12 10 4 13 1 8 6 15 9 0 7 5 8 0 14 10 6 15 9 3 12 2 1 13 7 11 4 13 0 11 10 14 4 8 2 1 9 12 7 3 15 5 6 2 8 4 12 7 14 0 13 5 15 11 3 9 6 10 1 1 10 3 4 13 6 11 15 12 8 9 2 14 5 7 0 12 5 9 11 8 0 2 4 1 14 15 13 10 3 6 7 7 9 12 3 5 15 13 0 10 6 4 1 8 14 2 11 5 12 11 3 14 1 7 0 13 2 8 9 10 4 6 15 10 9 4 15 0 2 13 14 8 3 5 1 6 7 12 11 3 13 8 10 9 5 4 1 2 15 0 12 11 6 7 14 12 8 13 11 2 6 5 9 4 7 15 0 1 3 14 10 12 15 0 1 11 4 9 2 3 14 6 5 13 10 8 7 4 13 10 0 7 9 12 6 2 11 14 3 8 1 15 5 7 3 12 15 13 1 6 11 8 0 4 2 14 5 9 10 15 1 9 6 4 8 14 3 11 5 2 12 7 0 10 13 9 6 1 15 13 2 10 14 0 4 3 11 7 8 5 12 2 0 11 13 6 10 15 7 14 12 1 8 5 3 4 9 15 11 2 7 0 4 13 10 6 1 8 14 3 9 12 5 5 12 8 14 7 3 6 4 15 13 0 10 9 11 1 2 1 7 13 14 0 3 11 15 4 6 5 10 8 2 12 9 13 15 12 2 5 8 3 11 9 14 7 4 0 6 1 10 6 4 11 9 15 2 14 12 7 13 3 0 5 8 10 1 14 11 7 13 8 1 2 6 0 3 9 5 12 10 15 4 11 14 3 13 1 0 12 10 6 7 4 8 5 9 15 2 12 1 13 14 4 7 2 5 11 15 3 0 10 8 9 6 4 12 10 8 14 3 7 13 0 5 11 6 1 15 2 9 6 10 5 12 9 2 15 7 14 4 1 3 0 13 11 8
Table 4
(c). conversion E is a kind of replacement operator that produces pseudo random number, substitutes the input of resulting 64 Bit datas as this process by close box, for the SX of input 8 bytes i, search for SX from head and the tail respectively iNonzero value, as do not find, then make SX 0=7, SX iAs result's output of encryption function F, described i=0,7; As found, then utilize 8 byte datas of input, produce the replacement operator of pseudo random number, obtain the dateout of 8 bytes.
2. according to independent claims 1 described file encryption processing method, it is characterized in that, obtain source key,, supply 16 bytes to key length when user key length during less than 16 bytes by user key; And high 4 of the every byte of user key are carried out pseudo random number and handle.
3. file encryption processing method according to claim 2 is characterized in that, as period, as first noise source, last byte is as second noise source first byte of user key the size of key that replenishes; 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 logic multiply 1FH of supplementary key.
4. file encryption processing method according to claim 2 is characterized in that, for user key USER_K i, described i=1, N, N are the natural number of 2≤N≤16, it is such carrying out to its high 4 that pseudo random number handles: user key length as period, the first byte USER_K of user key 1As first noise source, the 16th byte USER_K of user key 16Or the last byte of supplementary key is as second noise source, and makes i=1; 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, then user key USER_K iHigh 4 XOR second noise sources low 4, if high 4 of second noise source are not equal to zero, then user key USER_K iHigh 4 XOR second noise sources high 4, give user key USER_K the result of XOR iHigh 4; The input of second noise source in the The above results as next circulation circulated, not finish, variable i is added 1, get back in the loop body again and begin, carry out the operation in the loop body, then enter next step as loop ends as circulation.
5. file encryption processing method according to claim 1 is characterized in that, described source file is carried out piecemeal, and to the source file grouping of sliding, processing method is undertaken by forward and reverse two kinds of operations; Its forward slides: divide group objects the content of source file as sliding, its front 16 bytes as first code block, each later code block all is two bytes in the back of the encryption of last group code piece or decrypted result the first two byte as a back code block, and 14 bytes that continue are then taken from the data in the branch group objects that slides in proper order accordingly; Then again with the grouping of sliding of reverse mode, promptly since the grouping of sliding of the afterbody of a data series, it is that aforementioned positive is slided and divided the result data of group objects that reverse slip divides group objects;
The method of handling fragment is to increase some information, and it is fragment length that the information that is increased must include a specific information, and remaining newly-added information is filled with pseudo random number; During deciphering, the information that increases newly is blocked, intactly recover the looks of former plaintext according to the fragment length information.
6. file encryption processing method according to claim 1, it is characterized in that, described to each code block execution cryptographic algorithm, to encrypting or decipher the form of back and forth carrying out of having taked, its method is to be begun successively each grouping code block that slides to be encrypted or deciphered by file header for the first time, 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 the deciphering of reverse mode 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 as circulation.
7. file encryption processing method according to claim 1 is characterized in that, described conversion E produces the operation of pseudo random number, is that handle is 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, be not equal to zero, see then whether merchant's least-significant byte waits zero as the merchant, 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 iAs result's output of encryption function F, described i=0,7.
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 CN1109187A (en) 1995-09-27
CN1102310C true 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)

Families Citing this family (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
US10797722B2 (en) * 2016-06-10 2020-10-06 The Boeing Company System and method for providing hardware based fast and secure expansion and compression functions
CN108133147B (en) * 2017-12-20 2023-12-22 中兴通讯股份有限公司 Method and device for protecting executable code and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0403456A2 (en) * 1989-06-16 1990-12-19 Telia Ab Encryption circuit
JPH067930A (en) * 1992-05-08 1994-01-18 Sony Corp Device for applying flux
WO1994009579A1 (en) * 1992-10-20 1994-04-28 Xlnt Designs, Inc. Ring network security system
EP0605047A1 (en) * 1992-12-29 1994-07-06 Koninklijke KPN N.V. Method for blockwise encryption/decryption using linear algebraic codes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0403456A2 (en) * 1989-06-16 1990-12-19 Telia Ab Encryption circuit
JPH067930A (en) * 1992-05-08 1994-01-18 Sony Corp Device for applying flux
WO1994009579A1 (en) * 1992-10-20 1994-04-28 Xlnt Designs, Inc. Ring network security system
EP0605047A1 (en) * 1992-12-29 1994-07-06 Koninklijke KPN N.V. Method for blockwise encryption/decryption using linear algebraic codes

Also Published As

Publication number Publication date
CN1109187A (en) 1995-09-27

Similar Documents

Publication Publication Date Title
US5454039A (en) Software-efficient pseudorandom function and the use thereof for encryption
US8683218B2 (en) System and method for N-dimensional encryption
CN103152168B (en) Processor and instruction for Advanced Encryption Standard (AES)
CN1168041A (en) Encryption/decryption method and encryption/decryption apparatus
CN1172235C (en) Extended secret key generator, encryption/decryption element, extended secret key producing method and storage medium
Chen et al. A modified chaos-based joint compression and encryption scheme
US20060126843A1 (en) Method and apparatus for increasing the speed of cryptographic processing
US9270462B2 (en) Method and system for conducting high speed, symmetric stream cipher encryption
EP0839418A1 (en) Cryptographic method and apparatus for non-linearly merging a data block and a key
JPH1173101A (en) High speed block ciphering method, and medium usable in computer
US7801301B2 (en) Method and circuit for data encryption/decryption
WO2000070819A1 (en) Cryptographic engine using base conversion, logic operations and prng in data arrays to increase dispersion in ciphertext
CN1875568A (en) Transmitting apparatus, receiving apparatus, and data transmitting system
CN112199696A (en) Encryption and decryption method based on white-box block cipher
CN1133297C (en) A kind of file encryption processing method
Paje et al. Multidimensional key RC6 algorithm
CN1102310C (en) Method and floppy disk for file encryption
CN1258148C (en) Encryption, decryption method using high security level symmetry secret key algorithm and its encipherer
JP2004361969A (en) Ciphering method
CN1180351C (en) Encrypting method for reinforcing disordered block cipher
CN1835586A (en) Stream cipher generator, random digit generation method, encrypting system and encryption method
US20030165242A1 (en) Confusion encryption
KR20060012002A (en) A hardware implementation of the mixcolumn/invmixcolumn functions
EP1016240A1 (en) Improved block cipher method
CN116112170A (en) Stream cipher encryption and decryption method based on integer arithmetic cryptography substitution

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