CN106533672A - Method and apparatus for verifying security of encrypted file - Google Patents

Method and apparatus for verifying security of encrypted file Download PDF

Info

Publication number
CN106533672A
CN106533672A CN201611078986.XA CN201611078986A CN106533672A CN 106533672 A CN106533672 A CN 106533672A CN 201611078986 A CN201611078986 A CN 201611078986A CN 106533672 A CN106533672 A CN 106533672A
Authority
CN
China
Prior art keywords
value
mod
modn
file
time
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.)
Pending
Application number
CN201611078986.XA
Other languages
Chinese (zh)
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.)
Jiangsu Lsyw Polytron Technologies Inc
Original Assignee
Jiangsu Lsyw Polytron Technologies Inc
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 Jiangsu Lsyw Polytron Technologies Inc filed Critical Jiangsu Lsyw Polytron Technologies Inc
Priority to CN201611078986.XA priority Critical patent/CN106533672A/en
Publication of CN106533672A publication Critical patent/CN106533672A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/088Usage controlling of secret information, e.g. techniques for restricting cryptographic keys to pre-authorized uses, different access levels, validity of crypto-period, different key- or password length, or different strong and weak cryptographic algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0852Quantum cryptography

Abstract

The invention discloses a method and apparatus for verifying the security of an encrypted file, and relates to the technical field of security. The method comprises the following steps: obtaining the encrypted file; obtaining an open key pair (e, N) used for encrypting the encrypted file; detecting whether the value of i2mod N is 0 or 1 for a parameter N in the key pair (e, N), wherein i is an integer greater than or equal to 2; if the value of the i2mod N is neither 0 nor 1 and (the formula is as shown in the specification), setting i=i+1, and repeatedly executing the step of detecting whether the value of the i2mod N is 0 or 1; using the time consumed for detecting whether the value of the i2mod N is 0 or 1 as a decryption time, and detecting whether the decryption time is smaller than a predetermined time; and if the decryption time is smaller than the predetermined time, determining the key pair (e, N) again. The problem that the security of the encrypted file cannot be guaranteed with the improvement of the speed of a computer to decrypt the encrypted file is solved; and the effect of verifying the security of the encrypted file in advance and encrypting the file again to improve the security of the encrypted file if the security of the encrypted file is not high is achieved.

Description

The method and device of checking encryption file security
Technical field
The present invention relates to security technology area, more particularly to a kind of method and device of checking encryption file security.
Background technology
With the high speed development of electronic information technology, in order to ensure safety of the file in network transmission, generally passing File is encrypted using AES before defeated file.
Generally all there is a secrecy timeliness in encryption file, determine encryption parameter according to secrecy timeliness, and according to encryption ginseng It is several that file is encrypted.
However, with the development of quantum computer, the speed for encrypting file using quantum decryption computer is improved so that former Safety is reliably encrypted file and also quickly can be decoded, and the safety for encrypting file cannot ensure.
The content of the invention
In order to solve to encrypt the raising of the speed of file with decryption computer, the safety for encrypting file cannot be guaranteed Problem, the present invention provide it is a kind of checking encryption file security method and device.The technical scheme is as follows:
First aspect according to embodiments of the present invention, there is provided the method for file security, methods described are encrypted in a kind of checking Including:
Encryption file is obtained, the encryption file is encrypted by rivest, shamir, adelman;
The disclosed key for encrypting the encryption file is obtained to (e, N);
For the key to parameter N in (e, N), i is detected2Whether the value of modN is 0 or 1, i are more than or equal to 2 Integer;
If the i2The value of modN neither be 0 and also be 1 andI=i+1 is then made, the detection is repeated The i2The step of whether value of modN is 0 or 1;
The i will be detected2The value of modN be whether time spent by 0 or 1 as the decryption time, detect the solution Whether the close time is less than the scheduled time;
If the decryption time is less than the scheduled time, the key is redefined to (e, N).
Optionally, the detection i2Whether the value of modN is 0 or 1, including:
From the beginning of i=2, the i is detected2Whether the value of modN is 0 or 1;
Or,
FromStart, detect the i2Whether the value of modN is 0 or 1;
Wherein, (i+1) is detected using equation below2Whether the value of modN is 0 or 1:
(i+1)2ModN=i2modN+2imodN+1modN。
Optionally, the method also includes:
As the i2When the value of modN is 0 or 1, i described in military order2The value of modN is that 0 or 1 i is designated as m;
Determine the first least common multiple between m-1 and parameter N, and between m+1 and the N second minimum Common multiple;
Parameter N is represented using first least common multiple and second least common multiple.
Second aspect according to embodiments of the present invention, there is provided the device of file security, described device are encrypted in a kind of checking Including:
File acquisition module, for obtaining encryption file, the encryption file is encrypted by rivest, shamir, adelman;
Key Acquisition Module, for obtaining the disclosed key for encrypting the encryption file to (e, N);
First detection module, detects i for for the key to parameter N in (e, N)2The value of modN be whether 0 or 1, i is the integer more than or equal to 2;
First detection module, if being additionally operable to the i2The value of modN neither be 0 and also be 1 andI=i+ is made then 1, repeat the detection i2The step of whether value of modN is 0 or 1;
Second detection module, for the i will be detected2Whether the value of modN is time spent by 0 or 1 as the solution The close time, detect whether the decryption time is less than the scheduled time;
Determining module, if for the decryption time be less than the scheduled time, redefine the key to (e, N)。
Optionally, the first detection module, specifically for:
From the beginning of i=2, the i is detected2Whether the value of modN is 0 or 1;
Or,
FromStart, detect the i2Whether the value of modN is 0 or 1;
Wherein, (i+1) is detected using equation below2Whether the value of modN is 0 or 1:
(i+1)2ModN=i2modN+2imodN+1modN。
Optionally, the described device also includes:
Mark module, for as the i2When the value of modN is 0 or 1, i described in military order2The value of modN is that 0 or 1 i is designated as m;
Least common multiple determining module, for determining the first least common multiple between m-1 and parameter N, and m The second least common multiple between+1 and the N;
Parameter representation module, for representing the ginseng using first least common multiple and second least common multiple Number N.
The technical scheme that embodiments of the invention are provided can include following beneficial effect:
By obtain encryption file and for encrypting file key to (e, N), for key in (e, N) Parameter N, determines i2Whether the value of modN is 0 or 1, and will determine i2When whether the value of modN is 0 or 1 time to be defined as decryption Between, when decryption time is less than the scheduled time, it is determined that the safety of encryption file is not high, key is redefined to (e, N);Solve As decryption computer encrypts the raising of the speed of file, the problem that the safety of file cannot be guaranteed is encrypted;Reach The safety of encryption file is verified in advance can, in the case where the safety of encryption file is not high, re-encrypted file is carrying The effect of the safety of high encryption file.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary, this can not be limited Invention.
Description of the drawings
During accompanying drawing herein is merged in description and the part of this specification is constituted, show the enforcement for meeting the present invention Example, and be used for together explaining the principle of the present invention in description.
Fig. 1 is a kind of flow chart of the method for the checking encryption file security according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of the method for the checking encryption file security for implementing to exemplify according to another exemplary;
Fig. 3 is a kind of structural representation of the device of the checking encryption file security according to an exemplary embodiment Figure.
Specific embodiment
Here in detail exemplary embodiment will be illustrated, its example is illustrated in the accompanying drawings.Explained below is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent and the consistent all embodiments of the present invention.Conversely, they be only with as appended by The example of consistent apparatus and method in terms of some described in detail in claims, the present invention.
Fig. 1 is a kind of flow chart of the method for the checking encryption file security according to an exemplary embodiment.This Embodiment is illustrated in being applied to the such as electronic equipment of panel computer, PC etc in this way.The method Including following step can be included:
Step 101, obtains encryption file, and encryption file is encrypted by rivest, shamir, adelman.
Optionally, encrypt file to prestore in the electronic device, or encryption file is that other electronic equipments lead to Cross what cable network or wireless network sent.
Asymmetric arithmetic includes at least one in RSA Algorithm, DSA algorithms, ECC algorithm, Diffie-Hellman algorithms.
Step 102, obtains the disclosed key for encrypting file to (e, N).
Disclosed key refers to parameter N and parameter e all external disclosures to (e, N).
Optionally, according to encryption file and key to the corresponding relation between (e, N), it is determined that for encrypting file Key is to (e, N).
Step 103, for key to parameter N in (e, N), detects i2The value of modN whether be 0 or 1, i be more than or equal to 2 integer.
Optionally, the initial value of i is 2.
Work as i2When the value of modN is 0 or 1, stop performing the method.
Step 104, if i2The value of modN neither be 0 and also be 1 andI=i+1 is then made, step is repeated 103。
When, if i2The value of modN is not 0 or 1, then make i=i+1, detects i again2Whether the value of modN is 0 Or 1, iterative cycles according to this, until i2The value of modN is 0 or 1, or, i2The value of modN is then calculated and is arrived neither 0 nor 1Till.
Step 105, will detect i2The value of modN be whether time spent by 0 or 1 as decryption time, during detection decryption Between whether be less than the scheduled time.
Ifi2The value of modN is 0 or 1, then will be from starting to detecting i2The value of modN is spent by 0 or 1 Time as decryption time;
If from the initial value of i start toi2The value of modN neither be 0 and also be 1, then will from start detection i2Whether the value of modN is 0 or 1 to terminating the spent time as decryption time.
Optionally, decryption time can predict decryption time according to the numerical values recited of parameter N.
Optionally, the scheduled time is set in advance.The scheduled time is to encrypt the time of secrecy namely guarantor required for file Close timeliness.Such as:The secrecy timeliness of encryption file is 1 year, then the scheduled time is 1 year.
If decryption time is more than the scheduled time, illustrate to crack the time of encryption file more than secrecy required for encryption file Time, encrypt file safety reliability;If decryption time is less than the scheduled time, illustrate that the time for cracking encryption file is little In the time maintained secrecy required for encryption file, the safety for encrypting file is unreliable, needs to redefine encryption parameter, accordingly Ground, needs redefine encryption file used by key to (e, N).
If decryption time is less than the scheduled time, execution step 106.
Step 106, if decryption time is less than the scheduled time, redefines key to (e, N).
When key is redefined to (e, N), the decryption time corresponding to parameter N for redefining is needed more than encryption text The secrecy timeliness of part, ensures to encrypt the safety of file with this.Such as:The secrecy timeliness of encryption file is 1 year, then redefine The corresponding decryption time of parameter N be 1.1 years.
In sum, the method for checking encryption file security provided in an embodiment of the present invention, by obtaining encryption file And for encrypting file key to (e, N), for key to parameter N in (e, N), detect i2Whether the value of modN For 0 or 1, and i will be detected2Whether the value of modN is 0 or 1 time to be defined as decryption time, in decryption time less than pre- timing Between when, it is determined that encryption file safety it is not high, redefine key to (e, N);Solve with decryption computer encryption text The raising of the speed of part, encrypts the problem that the safety of file cannot be guaranteed;Reach and can verify encryption file in advance Safety, encryption file safety it is not high in the case of, re-encrypted file come improve encryption file safety effect Really.
Fig. 2 is a kind of flow chart of the method for the checking encryption file security for implementing to exemplify according to another exemplary. The present embodiment is illustrated in being applied to the such as electronic equipment of panel computer, PC etc in this way.The party Method includes including following step:
Step 201, obtains encryption file, and encryption file is encrypted by rivest, shamir, adelman.
The step is set forth in a step 101, is repeated no more here.
Step 202, obtains the disclosed key for encrypting file to (e, N).
The step is set forth in a step 102, is repeated no more here.
Step 203, for key to parameter N in (e, N), detects i2The value of modN whether be 0 or 1, i be more than or equal to 2 integer.
The step can be realized by the following two kinds step:
First, the initial value of i is 2, from the beginning of i=2, detects i2Whether the value of modN is 0 or 1.
2nd, fromStart, detect i2Whether the value of modN is 0 or 1.
Such as:N=55, from the beginning of i=7, detects i2Whether the value of modN is 0 or 1.
Work as i2When the value of modN is 0 or 1, stop performing the method.
Step 204,When, i=i+1 is made, step 103 is repeated.
Work as i2When the value of modN is 0 or 1, stop performing the method.
Step 204, if i2The value of modN neither be 0 and also be 1 andI=i+1 is then made, step is repeated 203。
When, if i2The value of modN is not 0 or 1, then make i=i+1, detects i again2Whether the value of modN be 0 or 1, iterative cycles according to this, until i2The value of modN is 0 or 1, or, i2The value of modN is then calculated and is arrived neither 0 nor 1Till.
(i+1) is detected using equation below2Whether the value of modN is 0 or 1:
(i+1)2ModN=i2modN+2imodN+1modN。
Such as:N=55, starts to detect i from i=72Whether the value of modN is 0 or 1;
As i=7, i2ModN=72Mod55=49;
As i=i+1=7+1=8,
(i+1)2ModN=i2ModN+2imodN+1modN=49+14+1=64-55=9;
……
It should be noted that working as i2When modN+2imodN+1modN is more than N, (i+1)2ModN=i2modN+2imodN+ 1modN-N。
It should be noted that can be with detection of packets i2Whether the value of modN is 0 or 1.Also will i point be some groups, it is some Group parallel detection i2Whether the value of modN is 0 or 1.
Such as:N=55,2≤i≤27, it is one group to make i values for 2 to 10, calculates i2Whether the value of modN is 0 or 1, makes i It is one group that value is 11 values 20, calculates i2Whether the value of modN is 0 or 1, and it is one group to make i values for 21 to 27, calculates i2ModN's Whether value is 0 or 1.
Calculating (i+1)2During modN, using i2ModN+2imodN+1modN obtains (i+1)2The value of modN, by script Multiplication and division is converted to addition and subtraction, improves the efficiency of checking file security.
Step 205, will detect i2The value of modN be whether time spent by 0 or 1 as decryption time, during detection decryption Between whether be less than the scheduled time.
Ifi2The value of modN is 0 or 1, then will be from starting to detecting i2The value of modN is spent by 0 or 1 Time as decryption time;
If from the initial value of i start toi2The value of modN neither be 0 and also be 1, then will from start detection i2Whether the value of modN is 0 or 1 to terminating the spent time as decryption time.
If it should be noted that untili2The value of modN is not 0 or 1, then show that parameter N is prime number; IfWhen, i2The value of modN is 0 or 1, then show parameter N to close number.
Optionally, decryption time can predict decryption time according to the numerical values recited of parameter N.
Optionally, the scheduled time is set in advance.The scheduled time is to encrypt the time of secrecy namely guarantor required for file Close timeliness.Such as:The secrecy timeliness of encryption file is 1 year, then the scheduled time is 1 year.
If decryption time is more than the scheduled time, illustrate to crack the time of encryption file more than secrecy required for encryption file Time, encrypt file safety reliability;If decryption time is less than the scheduled time, illustrate that the time for cracking encryption file is little In the time maintained secrecy required for encryption file, the safety for encrypting file is unreliable, needs to redefine encryption parameter, accordingly Ground, needs redefine encryption file used by key to (e, N).
If decryption time is less than the scheduled time, execution step 206.
Step 206, if decryption time is less than the scheduled time, redefines key to (e, N).
The step is set forth in step 106, is repeated no more here.
Step 207, works as i2When the value of modN is 0 or 1, military order i2The value of modN is that 0 or 1 i is designated as m.
Such as:N=55, as i=21, i2The value of modN is 1, then remember m=21.
Step 208, determines the first least common multiple between m-1 and parameter N, and second between m+1 and parameter N Least common multiple.
Such as:N=55, m=21, m-1=20, m+1=22, (m-1) the first least common multiple and N between is 5, (m+ 1) the second least common multiple and N between is 11.
Step 209, represents parameter N using the first least common multiple and the second least common multiple.
Work as i2When the value of modN is 1, N=p1·p2......pn, piFor prime number, and piFor N and (m-1) or N and (m+1) it Between least common multiple.
Work as i2When the value of modN is 0, N=p1 i·p2......pn, piFor prime number, and piFor N and (m-1) or N and (m+1) Between least common multiple.
In sum, the method for checking encryption file security provided in an embodiment of the present invention, by obtaining encryption file And for encrypting file key to (e, N), for key to parameter N in (e, N), determine i2Whether the value of modN For 0 or 1, and i will be determined2Whether the value of modN is 0 or 1 time to be defined as decryption time, in decryption time less than pre- timing Between when, it is determined that encryption file safety it is not high, redefine key to (e, N);Solve with decryption computer encryption text The raising of the speed of part, encrypts the problem that the safety of file cannot be guaranteed;Reach and can verify encryption file in advance Safety, encryption file safety it is not high in the case of, re-encrypted file come improve encryption file safety effect Really.
It is following for apparatus of the present invention embodiment, can be used for performing the inventive method embodiment.For apparatus of the present invention reality The details not disclosed in applying example, refer to the inventive method embodiment.
Fig. 3 is refer to, the device of the checking encryption file security provided in it illustrates one embodiment of the invention Structural representation.The device can pass through software, hardware or both be implemented in combination with become for performing checking encryption file peace The electronic equipment of full property.The device includes:
File acquisition module 310, for obtaining encryption file, encryption file is encrypted by rivest, shamir, adelman.
Key Acquisition Module 320, for obtaining the disclosed key for being used for encrypting file to (e, N).
First detection module 330, detects i for for key to parameter N in (e, N)2The value of modN be whether 0 or 1, i is the integer more than or equal to 2.
First detection module 340, if being additionally operable to i2The value of modN neither be 0 and also be 1 andI=i+ is made then 1, repeat detection i2The step of whether value of modN is 0 or 1.
Second detection module 350, for i will be detected2Whether the value of modN is time spent by 0 or 1 as during decryption Between, whether detection decryption time is less than the scheduled time.
Determining module 360, if being less than the scheduled time for decryption time, redefines key to (e, N).
In sum, the device of checking encryption file security provided in an embodiment of the present invention, by obtaining encryption file And for encrypting file key to (e, N), for key to parameter N in (e, N), determine i2Whether the value of modN For 0 or 1, and i will be determined2Whether the value of modN is 0 or 1 time to be defined as decryption time, in decryption time less than pre- timing Between when, it is determined that encryption file safety it is not high, redefine key to (e, N);Solve with decryption computer encryption text The raising of the speed of part, encrypts the problem that the safety of file cannot be guaranteed;Reach and can verify encryption file in advance Safety, encryption file safety it is not high in the case of, re-encrypted file come improve encryption file safety effect Really.
Optionally, the first detection module, specifically for:
From the beginning of i=2, i is detected2Whether the value of modN is 0 or 1;
Or,
FromStart, detect i2Whether the value of modN is 0 or 1;
Wherein, (i+1) is detected using equation below2Whether the value of modN is 0 or 1:
(i+1)2ModN=i2modN+2imodN+1modN。
Optionally, the device also includes:
Mark module, for working as i2When the value of modN is 0 or 1, military order i2The value of modN is that 0 or 1 i is designated as m;
Least common multiple determining module, for determining the first least common multiple between m-1 and parameter N, and m+1 and The second least common multiple between N;
Parameter representation module, for representing parameter N using the first least common multiple and the second least common multiple.
With regard to the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant the method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Those skilled in the art will readily occur to its of the present invention after considering description and putting into practice invention disclosed herein Its embodiment.The application is intended to any modification of the present invention, purposes or adaptations, these modifications, purposes or The common knowledge in the art that person's adaptations follow the general principle of the present invention and do not invent including the present invention Or conventional techniques.Description and embodiments are considered only as exemplary, and true scope and spirit of the invention are by following Claim is pointed out.
It should be appreciated that the precision architecture for being described above and being shown in the drawings is the invention is not limited in, and And various modifications and changes can be being carried out without departing from the scope.The scope of the present invention is limited only by appended claim.

Claims (6)

1. a kind of method that file security is encrypted in checking, it is characterised in that methods described includes:
Encryption file is obtained, the encryption file is encrypted by rivest, shamir, adelman;
The disclosed key for encrypting the encryption file is obtained to (e, N);
For the key to parameter N in (e, N), i is detected2Whether the value of mod N is 0 or 1, i are integer more than or equal to 2;
If the i2The value of mod N neither be 0 and also be 1 andI=i+1 is then made, is repeated described in the detection i2The step of whether value of mod N is 0 or 1;
The i will be detected2The value of mod N be whether time spent by 0 or 1 as the decryption time, when detecting the decryption Between whether be less than the scheduled time;
If the decryption time is less than the scheduled time, the key is redefined to (e, N).
2. method according to claim 1, it is characterised in that the detection i2Whether the value of mod N is 0 or 1, including:
From the beginning of i=2, the i is detected2Whether the value of mod N is 0 or 1;
Or,
FromStart, detect the i2Whether the value of mod N is 0 or 1;
Wherein, (i+1) is detected using equation below2Whether the value of mod N is 0 or 1:
(i+1)2Mod N=i2mod N+2imod N+1mod N。
3. method according to claim 1 and 2, it is characterised in that methods described also includes:
As the i2When the value of mod N is 0 or 1, i described in military order2The value of mod N is that 0 or 1 i is designated as m;
Determine the first least common multiple between m-1 and parameter N, and the second least common multiple between m+1 and the N Number;
Parameter N is represented using first least common multiple and second least common multiple.
4. the device of file security is encrypted in a kind of checking, it is characterised in that described device includes:
File acquisition module, for obtaining encryption file, the encryption file is encrypted by rivest, shamir, adelman;
Key Acquisition Module, for obtaining the disclosed key for encrypting the encryption file to (e, N);
First detection module, detects i for for the key to parameter N in (e, N)2Whether the value of mod N is 0 or 1, i It is the integer more than or equal to 2;
First detection module, if being additionally operable to the i2The value of mod N neither be 0 and also be 1 andI=i+1 is made then, Repeat the detection i2The step of whether value of mod N is 0 or 1;
Second detection module, for the i will be detected2Whether the value of mod N is time spent by 0 or 1 as during the decryption Between, detect whether the decryption time is less than the scheduled time;
Determining module, if being less than the scheduled time for the decryption time, redefines the key to (e, N).
5. device according to claim 4, it is characterised in that the first detection module, specifically for:
From the beginning of i=2, the i is detected2Whether the value of mod N is 0 or 1;
Or,
FromStart, detect the i2Whether the value of mod N is 0 or 1;
Wherein, (i+1) is detected using equation below2Whether the value of mod N is 0 or 1:
(i+1)2Mod N=i2mod N+2imod N+1mod N。
6. the device according to claim 4 or 5, it is characterised in that described device also includes:
Mark module, for as the i2When the value of mod N is 0 or 1, i described in military order2The value of mod N is that 0 or 1 i is designated as m;
Least common multiple determining module, for determining the first least common multiple between m-1 and parameter N, and m+1 and The second least common multiple between the N;
Parameter representation module, for representing parameter N using first least common multiple and second least common multiple.
CN201611078986.XA 2016-11-29 2016-11-29 Method and apparatus for verifying security of encrypted file Pending CN106533672A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611078986.XA CN106533672A (en) 2016-11-29 2016-11-29 Method and apparatus for verifying security of encrypted file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611078986.XA CN106533672A (en) 2016-11-29 2016-11-29 Method and apparatus for verifying security of encrypted file

Publications (1)

Publication Number Publication Date
CN106533672A true CN106533672A (en) 2017-03-22

Family

ID=58353540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611078986.XA Pending CN106533672A (en) 2016-11-29 2016-11-29 Method and apparatus for verifying security of encrypted file

Country Status (1)

Country Link
CN (1) CN106533672A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1645791A (en) * 2003-11-12 2005-07-27 松下电器产业株式会社 RSA public key generation apparatus, RSA decryption apparatus, and RSA signature apparatus
US8023647B2 (en) * 2008-05-29 2011-09-20 Cheman Shaik Password self encryption method and system and encryption by keys generated from personal secret information
CN103312498A (en) * 2013-06-20 2013-09-18 武汉大学 Quantum computation resistant public key cryptography method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1645791A (en) * 2003-11-12 2005-07-27 松下电器产业株式会社 RSA public key generation apparatus, RSA decryption apparatus, and RSA signature apparatus
US8023647B2 (en) * 2008-05-29 2011-09-20 Cheman Shaik Password self encryption method and system and encryption by keys generated from personal secret information
CN103312498A (en) * 2013-06-20 2013-09-18 武汉大学 Quantum computation resistant public key cryptography method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KRITSANAPONG SOMSUK等: "MFFV2 and MNQSV2:Improved Factorization Algorithms", 《2013 INTERNATIONAL CONFERENCE ON INFORMATION SCIENCE AND APPLICATIONS》 *
浪淘狂沙: "解开人人网登录密码的RSA加密", 《解开人人网登录密码的RSA加密 *
褚一平等: "分解RSA模数算法研究", 《微机发展》 *

Similar Documents

Publication Publication Date Title
EP2553866B1 (en) System and method for protecting cryptographic assets from a white-box attack
CN109034796B (en) Alliance chain-based transaction supervision method, electronic device and readable storage medium
CN104052606B (en) Digital signature, signature authentication device and digital signature method
EP2351286B1 (en) Cryptographic algorithm fault protections
CN110874494B (en) Method, device and system for processing password operation and method for constructing measurement trust chain
EP3596876B1 (en) Elliptic curve point multiplication device and method for signing a message in a white-box context
CN111177693B (en) Method, device, equipment and medium for verifying terminal root certificate
WO2018019233A1 (en) Operation method and security chip
US10721056B2 (en) Key processing method and device
US20160149708A1 (en) Electronic signature system
CN109495270A (en) Digital signature generate in interim random number to message combination
CN105306212B (en) A kind of label decryption method that identity is hiding and safe by force
CN104951366A (en) Mobile terminal application program login method and equipment
CN111049897B (en) Method, device, equipment and medium for encrypted uploading and decrypted deployment of small program package
US9780946B2 (en) Elliptic curve encryption method comprising an error detection
CN114884714B (en) Task processing method, device, equipment and storage medium
US20120039462A1 (en) Rsa signature method and apparatus
CN106533672A (en) Method and apparatus for verifying security of encrypted file
EP3166013B1 (en) Modular exponentiation using randomized addition chains
EP3891630B1 (en) Method for end entity attestation
CN106685661B (en) The method and device of public key verifications
Schmidt et al. How Little is Enough? Implementation and Evaluation of a Lightweight Secure Firmware Update Process for the Internet of Things.
KR100953716B1 (en) Method and Apparatus of digital signature using bit arithmetic based on CRT-RSA and Recording medium using by the same
CN105099684B (en) A kind of processing method of Montgomery Algorithm, device and encryption device
Gupta et al. METHS: Mapping from English language to Hindi language for secure commercial transactions

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170322