CN100359494C - Electronic file characters internal code transformation encryption method - Google Patents

Electronic file characters internal code transformation encryption method Download PDF

Info

Publication number
CN100359494C
CN100359494C CNB031250580A CN03125058A CN100359494C CN 100359494 C CN100359494 C CN 100359494C CN B031250580 A CNB031250580 A CN B031250580A CN 03125058 A CN03125058 A CN 03125058A CN 100359494 C CN100359494 C CN 100359494C
Authority
CN
China
Prior art keywords
carry out
character
computing
fixed value
file
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
CNB031250580A
Other languages
Chinese (zh)
Other versions
CN1542628A (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.)
Jiangnan Industries Group Co Ltd
Original Assignee
JIANGNAN MACHINERY (GROUP) CO Ltd
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 JIANGNAN MACHINERY (GROUP) CO Ltd filed Critical JIANGNAN MACHINERY (GROUP) CO Ltd
Priority to CNB031250580A priority Critical patent/CN100359494C/en
Publication of CN1542628A publication Critical patent/CN1542628A/en
Application granted granted Critical
Publication of CN100359494C publication Critical patent/CN100359494C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention discloses an internal code transformation encryption method of electronic file characters. The present invention has the technical scheme in that any encryption character string can be set, and one character is orderly taken from the encryption character string each time; stored character machine inner codes of computer electronic files is carried out for mathematical algorithmic transformation. The present invention enhances the complexity of the encryption algorithm and alters the variate KEY in each encryption; encryption files do not contain encrypted passwords to realize the encryption and the decryption of electronic files; the present invention has the characteristics that the present invention can effectively enhance the safety of electronic files, and the encryption can not be easily worked out, etc.

Description

E-file character ISN transposition encryption method
Technical field: the present invention relates to a kind of computer software technology, particularly e-file character ISN transposition encryption method.
Background technology: in background technology, flourish along with computer technology, types of applications software is also increasing, and these application software generally all can produce corresponding e-file, as word document, cad drawing, jpg picture etc.If comprise security information in these files, but these e-files are not carried out encryption, the content in these e-files is easy to be seen by the people or steal so.Be solving the security management problem of e-file, mainly is to adopt complicated software cryptography algorithm to e-file, and every plaintext of e-file is transformed into corresponding ciphertext.Even encrypt file is stolen, generally can't reads correct information, thereby reach the purpose of protection sensitive data.Usually cryptographic algorithm and decipherment algorithm are present in the application program, cause its security to be subjected to a certain degree restriction, more easily are cracked, and encryption software commonly used such as office office software, encipherors such as winzip, winrar are cracked this point just can be described.For overcoming these defectives, e-file character ISN transposition encryption method is studied.
Summary of the invention: technical matters to be solved by this invention provides a kind of e-file character ISN transposition encryption decryption method, and it can improve the security of e-file effectively, makes it be not easy to crack.
The technical solution adopted for the present invention to solve the technical problems is that it comprises:
(1), arbitrary encrypted characters string that comprises letter, numeral, control character, Chinese and combination thereof is set, the each order of encrypted characters string is got a character, after carrying out ORD computing (obtaining the character ISN) to every, carry out additive operation with fixed value 1, carry out multiplying with fixed value 10, and carry out subtraction with fixed value 9, the result who at every turn obtains circulates and adds up, obtain WORD (16 unsigned ints) type integer S at last, S is composed to variable KEY;
(2), create internal memory stream M1, M2, the file F that will encrypt read source internal memory stream M1, and the pointer of M1 is moved on to the first place; Then, following process is carried out in circulation: the current character of M1 is carried out getting the character ISN after the ORD computing, and this moment, pointer moved on to next character position automatically, and the character ISN is composed to variable C;
(3), after KEY and fixed value 8 are carried out SHR computing (binary bit value moves to right), carry out XOR computing (the logical difference exclusive disjunction of step-by-step) with C, carry out NOT computing (carrying out the reverse computing of binary value by turn) again, then the result is composed to C, again C is write the end of M2;
(4), KEY carries out additive operation with C again, and with the result again fixed value C1 carry out multiplying, carry out additive operation with fixed value C2 again, the result composes to KEY again;
(5), when reading the end of M1 in (2) step, withdraw from circulation, and the content of M2 exports as file F, so far, file F has become ciphertext, ciphering process is finished;
(6), when when deciphering, the encrypted characters string that the reading encrypted process is provided with obtains WORD type integer S according to the same quadrat method of (1) step, and S is composed to KEY;
(7), create internal memory stream M1, M2, the file F that will decipher read source internal memory stream M1, and the pointer of M1 is moved on to the first place; Then, following process is carried out in circulation: read the current character ISN of M1, this moment, pointer moved on to next character position automatically, and the character ISN is composed to variable C and D;
(8), after KEY and fixed value 8 carry out the SHR computing, carry out the XOR computing, carry out the NOT computing again, then the result is composed to C, this moment, C was transformed to expressly, C was write the end of M2 again with C;
(9), KEY carries out additive operation with D again, and with the result again fixed value C1 carry out multiplying, carry out additive operation with fixed value C2 again, the result composes to KEY again;
(10), when reading the end of M1 in (6) step, withdraw from circulation, and the content of M2 exports as file F, so far, file F has become expressly, decrypting process is finished.
The present invention compares the beneficial effect that is produced with background technology:
1, because the present invention is by computing machine e-file store character machine inner code is carried out the mathematical algorithm conversion, improved the complicacy of cryptographic algorithm, variable KEY when having changed each the encryption, and owing to do not contain Crypted password in the encrypt file, so the security that can improve e-file effectively makes it be not easy to crack.
Description of drawings:
Fig. 1 is an encryption flow block diagram of the present invention.
Fig. 2 is a deciphering FB(flow block) of the present invention.
Embodiment: suppose to have text F, its file content is " among the g ", Crypted password be "! #FA ", constant C1, the value of C2 is respectively 52845,22719.
With reference to accompanying drawing 1, ciphering process is as follows:
At first obtain "! " machine inner code be 33, suppose by following computing: (33+1) obtain result 331 behind the * 10-9, again " # ", " F ", " A " done same computing, obtain 341,651,701 respectively, after it is added up 2024, so far, the initial value of KEY is 2024.
Create internal memory stream M1, M2 behind file F importing M1, moves on to the first place with pointer.Following process is carried out in circulation:
Read the current character " g " of M1, obtaining machine inner code is 103, composes 103 and gives variable C.KEY and 8 carries out the SHR computing, and the result gets 7.C and 7 carry out after the XOR computing 96,96 carry out after the NOT computing 159, compose 159 and to give variable C; KEY and C carry out getting 2183 after the additive operation, 2183 with C1 carry out after the multiplying 115360635,115360635 with C2 carry out after the additive operation 115383354,115383354 binary code is got 16 (high-order amputation is not), getting binary sequence is " 1001110000111010 " (being decimal number 39994), and composes to KEY 39994.At this moment, the C variable is 159, and the KEY variable is 39994.C is write M2.
When circulation proceeds to for the second time, read be Chinese character " in " because the ISN of Chinese character is two character lengths, therefore, only read " in " first half of word, promptly obtain machine inner code and be " 214 ", " 214 " are composed to C, through same above computing, getting C at last is 181, and KEY is 31874, when being recycled to for the third time, " in " the latter half machine inner code of word is " 208 ", C be 83, KEY is 58736.
At last, M2 is exported to file F, promptly obtain the machine inner code formed by " 159 ", " 181 ", " 83 " sequence, correspond to character and just become " Gou S ", so far, finished ciphering process.
With reference to accompanying drawing 2, decrypting process is as follows:
To Crypted password "! #FA ", with last identical, at first obtain "! " machine inner code be 33, by following computing: (33+1) obtain result 331 behind the * 10-9, again " # ", " F ", " A " done same computing, obtain 341,651,701 respectively, after it is added up 2024, so far, the initial value of KEY is 2024.
Create internal memory stream M1, M2 will contain the file F importing M1 of ciphertext content for " Gou S ", and pointer is moved on to the first place.
Following process is carried out in circulation:
Read the first half of the current character " Gou " of M1, obtaining machine inner code is 159, composes 159 and gives variable C and D.KEY and 8 carries out the SHR computing, and the result gets 7.C and 7 carry out after the XOR computing 152,152 carry out after the NOT computing 103, compose 103 and to give variable C; KEY and D carry out getting 2183 after the additive operation, 2183 with C1 carry out after the multiplying 115360635,115360635 with C2 carry out after the additive operation 115383354,115383354 binary code is got 16 (high-order amputation is not), getting binary sequence is " 1001110000111010 " (being decimal number 39994), and composes to KEY 39994.At this moment, the C variable is 103, and the KEY variable is 39994.C is write M2.
When circulation proceeds to for the second time, what read is the latter half of " Gou ", promptly obtain machine inner code and be " 181 ", " 181 " are composed to C, through same above computing, getting C at last is 214, KEY is 31874, and when being recycled to for the third time, the machine inner code of " S " is " 83 ", getting C after computing is 208, and KEY is 58736.
At last, M2 is exported to file F, promptly obtain the machine inner code formed by " 103 ", " 214 ", " 208 " sequence, correspond to character and just become " among the g ".So far, finished decrypting process.

Claims (2)

1, a kind of e-file character ISN transposition encryption method is characterized in that it comprises:
(1), arbitrary encrypted characters string that comprises letter, numeral, control character, Chinese and combination thereof is set, the each order of encrypted characters string is got a character, after carrying out ORD computing (obtaining the character ISN) to every, carry out additive operation with fixed value 1, carry out multiplying with fixed value 10, and carry out subtraction with fixed value 9, the result who at every turn obtains circulates and adds up, obtain WORD (16 unsigned ints) type integer S at last, S is composed to variable KEY;
(2), create internal memory stream M1, M2, the file F that will encrypt read source internal memory stream M1, and the pointer of M1 is moved on to the first place; Then, following process is carried out in circulation:
By the ORD computing, read the current character corresponding characters ISN of M1, this moment, pointer moved on to next character position automatically, and the character ISN is composed to variable C;
After KEY and fixed value 8 are carried out SHR computing (binary bit value moves to right), carry out XOR computing (the logical difference exclusive disjunction of step-by-step), carry out NOT computing (carrying out the reverse computing of binary value by turn) again, then the result is composed to C, again C is write the end of M2 with C;
KEY carries out additive operation with C again, and with the result again fixed value C1 carry out multiplying, carry out additive operation with fixed value C2 again, the result composes to KEY again;
When above-mentioned circulation reads the end of M1, withdraw from circulation, and the content of M2 exports as file F, so far, file F has become ciphertext, and ciphering process is finished;
2, a kind of decryption method of e-file character ISN transposition encryption method correspondence is characterized in that it comprises:
(1), the each order of the encrypted characters string that will be provided with in the time of will encrypting is got a character, after carrying out ORD computing (obtaining the character ISN) to every, carry out additive operation with fixed value 1, carry out multiplying with fixed value 10, and carry out subtraction with fixed value 9, the result who at every turn obtains circulates and adds up, and obtains WORD (16 unsigned ints) type integer S at last, and S is composed to variable KEY;
(2), create internal memory stream M1, M2, the file F that will decipher read source internal memory stream M1, and the pointer of M1 is moved on to the first place; Then, following process is carried out in circulation: read the current character ISN of M1, this moment, pointer moved on to next character position automatically, and the character ISN is composed to variable C and D;
After KEY and fixed value 8 are carried out the SHR computing, carry out the XOR computing with C, carry out the NOT computing again, then the result is composed to C, this moment, C was transformed to expressly, C was write the end of M2 again;
KEY carries out additive operation with D again, and with the result again fixed value C1 carry out multiplying, carry out additive operation with fixed value C2 again, the result composes to KEY again;
When above-mentioned circulation reads the end of M1, withdraw from circulation, and the content of M2 exports as file F, so far, file F has become expressly, and decrypting process is finished.
CNB031250580A 2003-05-04 2003-05-04 Electronic file characters internal code transformation encryption method Expired - Fee Related CN100359494C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB031250580A CN100359494C (en) 2003-05-04 2003-05-04 Electronic file characters internal code transformation encryption method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB031250580A CN100359494C (en) 2003-05-04 2003-05-04 Electronic file characters internal code transformation encryption method

Publications (2)

Publication Number Publication Date
CN1542628A CN1542628A (en) 2004-11-03
CN100359494C true CN100359494C (en) 2008-01-02

Family

ID=34321794

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB031250580A Expired - Fee Related CN100359494C (en) 2003-05-04 2003-05-04 Electronic file characters internal code transformation encryption method

Country Status (1)

Country Link
CN (1) CN100359494C (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100462677C (en) * 2005-07-08 2009-02-18 鸿富锦精密工业(深圳)有限公司 Three-coordinate measuring machine-tool error compensation system and method
CN100561546C (en) * 2008-01-28 2009-11-18 和舰科技(苏州)有限公司 Circle scattering migration code-transfer ciphering method
CN101887713B (en) * 2009-05-13 2012-01-25 深圳市文鼎创数据科技有限公司 Encryption method and device for font library
CN102073831A (en) * 2011-02-23 2011-05-25 上海帝埃碧化学科技有限公司 System and method for encrypting and decrypting electronic documents
CN102096789A (en) * 2011-02-23 2011-06-15 上海帝埃碧化学科技有限公司 Electronic document security device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001048594A2 (en) * 1999-12-02 2001-07-05 Honeywell, Inc. Computer efficient linear feedback shift register
WO2001086860A1 (en) * 2000-05-09 2001-11-15 Verizon Laboratories Inc. Stream-cipher method and apparatus
US20020031218A1 (en) * 2000-09-14 2002-03-14 Jen-Chiun Lin Encryption method relevant to all encryption procedures
WO2002041566A2 (en) * 2000-11-14 2002-05-23 Honeywell International Inc. Cryptographic combiner using two sequential non-associative enciphering and deciphering operations

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001048594A2 (en) * 1999-12-02 2001-07-05 Honeywell, Inc. Computer efficient linear feedback shift register
WO2001086860A1 (en) * 2000-05-09 2001-11-15 Verizon Laboratories Inc. Stream-cipher method and apparatus
US20020031218A1 (en) * 2000-09-14 2002-03-14 Jen-Chiun Lin Encryption method relevant to all encryption procedures
WO2002041566A2 (en) * 2000-11-14 2002-05-23 Honeywell International Inc. Cryptographic combiner using two sequential non-associative enciphering and deciphering operations

Also Published As

Publication number Publication date
CN1542628A (en) 2004-11-03

Similar Documents

Publication Publication Date Title
Abdullah et al. New approaches to encrypt and decrypt data in image using cryptography and steganography algorithm
US8180048B2 (en) Method and system for computational transformation
CN101685425A (en) Mobile storage device and method of encrypting same
CN105099652A (en) Data encryption and decryption method and devices
CN103095449A (en) Dynamic encryption and decryption method based on stream ciphers
Tarigan Use of Electronic Code Book (Ecb) Algorithm in File Security
CN114124359A (en) Method and device for preserving format encrypted data, electronic equipment and storage medium
CN100359494C (en) Electronic file characters internal code transformation encryption method
CN116894273B (en) File encryption method, decryption method, equipment and medium based on exclusive or sum remainder
CN117708847A (en) 3C product leasing platform data processing method based on data compression and encryption
CN108718232A (en) Image encryption method based on AES and chaos
CN114722359B (en) Java source code protection method based on custom class loader
CN111104693A (en) Android platform software data cracking method, terminal device and storage medium
Ahmad et al. Protection of the texts using Base64 and MD5
US8473516B2 (en) Computer storage apparatus for multi-tiered data security
CN108777622B (en) Binary stream hash modular encryption and decryption method
US7505586B2 (en) Method for computer-based encryption and decryption of data
CN112134701A (en) Encryption method capable of repudiating editing of sensitive keywords
Suganya et al. Data communication using cryptography encryption
US20100246817A1 (en) System for data security using user selectable one-time pad
Averin et al. Mathematical Model of Symmetric Cryptoalgorithm Based on Representing Mumbers as Sums of Special Code Elements
Permana et al. JURNAL TEKNIK INFORMATIKA
Panggabean et al. Implementation of academy information database security using the blowfish method on the Medicom Campus
Setiawaty et al. The Implementation of the RC4 algorithm For Sale and Purchase Agreements Data Security On Notary Office
JP2001509608A (en) Method for cryptographically converting an L-bit input block of digital data into an L-bit output block

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: JIANGNAN INDUSTRIES GROUP CO., LTD.

Free format text: FORMER NAME: JIANGNAN MACHINERY (GROUP) CO., LTD.

CP03 Change of name, title or address

Address after: Bamboo town Yuhu District 411207 Hunan city of Xiangtan Province

Patentee after: Jiangnan Industries Group Co., Ltd.

Address before: 411207 Hunan city of Xiangtan Province bamboo town

Patentee before: Jiangnan Machinery (Group) Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080102

Termination date: 20150504

EXPY Termination of patent right or utility model