This application is a divisional application filed on 28/10/2015 by the chinese patent office under the name of 201510719602.7 entitled "method and apparatus for encrypting and decrypting transmission file," the entire contents of which are incorporated herein by reference.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements throughout, the principles of the present invention are illustrated in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
While the principles of the invention have been described in the foregoing context, which is not intended to be limiting, those of ordinary skill in the art will appreciate that various of the steps and operations described below may also be implemented in hardware. The principles of the present invention are operational with numerous other general purpose or special purpose computing, communication environments or configurations.
The invention provides an encryption and decryption method and an encryption and decryption device for a transmission file, which are mainly applied to terminal equipment, such as: mobile phones, computers, Personal Digital Assistants (PDAs), and the like.
The details will be described below separately.
Example one
Referring to fig. 1, a method for encrypting a transmission file according to an embodiment of the present invention is shown.
The encryption method of the transmission file is applied to mobile terminal equipment and specifically comprises the following steps:
in step S101, a file to be transmitted and a file transmission instruction are received, where the file transmission instruction carries a key target user identifier;
in the embodiment of the present invention, after the step of receiving the file to be transmitted, the method further includes: judging whether the file to be transmitted comprises preset keywords or not; and if the file to be transmitted is judged to comprise the preset keywords, determining that the file to be transmitted is the file needing to be encrypted, and executing the step S102.
However, it is understood that the keywords may be "contract", "agreement", "important", etc., and may be set by the user.
For example, after receiving a file to be transmitted, whether the content of the file contains two words of "contract" is judged, and if the content of the file contains "contract", the file to be transmitted is determined to be a file needing to be encrypted. At this time, according to the information of the appointed user, the eyeball information of the appointed user is obtained and used as a key for encrypting the file to be transmitted.
However, it is understood that if the content of the file is determined to contain no two words of "contract", the file is transmitted directly to the receiving mobile terminal without encryption.
In step S102, a key for encrypting the file to be transmitted is acquired according to the key target user identifier;
in the embodiment of the invention, according to the information of the appointed user, the eyeball information of the appointed user is obtained and used as a key for encrypting the file to be transmitted. For example, eye information includes, but is not limited to; iris information, sclera information, and the like.
In step S103, encrypting the file to be transmitted by using the key;
in the embodiment of the invention, the eyeball information of the appointed user is adopted to encrypt the file to be transmitted.
In step S104, the encrypted file to be transmitted is transmitted to the mobile terminal of the receiving party according to the file transmission instruction.
As can be seen from the above, in the present embodiment, when a file is transmitted, the file is encrypted according to the specified eyeball information, and then the encrypted file is sent to the receiving mobile terminal. Therefore, the invention can ensure the security of network transmission files, is convenient and quick, and greatly improves the use experience of users.
Example two
Referring to fig. 2, a method for encrypting a transmission file according to an embodiment of the present invention is shown.
The encryption method of the transmission file is applied to mobile terminal equipment and specifically comprises the following steps:
in step S201, a file to be transmitted and a file transmission instruction are received, where the file transmission instruction carries a key target user identifier;
in the embodiment of the present invention, after the step of receiving the file to be transmitted, the method further includes: judging whether the file to be transmitted comprises preset keywords or not; if the file to be transmitted is judged to include the preset keywords, the file to be transmitted is determined to be the file needing to be encrypted, and step S202 is executed.
However, it is understood that if the file to be transmitted is determined not to include the preset keyword, the file is directly transmitted to the receiving mobile terminal without encryption.
In step S202, an eyeball collection module of the sender mobile terminal is started according to the key target user identification;
in the embodiment of the invention, according to the designated user information, if the designated user is the user of the home terminal mobile phone, the eyeball collection module of the home terminal mobile phone (the mobile terminal of the sender) is started.
In step S203, the eyeball information of the sender mobile terminal user is collected through the eyeball collection module;
in step S204, the collected eyeball information of the sender mobile terminal user is used to encrypt the file to be transmitted.
In the embodiment of the invention, the eyeball information of the home terminal mobile phone user is adopted to encrypt the file to be transmitted.
In step S205, the encrypted file to be transmitted is transmitted to the mobile terminal of the receiving party according to the file transmission instruction.
However, it is understood that if the specified user information is stored in the mobile terminal in advance, according to the key target user identifier (i.e. the specified user information), eyeball information of the specified user is directly read from the mobile terminal as a key for encrypting the file to be transmitted, and the file to be transmitted is encrypted by using the eyeball information of the specified user.
As can be seen from the above, in the embodiment, when a file is transmitted, the local eyeball acquisition module is started to acquire eyeball information of the mobile terminal user; and encrypting the file according to the eyeball information, and sending the encrypted file to the mobile terminal of the receiving party. Therefore, the invention can ensure the security of network transmission files, is convenient and quick, and greatly improves the use experience of users.
EXAMPLE III
Referring to fig. 3, a method for encrypting a transmission file according to an embodiment of the invention is shown.
The encryption method of the transmission file is applied to mobile terminal equipment and specifically comprises the following steps:
in step S301, a file to be transmitted and a file transmission instruction are received, where the file transmission instruction carries a key target user identifier;
in the embodiment of the present invention, after the step of receiving the file to be transmitted, the method further includes: judging whether the file to be transmitted comprises preset keywords or not; if the file to be transmitted is judged to include the preset keyword, and the file to be transmitted is determined to be the file needing to be encrypted, the step S302 is executed.
However, it is understood that if the file to be transmitted is determined not to include the preset keyword, the file is directly transmitted to the receiving mobile terminal without encryption.
In step S302, according to the key target user identification, a video window of the sender mobile terminal is opened;
in the embodiment of the invention, when the key target user is the receiver mobile terminal user, the eyeball information of the receiver mobile terminal user is collected through the video window of the sender mobile terminal.
In step S303, eyeball information of the recipient mobile terminal user is collected through the video window;
in embodiments of the present invention, for example, eye information includes, but is not limited to; iris information, sclera information, and the like.
In step S304, the collected eyeball information of the receiving-side mobile terminal user is used to encrypt the file to be transmitted.
In step S305, the encrypted file to be transmitted is transmitted to the receiving mobile terminal according to the file transmission instruction.
As can be seen from the above, in the embodiment, when a file is transmitted, a video window is opened, and eyeball information of a receiver mobile terminal user is collected as an encryption key; and encrypting the file according to the eyeball information, and sending the encrypted file to the mobile terminal of the receiving party. Therefore, the invention can ensure the security of network transmission files, is convenient and quick, and greatly improves the use experience of users.
Example four
Referring to fig. 4, a decryption method for a transmission file according to an embodiment of the invention is shown.
The method for decrypting the transmission file is applied to mobile terminal equipment and specifically comprises the following steps:
in step S401, receiving an encrypted file and a decrypted specified user identifier sent by a sender mobile terminal;
in the embodiment of the present invention, the received encrypted file is a file obtained by encrypting the received encrypted file by using the encryption method for the transmission file.
In step S402, a key for decrypting the encrypted file is obtained according to the decryption-specified user identifier;
in step S403, decrypting the encrypted file by using the decrypted key;
in this embodiment of the present invention, after the step of decrypting the encrypted file by using the decrypted key, the method further includes: judging whether the number of decryption failure times exceeds a preset threshold value within a preset time; and if the times of decryption failure exceed a preset threshold value, deleting the encrypted file.
In step S404, if the decryption is successful, the file is opened.
In the embodiment of the invention, after the decryption is successful, the file is opened for the receiving party user to check; and when receiving the modification instruction, not executing the modification operation corresponding to the modification instruction.
However, it will be appreciated that if decryption fails, the file cannot be opened.
Further, if decryption fails, the file cannot be opened and the encrypted file is deleted.
As can be seen from the above, the mobile terminal of the receiving party in this embodiment decrypts the received encrypted file according to the specified eyeball information, and only if the decryption is successful, the file can be opened for viewing; if decryption fails, the file cannot be opened and the encrypted file is deleted. Therefore, the invention can ensure the security of network transmission files, is convenient and quick, and greatly improves the use experience of users.
EXAMPLE five
Referring to fig. 5, a decryption method for a transmission file according to an embodiment of the invention is shown.
The method for decrypting the transmission file is applied to mobile terminal equipment and specifically comprises the following steps:
in step S501, an encrypted file and a decrypted specified user identifier sent by a sender mobile terminal are received;
in the embodiment of the present invention, the received encrypted file is a file obtained by encrypting the received encrypted file by using the encryption method for the transmission file.
In step S502, an eyeball collection module of the receiver mobile terminal is started according to the decrypted designated user identifier;
in the embodiment of the invention, when the appointed user identifier for decryption is the user information of the mobile terminal of the receiving party, the eyeball collection module of the mobile terminal of the receiving party is started according to the user information, and the eyeball information of the mobile terminal user of the receiving party is collected to be used as the decryption key.
In step S503, the eyeball information of the receiver mobile terminal user is collected through the eyeball collection module;
in step S504, the encrypted file is decrypted by using the collected eyeball information of the receiving-side mobile terminal user.
In this embodiment of the present invention, after the step of decrypting the encrypted file, the method further includes: judging whether the number of decryption failure times exceeds a preset threshold value within a preset time; and if the times of decryption failure exceed a preset threshold value, deleting the encrypted file.
In step S505, if the decryption is successful, the file is opened.
In the embodiment of the invention, after the decryption is successful, the file is opened for the receiving party user to check; and when receiving the modification instruction, not executing the modification operation corresponding to the modification instruction.
However, it will be appreciated that if decryption fails, the file cannot be opened.
Further, if decryption fails, the file cannot be opened and the encrypted file is deleted.
As can be seen from the above, the mobile terminal of the receiving party in this embodiment decrypts the received encrypted file according to the specified eyeball information, and only if the decryption is successful, the file can be opened for viewing; if decryption fails, the file cannot be opened and the encrypted file is deleted. Therefore, the invention can ensure the security of network transmission files, is convenient and quick, and greatly improves the use experience of users.
EXAMPLE six
Referring to fig. 6, a decryption method for a transmission file according to an embodiment of the invention is shown.
The method for decrypting the transmission file is applied to mobile terminal equipment and specifically comprises the following steps:
in step S601, receiving an encrypted file and a decrypted specified user identifier sent by a sender mobile terminal;
in the embodiment of the present invention, the received encrypted file is a file obtained by encrypting the received encrypted file by using the encryption method for the transmission file.
In step S602, eyeball information sent by the sender mobile terminal is received, and the eyeball information is obtained according to the decrypted specified user identifier, where the eyeball information is eyeball information of the sender mobile terminal user;
in the embodiment of the invention, when the user information of which the appointed user identifier is the sender mobile terminal is decrypted, eyeball information of the sender mobile terminal user is obtained to be used as a decryption key.
In step S603, the encrypted file is decrypted by using the obtained eyeball information of the sender mobile terminal user.
In this embodiment of the present invention, after the step of decrypting the encrypted file, the method further includes: judging whether the number of decryption failure times exceeds a preset threshold value within a preset time; and if the times of decryption failure exceed a preset threshold value, deleting the encrypted file.
In step S604, if the decryption is successful, the file is opened.
In the embodiment of the invention, after the decryption is successful, the file is opened for the receiving party user to check; and when receiving the modification instruction, not executing the modification operation corresponding to the modification instruction.
However, it will be appreciated that if decryption fails, the file cannot be opened.
Further, if decryption fails, the file cannot be opened and the encrypted file is deleted.
As can be seen from the above, the mobile terminal of the receiving party in this embodiment decrypts the received encrypted file according to the specified eyeball information, and only if the decryption is successful, the file can be opened for viewing; if decryption fails, the file cannot be opened and the encrypted file is deleted. Therefore, the invention can ensure the security of network transmission files, is convenient and quick, and greatly improves the use experience of users.
EXAMPLE seven
Fig. 7 is a schematic structural diagram of an encryption apparatus for transmitting a file according to a seventh embodiment of the present invention; for convenience of explanation, only portions related to the embodiments of the present invention are shown. The encryption device for the transmission file comprises: a receiving module 101, a key obtaining module 102, an encryption module 103, and a transmission module 104. The encryption device for the transmission file can be a software unit, a hardware unit or a combination of software and hardware unit built in the mobile terminal.
A receiving module 101, configured to receive a file to be transmitted and a file transmission instruction, where the file transmission instruction carries a key target user identifier;
a key obtaining module 102, configured to obtain, according to the key target user identifier, a key for encrypting the file to be transmitted;
the encryption module 103 is configured to encrypt the file to be transmitted by using the key;
and the transmission module 104 is configured to transmit the encrypted file to be transmitted to the receiver mobile terminal according to the file transmission instruction.
In this embodiment of the present invention, the encryption apparatus for transmitting a file further includes: and a judging module.
After a receiving module 101 receives a file to be transmitted and a file transmission instruction, wherein the file transmission instruction carries a key target user identifier, a judging module is used for judging whether the file to be transmitted comprises a preset keyword or not; and the key acquisition module is specifically used for determining that the file to be transmitted is a file to be encrypted if the judgment module judges that the file to be transmitted comprises the preset keywords, and executing to acquire the key for encrypting the file to be transmitted.
Example eight
Fig. 8 is a schematic structural diagram of an encryption apparatus for transmitting a file according to an eighth embodiment of the present invention; for convenience of explanation, only portions related to the embodiments of the present invention are shown. The encryption device for the transmission file comprises: the system comprises a receiving module 201, an opening module 202, an eyeball collecting module 203, an encryption module 204 and a transmission module 205. The encryption device for the transmission file can be a software unit, a hardware unit or a combination of software and hardware unit built in the mobile terminal.
A receiving module 201, configured to receive a file to be transmitted and a file transmission instruction, where the file transmission instruction carries a key target user identifier;
the starting module 202 is used for starting an eyeball acquisition module of the sender mobile terminal according to the key target user identifier;
the eyeball collection module 203 is used for collecting eyeball information of a sender mobile terminal user;
the encryption module 204 is specifically configured to encrypt the file to be transmitted by using the collected eyeball information of the sender mobile terminal user.
And the transmission module 205 is configured to transmit the encrypted file to be transmitted to the mobile terminal of the receiving party according to the file transmission instruction.
Example nine
Please refer to fig. 9, which is a schematic structural diagram of an encryption apparatus for transmitting a file according to a ninth embodiment of the present invention; for convenience of explanation, only portions related to the embodiments of the present invention are shown. The encryption device for the transmission file comprises: a receiving module 301, a video window opening module 302, a video capture module 303, an encryption module 304, and a transmission module 305. The encryption device for the transmission file can be a software unit, a hardware unit or a combination of software and hardware unit built in the mobile terminal.
A receiving module 301, configured to receive a file to be transmitted and a file transmission instruction, where the file transmission instruction carries a key target user identifier;
a video window opening module 302, configured to open a video window of the sender mobile terminal according to the key target user identifier;
the video acquisition module 303 is configured to acquire eyeball information of a receiver mobile terminal user through the video window;
the encryption module 304 is specifically configured to encrypt the file to be transmitted by using the collected eyeball information of the mobile terminal user of the receiving party.
The transmission module 305 is configured to transmit the encrypted file to be transmitted to the receiver mobile terminal according to the file transmission instruction.
Example ten
Please refer to fig. 10, which is a schematic structural diagram of an encryption apparatus for transmitting a file according to a tenth embodiment of the present invention; for convenience of explanation, only portions related to the embodiments of the present invention are shown. The encryption device for the transmission file comprises: a receiving module 401, a key obtaining module 402, a decryption module 403, and a file opening module 404. The encryption device for the transmission file can be a software unit, a hardware unit or a combination of software and hardware unit built in the mobile terminal.
A receiving module 401, configured to receive an encrypted file and a decrypted specified user identifier sent by a sender mobile terminal;
a key obtaining module 402, configured to obtain, according to the decryption-specified user identifier, a key for decrypting the encrypted file;
a decryption module 403, configured to decrypt the encrypted file using the decrypted key;
and a file opening module 404, configured to open the file if the decryption is successful.
In this embodiment of the present invention, the apparatus for decrypting the transmission file further includes: and a frequency judging module.
Namely, when the decryption module 403 decrypts the encrypted file by using the decrypted key; the frequency judging module is used for judging whether the frequency of decryption failure exceeds a preset threshold value within preset time; and the file deleting module is used for deleting the encrypted file if the times of decryption failure judged by the times judging module exceed a preset threshold value.
In this embodiment of the present invention, the apparatus for decrypting the transmission file further includes: a control module;
the file opening module is specifically used for opening the file for the receiving party user to check after the decryption is successful;
and the control module is used for controlling not to execute the modification operation corresponding to the modification instruction when the modification instruction is received.
EXAMPLE eleven
Please refer to fig. 11, which is a schematic structural diagram of an encryption apparatus for transmitting a file according to an eleventh embodiment of the present invention; for convenience of explanation, only portions related to the embodiments of the present invention are shown. The encryption device for the transmission file comprises: a receiving module 501, an opening module 502, an eyeball collecting module 503, a decrypting module 504, and a file opening module 505. The encryption device for the transmission file can be a software unit, a hardware unit or a combination of software and hardware unit built in the mobile terminal.
A receiving module 501, configured to receive an encrypted file and a decrypted specified user identifier sent by a sender mobile terminal;
an opening module 502, configured to open an eyeball collection module of the receiver mobile terminal according to the decrypted specified user identifier;
an eyeball collection module 503, configured to collect eyeball information of a recipient mobile terminal user;
the decryption module 504 is specifically configured to decrypt the encrypted file by using the collected eyeball information of the mobile terminal user of the receiving party.
And a file opening module 505, configured to open the file if the decryption is successful.
In this embodiment of the present invention, the apparatus for decrypting the transmission file further includes: and a frequency judging module.
Namely, when the decryption module decrypts the encrypted file by adopting the decrypted key; the frequency judging module is used for judging whether the frequency of decryption failure exceeds a preset threshold value within preset time; and the file deleting module is used for deleting the encrypted file if the times of decryption failure judged by the times judging module exceed a preset threshold value.
In this embodiment of the present invention, the apparatus for decrypting the transmission file further includes: a control module;
the file opening module is specifically used for opening the file for the receiving party user to check after the decryption is successful;
and the control module is used for controlling not to execute the modification operation corresponding to the modification instruction when the modification instruction is received.
Example twelve
Please refer to fig. 12, which is a schematic structural diagram of an encryption apparatus for transmitting a file according to a twelfth embodiment of the present invention; for convenience of explanation, only portions related to the embodiments of the present invention are shown. The encryption device for the transmission file comprises: a receiving module 601, a key obtaining module 602, a decryption module 603, and a file opening module 604. The encryption device for the transmission file can be a software unit, a hardware unit or a combination of software and hardware unit built in the mobile terminal.
A receiving module 601, configured to receive an encrypted file and a decrypted specified user identifier sent by a sender mobile terminal;
a key obtaining module 602, configured to specifically receive and obtain eyeball information sent by a sender mobile terminal according to the decrypted specified user identifier, where the eyeball information is eyeball information of a sender mobile terminal user;
the decryption module 603 is specifically configured to decrypt the encrypted file by using the obtained eyeball information of the sender mobile terminal user.
And a file opening module 604, configured to open the file if the decryption is successful.
In this embodiment of the present invention, the apparatus for decrypting the transmission file further includes: and a frequency judging module.
Namely, when the decryption module decrypts the encrypted file by adopting the decrypted key; the frequency judging module is used for judging whether the frequency of decryption failure exceeds a preset threshold value within preset time; and the file deleting module is used for deleting the encrypted file if the times of decryption failure judged by the times judging module exceed a preset threshold value.
In this embodiment of the present invention, the apparatus for decrypting the transmission file further includes: a control module;
the file opening module is specifically used for opening the file for the receiving party user to check after the decryption is successful;
and the control module is used for controlling not to execute the modification operation corresponding to the modification instruction when the modification instruction is received.
According to the encryption and decryption method and the encryption and decryption device for the transmission file, when the file is transmitted, the file is encrypted according to the appointed eyeball information and then sent to the mobile terminal of the receiving party after encryption, the mobile terminal of the receiving party acquires the appointed eyeball information to decrypt the received encrypted file, and the file can be opened for viewing only if decryption is successful. Therefore, the invention can ensure the security of network transmission files, is convenient and quick, and greatly improves the use experience of users.
The encryption and decryption methods and the encryption and decryption devices for the transmission file provided by the embodiment of the invention belong to the same concept, and the specific implementation process is detailed in the whole specification and is not repeated herein.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
In summary, although the present invention has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, therefore, the scope of the present invention shall be determined by the appended claims.