CN103942284B - File fingerprint information extracting method based on sine function - Google Patents

File fingerprint information extracting method based on sine function Download PDF

Info

Publication number
CN103942284B
CN103942284B CN201410138961.9A CN201410138961A CN103942284B CN 103942284 B CN103942284 B CN 103942284B CN 201410138961 A CN201410138961 A CN 201410138961A CN 103942284 B CN103942284 B CN 103942284B
Authority
CN
China
Prior art keywords
file
fingerprint information
bit
extracting method
information
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.)
Active
Application number
CN201410138961.9A
Other languages
Chinese (zh)
Other versions
CN103942284A (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.)
Space Star Technology Co Ltd
Original Assignee
Space Star Technology 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 Space Star Technology Co Ltd filed Critical Space Star Technology Co Ltd
Priority to CN201410138961.9A priority Critical patent/CN103942284B/en
Publication of CN103942284A publication Critical patent/CN103942284A/en
Application granted granted Critical
Publication of CN103942284B publication Critical patent/CN103942284B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Collating Specific Patterns (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to a file fingerprint information extracting method based on a sine function. The extracting method includes the steps that a position sequence is generated by using the sine function and serves as the position value when file fingerprint information is extracted from the file content, after the value is extracted out, a permutation matrix is used for permutation to obtain a final file fingerprint, and confidentiality of file plain texts is achieved to a certain degree. A default value of the permutation matrix can be set or appointed by a user himself, the strategy is easy to implement and high in scalability, the fingerprint with any bit length can be provided, the fingerprint information can be dispersed in the file content in any form, and the file fingerprint information extracting method is very suitable for the scene where data are encrypted or decrypted through stream ciphers.

Description

A kind of file fingerprint information extracting method based on SIN function
Technical field
The invention belongs to computer application field, is related to a kind of acquisition methods of file encryption information.
Background technology
In computer utility, particularly information security field, file fingerprint information is an important method and plan Slightly.Called file fingerprint, referring to can uniquely indicate the feature of certain file, and each different file can have different fingers Stricture of vagina information.File fingerprint plays the role of very important in all many-sides such as protection data integrity, identifications.In many fields Under scape, need using simpler effective file fingerprint information extraction mechanism.
Existing file fingerprint information extracting method, mainly concentrates on the related hash function of searching to enter file content Row is processed.Such as in terms of checking data integrity, data publisher carries out hash to file content first, and Hash Value is adhered to In the head or afterbody of file, after Data receiver's receiving data, then hash is carried out to file content, by Hash Value with it is original Hash Value is compared, so as to judge whether data are tampered or damage.In the industry cycle, comparative maturity and widely used hash letter Number has MDx, SHA-x etc..
However, in stream cipher mechanism, to carry out encryption and decryption, conventional utilization using different keys to each file File fingerprint is unaccommodated come the method for identifying different files, since it is desired that in top of file or the additional fingerprint letter of afterbody Breath, have impact on file size, and finger print information is disclosed, once destroyed, file just has the risk that cannot be decrypted.Cause This, studies a kind of file fingerprint information extracting method that can be used in stream cipher system and is very important.
The content of the invention
The present invention technology solve problem be:Overcome the deficiencies in the prior art, there is provided a kind of text based on SIN function Part finger print information extracting method, is particularly suitable for carrying out encryption and decryption to data in stream cipher system.
The present invention technical solution be:A kind of file fingerprint information extracting method based on SIN function, including such as Lower step:
(1)Using random sequence generator, random sequences of the length for n bit are generated;Described random sequences are only Generate once, be not repeated to generate.
(2)File size A for obtaining file content and calculating by bit, is calculated positional information, from text using following formula Corresponding bit is extracted in part content as initial fingerprint information,
In formula, S is that 1 to the integer between n, F (S) is the S position extracted from file content, and L is big by file The diffusion coefficient that little A is determined, when A is less than 16KB, L=217Bit, when A is more than or equal to 16KB, L=A;
(3)The information that corresponding bit is extracted from file content generates the initial fingerprint information of n bit;Work as step(2)Fall into a trap When the extraction position number for obtaining is equal to n, the bit information extracted from n correspondence position is initial fingerprint information, works as step (2)In calculated extraction position number be less than n when, using from correspondence position extract utilization bit information, to step(1) The sequence immediately of middle generation proceeds by order and replaces from highest order, thus obtains the initial fingerprint information of n bit;
(4)The initial fingerprint information of n bit is entered into line replacement using permutation matrix, so as to obtain final file fingerprint letter Breath.Described permutation matrix is the two-dimensional array of a 16*16, and each element in array is different from, but each is first The value of element belongs to a value in 0~255.Permutation matrix is fixed default matrix or is randomly selected by user.
Present invention advantage compared with prior art is:
(1)Realize simple.A position sequence is produced using SIN function, the sequence is extracted as from file content Positional value during file fingerprint information, line replacement is entered after taking-up value with a permutation matrix, so as to obtain final file fingerprint, Traditional HASH methods are compared, the inventive method to source file to be encrypted without the need for carrying out any change(Traditional HASH methods Need that the hash values of file are attached in the middle of file), it is easy to accomplish;
(2)In being especially suitable for user's stream cipher system.In the case where file content is not changed, realize identifying each file Identity function, be that different files produce different key streams.Traditional method must be changed to source file content, if Once file goes wrong in transmitting procedure, then source file cannot be decrypted, and using the inventive method the problems referred to above can be avoided;
(3)Safety is higher.Using random array is supplied, it is allowed to be adapted to different size of file, and peace well is provided Quan Xing.Traditional method is weak for the safety of small documents, because small documents, can carry out brute-force using traditional method and break Solution, and using file fingerprint and supply random data, it is ensured that even if in the case of file content very little, also providing more The guarantee of safety.
Description of the drawings
Fig. 1 is the FB(flow block) of the inventive method.
Specific embodiment
As shown in figure 1, the flow chart for the present invention based on the file fingerprint information extracting method of SIN function, mainly includes Following several steps:
First, initial fingerprint is generated
According to file content and file size(By bit length computation), with reference to SIN function and fingerprint positions computing formula, The initial fingerprint information of corresponding digit is extracted from file content.
(1)Obtain file size;
(2)Finger print information is calculated according to following fingerprint computing formula according to file size corresponding in file content Position;
Formula explanation:The length of file fingerprint information is n bits, and S is the integer between [1, n], and expression will take the fingerprint S positions;L is diffusion coefficient, is determined by the size of file, and when file size is less than 16KB, L takes 217, other situations L are literary The size of part(Calculate by bit);F (S) represents the particular location for extracting file corresponding to S positions.
The derivation of above-mentioned formula is as follows:
Because relation function adopts SIN function, bit subscript hereof to start to calculate from 0, therefore
Therefore equation below is drawn:
Above-mentioned formula is why using realizing the generation to file fingerprint position, its reason is based on SIN function:1) Because SIN function produce positional information it is more more disguised than the positional information that linear function is produced, and than higher order functionality with Index/logarithmic function is simple;2)The coefficient and file content of function is associated, it is ensured that different files has different position letters Breath, even if identical file size, its finger print information value is also different;3)In order to solve the problems, such as small documents, benefit is taken The form of the random array of foot carries out Safety assurance measures.
(3)According to the position obtained(With the position that bit is counted)Corresponding initial fingerprint information is read from file content Position, if file size is too little, as needed from the Bit String filling initial fingerprint information for supplying taking-up corresponding length in array.
2nd, array generation is supplied
By random sequence generator(One random sequences generating function)Generate a bit array, the array be one with File fingerprint message length identical Bit String, and once generate, forever use.
(1)Isometric with a finger print information length random sequences are calculated using random sequence generator;
(2)Whether the randomness of the random sequences generated using pre-set randomness detected rule detection is conformed to Ask, if do not meet regenerating random sequences;The random sequences of the generation are and supply array if meeting the requirements;
3rd, finger print information displacement
An acquiescence permutation matrix can be arranged by developer, and interface is provided and choose whether to specify displacement square for user Battle array, is entered after line replacement to initial fingerprint information with permutation matrix and draws final file fingerprint information.
(1)It is determined that the permutation matrix still specified using user using acquiescence permutation matrix;
(2)Initial fingerprint information is entered into line replacement using permutation matrix, final file fingerprint information is obtained.
Permutation matrix is the two-dimensional array of a 16*16, and each element is different in array, and belongs to 0~255 In a value, that is to say, that permutation matrix is exactly one of 0~255 arrangement.So-called acquiescence permutation matrix, i.e., by algorithm certainly Dynamic random generation;And the permutation matrix that user specifies, i.e. user oneself can also generate an arrangement, with the shape of algorithm parameter Formula is input into.
Permutation matrix is used for entering line translation to original document finger print information so as to more complicated with the relation of file data, The confidentiality of file fingerprint acquisition of information is improved, the effect of permutation matrix is the position for upsetting bit in file fingerprint information, Therefore element can not repeat in two-dimensional array.
The content not being described in detail in description of the invention belongs to the known technology of those skilled in the art.

Claims (3)

1. a kind of file fingerprint information extracting method based on SIN function, it is characterised in that comprise the steps:
(1) random sequence generator is utilized, random sequences of the length for n bit are generated;
(2) file size A for obtaining file content and calculating by bit, using following formula positional information is calculated,
F ( S ) = ( L + 1 ) · s i n π ( S - 1 ) 2 ( n - 1 )
In formula, S is that 1 to the integer between n, F (S) is the S position extracted from file content, and L is to be determined by file size A Fixed diffusion coefficient, when A is less than 16KB, L=217Bit, when A is more than or equal to 16KB, L=A;
(3) information that corresponding bit is extracted from file content generates the initial fingerprint information of n bit;When calculating in step (2) When the extraction position number for arriving is equal to n, the bit information extracted from n correspondence position is initial fingerprint information, when step (2) In calculated extraction position number when being less than n, using the bit information extracted from correspondence position, to what is generated in step (1) Immediately sequence proceeds by order and replaces from highest order, thus obtains the initial fingerprint information of n bit;
(4) the initial fingerprint information of n bit is entered into line replacement using permutation matrix, so as to obtain final file fingerprint information; Described permutation matrix is the two-dimensional array of a 16*16, and each element in array is different from, but each element Value belongs to a value in 0~255.
2. a kind of file fingerprint information extracting method based on SIN function according to claim 1, it is characterised in that:Institute The random sequences stated are only generated once, are not repeated to generate.
3. a kind of file fingerprint information extracting method based on SIN function according to claim 1, it is characterised in that:Institute The permutation matrix stated is fixed default matrix or is randomly selected by user.
CN201410138961.9A 2014-04-08 2014-04-08 File fingerprint information extracting method based on sine function Active CN103942284B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410138961.9A CN103942284B (en) 2014-04-08 2014-04-08 File fingerprint information extracting method based on sine function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410138961.9A CN103942284B (en) 2014-04-08 2014-04-08 File fingerprint information extracting method based on sine function

Publications (2)

Publication Number Publication Date
CN103942284A CN103942284A (en) 2014-07-23
CN103942284B true CN103942284B (en) 2017-05-03

Family

ID=51189952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410138961.9A Active CN103942284B (en) 2014-04-08 2014-04-08 File fingerprint information extracting method based on sine function

Country Status (1)

Country Link
CN (1) CN103942284B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281581A (en) * 2007-09-27 2008-10-08 北京数字证书认证中心有限公司 Method for checking whether contents of paper file is distorted or not
CN102880833A (en) * 2012-08-28 2013-01-16 福州讯华信息技术有限公司 Two-dimensional code anti-fake verification method for documents
CN102930317A (en) * 2012-11-30 2013-02-13 中企永联数据交换技术(北京)有限公司 Device for generating two-dimension code identifiers of books, two-dimension code identification device and system
CN103544408A (en) * 2013-09-23 2014-01-29 中山大学 Method for embedment and extraction of PDF document hidden information according to composite font

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4424422B2 (en) * 2008-01-18 2010-03-03 富士ゼロックス株式会社 Information processing apparatus, information processing system, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281581A (en) * 2007-09-27 2008-10-08 北京数字证书认证中心有限公司 Method for checking whether contents of paper file is distorted or not
CN102880833A (en) * 2012-08-28 2013-01-16 福州讯华信息技术有限公司 Two-dimensional code anti-fake verification method for documents
CN102930317A (en) * 2012-11-30 2013-02-13 中企永联数据交换技术(北京)有限公司 Device for generating two-dimension code identifiers of books, two-dimension code identification device and system
CN103544408A (en) * 2013-09-23 2014-01-29 中山大学 Method for embedment and extraction of PDF document hidden information according to composite font

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
计算机安全系统中随机序列发生器的研究;苏桂平 等;《计算机研究与发展》;20030731;第40卷(第7期);994-1000 *

Also Published As

Publication number Publication date
CN103942284A (en) 2014-07-23

Similar Documents

Publication Publication Date Title
JP5914604B2 (en) Apparatus and method for decrypting encrypted file
CN103279697B (en) Based on details in fingerprint Information hiding and the restoration methods of orthogonal matrix and modular arithmetic
CN102752110B (en) Dynamic password generating method and system
CN107679397A (en) The weak passwurd detecting system and method for a kind of Linux system
CN106254074A (en) A kind of such poems of the Song Dynasty carrier Text information hiding technology based on Hybrid Encryption
CN106610995A (en) Ciphertext index creating method, device and system
CN102194066A (en) Method for taking fingerprint information as key
CN107257283B (en) Fingerprint verification method based on quantum figure state
CN106357608B (en) A kind of private data encryption and decryption method towards personal medical treatment & health data
CN111475690B (en) Character string matching method and device, data detection method and server
CN107622208A (en) Note encryption and decryption method and related product
CN104660398B (en) A kind of generation method of encryption key
Torvi et al. An unique data security using text steganography
CN103595523B (en) A file encryption method
CN103942284B (en) File fingerprint information extracting method based on sine function
CN104376236A (en) Scheme self-adaptive digital watermark embedding and extracting method based on camouflage technology
Alrifaee et al. Cryptography based on retina information
Nechta Steganography in social networks
Saini A survey on watermarking web contents for protecting copyright
CN102194067A (en) Method for signing electronic document with fingerprint based on Internet
CN104363089A (en) Method for realizing fuzzy vault on the basis of geographical location information
CN115001659A (en) Webpage data encryption method, device, equipment and storage medium
CN106059748A (en) Lightweight data secure storage method based on block security regeneration codes
CN106156655A (en) The compressing file of a kind of facing cloud storage and authentication method
KR101852703B1 (en) Sentence recognition device, sentence recognition method, and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant