技术领域technical field
本发明实施例涉及通信技术领域,特别涉及一种解密方法、加密方法、终端设备、服务器及可读存储介质。The embodiments of the present invention relate to the technical field of communications, and in particular, to a decryption method, an encryption method, a terminal device, a server, and a readable storage medium.
背景技术Background technique
加密,是以某种特殊的算法改变原有的信息数据,使得未授权的用户即使获得了已加密的信息,但因不知解密的方法,仍然无法了解信息的内容。Encryption is to change the original information data with a special algorithm, so that even if unauthorized users obtain the encrypted information, they still cannot understand the content of the information because they do not know the decryption method.
然而,发明人发现相关技术中至少存在如下问题:当对加密文件进行解密时,一般需要从加密者处获知到解密密码,才能够对加密文件进行解密。然而,一方面,很多加密者对很多文件都采用同一加密密码,导致加密文件的安全性较低;另一方面,若加密者为不同的文件设置不同的密码,加密者自己又常常无法记住针对不同文件的不同密码,不便于文件管理。However, the inventors have found at least the following problem in the related art: when decrypting an encrypted file, the encrypted file can only be decrypted after knowing the decryption password from the encryptor. However, on the one hand, many encryptors use the same encryption password for many files, resulting in low security of the encrypted files; on the other hand, if the encryptor sets different passwords for different files, the encryptor often cannot remember them Different passwords for different files are not convenient for file management.
发明内容Contents of the invention
本发明实施方式的目的在于提供一种解密方法、加密方法、终端设备、服务器及可读存储介质,不仅方便对文件进行加密的用户对一些临时性质的加密文件进行远程解密;而且,由于不是直接告知对方加密文件的密码,使得即使对文件进行加密的用户对很多文件都采用同一加密密码,也可以保证到加密文件的安全性。The purpose of the embodiments of the present invention is to provide a decryption method, an encryption method, a terminal device, a server, and a readable storage medium, which not only make it convenient for users who encrypt files to remotely decrypt some temporary encrypted files; Inform the other party of the password of the encrypted file, so that even if the user who encrypts the file uses the same encryption password for many files, the security of the encrypted file can be guaranteed.
为解决上述技术问题,本发明的实施方式提供了一种解密方法,包括:接收多媒体文件;多媒体文件携带以预设方式隐藏于多媒体文件的解密信息;对多媒体文件进行解析,得到解密信息;根据解密信息,对加密文件进行解密。In order to solve the above technical problems, the embodiment of the present invention provides a decryption method, comprising: receiving a multimedia file; the multimedia file carries decryption information hidden in the multimedia file in a preset manner; parsing the multimedia file to obtain the decryption information; Decrypt information, decrypt encrypted files.
本发明的实施方式还提供了一种加密方法,包括:对文件进行加密,生成加密文件;加密文件用于供文件接收设备获取;将加密文件的解密信息隐藏于多媒体文件;发送多媒体文件,供文件接收设备对多媒体文件进行解析,得到解密信息,根据解密信息,对加密文件进行解密。The embodiment of the present invention also provides an encryption method, including: encrypting the file to generate an encrypted file; the encrypted file is used for obtaining by the file receiving device; hiding the decryption information of the encrypted file in the multimedia file; sending the multimedia file for The file receiving device analyzes the multimedia file to obtain decryption information, and decrypts the encrypted file according to the decryption information.
本发明的实施方式还提供了一种终端设备,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使所述至少一个处理器能够执行上述的解密方法,或者以使所述至少一个处理器能够执行上述的加密方法。Embodiments of the present invention also provide a terminal device, including: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by at least one processor. Executed by a processor, so that the at least one processor can execute the above decryption method, or enable the at least one processor to execute the above encryption method.
本发明的实施方式还提供了一种服务器,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行如上述的加密方法。Embodiments of the present invention also provide a server, including: at least one processor; and a memory connected in communication with at least one processor; wherein, the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor. executed by a processor, so that at least one processor can execute the encryption method as described above.
本发明的实施方式还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现上述的解密方法,或者计算机程序被处理器执行时实现上述的加密方法。Embodiments of the present invention also provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned decryption method is realized, or when the computer program is executed by the processor, the above-mentioned encryption method is realized.
本发明实施方式相对于现有技术而言,提供的一种解密方法,通过在接收到携带隐藏于多媒体文件的解密信息的多媒体文件后,对多媒体文件进行解析,得到解密信息,并根据解密信息,对加密文件进行解密。由于是根据接收到的隐藏于多媒体文件的解密信息,对加密文件进行解密,可以使得在对文件进行加密的用户无需告知对方解密密码的情况下,即可通过发送多媒体文件的方式,供对方对加密文件进行解密,从而方便对文件进行加密的用户对一些临时性质的加密文件进行远程解密;而且,由于不是直接告知对方加密文件的密码,使得即使对文件进行加密的用户对很多文件都采用同一加密密码,也可以保证到加密文件的安全性。Compared with the prior art, the embodiments of the present invention provide a decryption method. After receiving the multimedia file carrying the decryption information hidden in the multimedia file, the multimedia file is analyzed to obtain the decryption information, and according to the decryption information , to decrypt the encrypted file. Since the encrypted file is decrypted according to the received decryption information hidden in the multimedia file, the user who encrypts the file can send the multimedia file without informing the other party of the decryption password. The encrypted file is decrypted, so that the user who encrypts the file can remotely decrypt some temporary encrypted files; moreover, because the password of the encrypted file is not directly informed to the other party, even the user who encrypts the file uses the same password for many files. Encrypted passwords can also ensure the security of encrypted files.
另外,多媒体文件,具体为:通过文件发送设备设置的视频彩铃;加密文件,具体为:通过文件发送设备加密的文件。在该应用场景中,由于多媒体文件是通过文件发送设备设置的视频彩铃,因此无需用户专门发送视频、图片等,而是通过视频彩铃这种属于常规业务的方式,将解密信息传送给对方,有利于提高解密的便捷性;又由于视频彩铃本身的种类较多,而视频彩铃本身又是和解密信息是一体的,因此有利于提高解密的安全性;并且视频彩铃的缓存不需要额外耗费流量,有利于节省用户的解密成本;视频彩铃具有短小精悍等优点,占用空间较小。In addition, the multimedia file is specifically: a video ring tone set by the file sending device; the encrypted file is specifically: a file encrypted by the file sending device. In this application scenario, since the multimedia file is a video ring tone set by the file sending device, there is no need for the user to specifically send videos, pictures, etc., but the decryption information is transmitted to the other party through the video ring tone, which is a regular business method. It is beneficial to improve the convenience of decryption; and since there are many types of video ring back tones, and the video ring tones themselves are integrated with the decryption information, it is beneficial to improve the security of decryption; and the cache of video ring tones does not require additional traffic. It is beneficial to save the user's decryption cost; the video ring back tone has the advantages of being short and compact, and takes up less space.
另外,根据解密信息,对加密文件进行解密,包括:当检测到加密文件被触发时,根据解密信息,对被触发的加密文件进行解密。通过当检测到加密文件被触发时,再根据解密信息进行解密,可以使得当终端设备本地存在多个加密文件时,获知应当根据解密信息,对具体哪一个加密文件进行解密,从而可以提高解密效率。In addition, decrypting the encrypted file according to the decryption information includes: when it is detected that the encrypted file is triggered, decrypting the triggered encrypted file according to the decryption information. By decrypting according to the decryption information when the encrypted file is detected to be triggered, it is possible to know which encrypted file should be decrypted according to the decryption information when there are multiple encrypted files locally on the terminal device, thereby improving the decryption efficiency .
另外,对多媒体文件进行解析,得到解密信息,具体为:对最近一次接收到的多媒体文件进行解析,得到解密信息。通过对最近一次接收到的多媒体文件进行解析,得到解密信息,可以使得当接收到多个多媒体文件时,获知应当先根据哪一个多媒体文件进行解析,以便于根据得到的解密信息对加密文件进行解密,可以进一步提高解密效率。In addition, the multimedia file is analyzed to obtain decryption information, specifically: the latest received multimedia file is analyzed to obtain decryption information. By parsing the latest received multimedia file to obtain decryption information, it is possible to know which multimedia file should be parsed first when multiple multimedia files are received, so as to decrypt the encrypted file according to the obtained decryption information , which can further improve the decryption efficiency.
另外,应用于服务器;将加密文件的解密信息隐藏于多媒体文件,包括:对原始多媒体文件进行复制,得到多媒体文件;获取与多媒体文件对应的第一标识信息;其中,第一标识信息用于识别与多媒体文件对应的加密文件;将加密文件的解密信息以及第一标识信息隐藏于多媒体文件。通过对原始多媒体文件进行复制,得到多媒体文件,可以解决很多用户都将各自的解密信息隐藏于这一个多媒体文件中而使得多媒体文件被污染的情况;而且,这样做还可以达到不干扰其他用户将该多媒体文件对其他文件进行解密的目的;通过对复制后的多媒体文件添加第一标识信息,还可以避免多媒体文件与加密文件对应关系的混乱。In addition, it is applied to the server; the decryption information of the encrypted file is hidden in the multimedia file, including: copying the original multimedia file to obtain the multimedia file; obtaining the first identification information corresponding to the multimedia file; wherein the first identification information is used for identification An encrypted file corresponding to the multimedia file; hiding the decryption information of the encrypted file and the first identification information in the multimedia file. By copying the original multimedia file to obtain the multimedia file, it can solve the situation that many users hide their decryption information in this multimedia file and make the multimedia file polluted; The multimedia file decrypts other files; by adding the first identification information to the copied multimedia file, the confusion of the corresponding relationship between the multimedia file and the encrypted file can also be avoided.
另外,应用于服务器;在对文件进行加密,生成加密文件后,还包括:发送与加密文件对应的第二标识信息,供文件接收设备获取;其中,第二标识信息用于识别与加密文件对应的多媒体文件;若接收到文件接收设备上传的第二标识信息,则获取与第二标识信息对应的多媒体文件;将与第二标识信息对应的多媒体文件发送至文件接收设备。通过将与第二标识信息对应的多媒体文件发送至文件接收设备,可以解决在时间过得比较久的情况下,由于服务器并不知晓用户要对具体哪一个加密文件进行解密,也就无法向用户精准地发送用于对该加密文件进行解密的多媒体文件的技术问题。In addition, it is applied to the server; after encrypting the file and generating the encrypted file, it also includes: sending the second identification information corresponding to the encrypted file for the file receiving device to obtain; wherein, the second identification information is used to identify the If the second identification information uploaded by the file receiving device is received, the multimedia file corresponding to the second identification information is obtained; and the multimedia file corresponding to the second identification information is sent to the file receiving device. By sending the multimedia file corresponding to the second identification information to the file receiving device, it can be solved that when the time passes for a long time, since the server does not know which encrypted file the user wants to decrypt, it cannot send the encrypted file to the user. The technical problem of accurately sending the multimedia file used to decrypt the encrypted file.
附图说明Description of drawings
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。One or more embodiments are exemplified by the pictures in the corresponding drawings, and these exemplifications do not constitute a limitation to the embodiments. Elements with the same reference numerals in the drawings represent similar elements. Unless otherwise stated, the drawings in the drawings are not limited to scale.
图1是根据本发明第一实施方式提供的一种解密方法的流程图;Fig. 1 is a flowchart of a decryption method provided according to the first embodiment of the present invention;
图2是根据本发明第一实施方式提供的一种解密方法中的一种多媒体文件的示意图;Fig. 2 is a schematic diagram of a multimedia file in a decryption method provided according to the first embodiment of the present invention;
图3是根据本发明第一实施方式提供的一种解密方法中的一种将解密信息隐藏于多媒体文件之前的多媒体文件的示意图;3 is a schematic diagram of a multimedia file in which decryption information is hidden before the multimedia file in a decryption method provided according to the first embodiment of the present invention;
图4是根据本发明第一实施方式提供的一种解密方法中的一种将解密信息隐藏于多媒体文件之后的多媒体文件的示意图;4 is a schematic diagram of a multimedia file in which decryption information is hidden behind the multimedia file in a decryption method provided according to the first embodiment of the present invention;
图5是根据本发明第一实施方式提供的一种解密方法中的一种将加密文件的加密信息隐藏于多媒体文件的示意图;5 is a schematic diagram of hiding the encryption information of an encrypted file in a multimedia file in a decryption method provided according to the first embodiment of the present invention;
图6是根据本发明第二实施方式提供的一种解密方法的流程图;Fig. 6 is a flow chart of a decryption method provided according to the second embodiment of the present invention;
图7是根据本发明第三实施方式提供的一种解密方法的流程图;Fig. 7 is a flowchart of a decryption method provided according to the third embodiment of the present invention;
图8是根据本发明第三实施方式提供的一种解密方法中,步骤301的子步骤的流程图;FIG. 8 is a flow chart of the sub-steps of step 301 in a decryption method according to the third embodiment of the present invention;
图9是根据本发明第四实施方式提供的一种解密方法的流程图;Fig. 9 is a flowchart of a decryption method provided according to the fourth embodiment of the present invention;
图10是根据本发明第五实施方式提供的一种解密方法的流程图;Fig. 10 is a flowchart of a decryption method provided according to the fifth embodiment of the present invention;
图11是根据本发明第六实施方式提供的一种终端设备的结构连接示意图;FIG. 11 is a schematic structural connection diagram of a terminal device provided according to a sixth embodiment of the present invention;
图12是根据本发明第七实施方式提供的一种服务器的结构连接示意图。Fig. 12 is a schematic diagram of a structural connection of a server provided according to a seventh embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本发明各实施方式中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请所要求保护的技术方案。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, various implementation modes of the present invention will be described in detail below in conjunction with the accompanying drawings. However, those of ordinary skill in the art can understand that, in each implementation manner of the present invention, many technical details are provided for readers to better understand the present application. However, even without these technical details and various changes and modifications based on the following implementation modes, the technical solution claimed in this application can also be realized.
本发明的第一实施方式涉及一种解密方法。本实施方式中,通过在接收到携带以预设方式隐藏于多媒体文件的解密信息的多媒体文件后,对多媒体文件进行解析,得到解密信息,并根据解密信息,对加密文件进行解密。The first embodiment of the present invention relates to a decryption method. In this embodiment, after receiving the multimedia file carrying the decryption information hidden in the multimedia file in a preset manner, the multimedia file is analyzed to obtain the decryption information, and the encrypted file is decrypted according to the decryption information.
由于是根据接收到的多媒体文件对加密文件进行解密,可以使得在对文件进行加密的用户无需告知对方解密密码的情况下,即可通过发送多媒体文件的方式,供对方对加密文件进行解密,从而方便对文件进行加密的用户对一些临时性质的加密文件进行远程解密;而且,由于不是直接告知对方加密文件的密码,使得即使对文件进行加密的用户对很多文件都采用同一加密密码,也可以保证到加密文件的安全性。Since the encrypted file is decrypted according to the received multimedia file, the user who encrypts the file does not need to inform the other party of the decryption password, and can send the multimedia file for the other party to decrypt the encrypted file, thereby It is convenient for users who encrypt files to remotely decrypt some temporary encrypted files; moreover, since the password of the encrypted file is not directly informed to the other party, even if the user who encrypts the file uses the same encryption password for many files, it can also be guaranteed to the security of encrypted files.
下面对本实施方式的解密方法的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须。The implementation details of the decryption method in this embodiment will be described in detail below, and the following content is only implementation details provided for easy understanding, and is not necessary for implementing this solution.
本实施方式中的解密方法的流程图如图1所示,包括:The flowchart of the decryption method in this embodiment is as shown in Figure 1, including:
步骤101,接收多媒体文件。Step 101, receiving a multimedia file.
其中,多媒体文件携带隐藏于多媒体文件的解密信息。Wherein, the multimedia file carries decryption information hidden in the multimedia file.
其中,这里所说的多媒体文件可以包括但不限于:视频、音频、视频彩铃、彩铃、图片。可以是从文件发送设备接收的多媒体文件,也可以从服务器接收的多媒体文件,本实施方式对此不作任何限定。Wherein, the multimedia files mentioned here may include but not limited to: video, audio, video ringtone, ringtone, picture. It may be a multimedia file received from a file sending device, or a multimedia file received from a server, which is not limited in this embodiment.
可以理解,由于多媒体文件携带解密信息,则还存在与解密信息对应的加密信息。It can be understood that since the multimedia file carries decryption information, there is also encryption information corresponding to the decryption information.
在一个例子中,可以通过如下方式将加密信息隐藏于多媒体文件:对根据用户输入的加密信息进行MD5消息摘要算法(MD5 Message-Digest Algorithm)转换,得到16位或32位字符串,将得到的字符串与用户选定的多媒体文件进行合并,生成携带隐藏于多媒体文件的解密信息的多媒体文件。In one example, the encrypted information can be hidden in the multimedia file in the following manner: the encrypted information input by the user is converted by an MD5 message digest algorithm (MD5 Message-Digest Algorithm) to obtain a 16-bit or 32-bit character string, and the obtained The character string is combined with the multimedia file selected by the user to generate a multimedia file carrying decryption information hidden in the multimedia file.
具体的说,假设用户将输入的加密密码:000000作为加密信息,则终端设备或服务器可以根据MD5消息摘要算法(MD5 Message-Digest Algorithm),将该加密密码(即000000)转为16位或32位字符串,得到对应的MD5值:8ad9902aecba32e2。终端设备或服务器可以将该MD5值保存为比如.txt、.dat、.key等格式的文件。然后将得到的包括MD5值的文件与多媒体文件进行合并,参见图2,在该例子中,多媒体文件为视频文件,其中,方框框出的“1.mp4”表示视频文件,方框框出的“1.txt”表示包括MD5值的文件,方框框出的“3.mp4”表示将字符串与视频文件进行合并后生成的视频文件。参见图3及图4,其中,图3表示还未携带解密信息的视频文件,其右下角指示的数字为:“83.100”,图4表示携带解密信息的视频文件,其右下角指示的数字为:“83.1008ad9902aecba32e2”。也就是说,这里的“8ad9902aecba32e2”为本实施方式中的解密信息。Specifically, assuming that the user enters the encrypted password: 000000 as encrypted information, the terminal device or server can convert the encrypted password (that is, 000000) into 16-bit or 32-bit data according to the MD5 Message-Digest Algorithm. Bit string, get the corresponding MD5 value: 8ad9902aecba32e2. The terminal device or the server can save the MD5 value as a file in a format such as .txt, .dat, .key, etc. Then the obtained file and the multimedia file including the MD5 value are merged, referring to Fig. 2, in this example, the multimedia file is a video file, wherein, the "1.mp4" in the square frame represents the video file, and the "1. 1.txt" means the file including the MD5 value, and "3.mp4" in the box means the video file generated by merging the character string and the video file. Referring to Fig. 3 and Fig. 4, wherein, Fig. 3 represents the video file that does not carry decryption information yet, and the number indicated in its lower right corner is: "83.100", and Fig. 4 represents the video file carrying decryption information, and the number indicated in its lower right corner is : "83.1008ad9902aecba32e2". That is to say, "8ad9902aecba32e2" here is the decrypted information in this embodiment.
在一个例子中,还可以通过如下方式将加密信息隐藏于多媒体文件:终端设备或服务器可以根据多媒体文件生成随机特征码,将该随机特征码作为解密信息。In an example, the encrypted information may also be hidden in the multimedia file in the following way: the terminal device or the server may generate a random feature code according to the multimedia file, and use the random feature code as the decryption information.
具体的说,终端设备或服务器可以根据多媒体文件的地址信息生成随机特征码。如图5所示,虚线框11中的数据表示多媒体文件中的地址信息;虚线框12中的数据表示与每个地址信息分别对应的16进制值。比如说,地址信息为000f65c0h对应的16进制值为63 0000 00 00 00 00 01 00 00 00 01 00 00 01。则可以选取该16进制值的起点和终点,比如选取63 00 00 00 00 00 00 01作为根据多媒体文件生成随机特征码,即解密信息。当然,也可以整个16进制值作为解密信息。由于选取的地址段越长,解密信息表征的数值越复杂,对应的加密文件的安全性越高。其中,如果该地址段对应的16进制值较为单一,比如均为零、均为1等情况,则终端设备或服务器可以对多媒体文件的地址信息进行重新选取。Specifically, the terminal device or the server can generate a random feature code according to the address information of the multimedia file. As shown in FIG. 5 , the data in the dotted box 11 represents the address information in the multimedia file; the data in the dotted box 12 represents the hexadecimal value corresponding to each address information. For example, the hexadecimal value corresponding to the address information 000f65c0h is 63 0000 00 00 00 00 01 00 00 00 01 00 00 01. Then the starting point and the ending point of the hexadecimal value can be selected, for example, 63 00 00 00 00 00 00 01 is selected as the random feature code generated according to the multimedia file, that is, the decryption information. Of course, the entire hexadecimal value can also be used as the decryption information. Since the longer the selected address segment, the more complex the value represented by the decryption information, the higher the security of the corresponding encrypted file. Wherein, if the hexadecimal value corresponding to the address segment is relatively single, for example, all are zero, all are 1, etc., then the terminal device or server can reselect the address information of the multimedia file.
需要说明的是,上述将加密信息隐藏于多媒体文件的方式仅为举例说明,任何可将加密信息隐藏于多媒体文件的方式均在本实施方式的保护范围之内。It should be noted that the above method of hiding the encrypted information in the multimedia file is only an example, and any method that can hide the encrypted information in the multimedia file falls within the scope of protection of this embodiment.
步骤102,对多媒体文件进行解析,得到解密信息。Step 102, analyze the multimedia file to obtain decryption information.
具体的说,可以在接收多媒体文件时,即对多媒体文件进行解析,得到解密信息;也可以是在检测到加密文件被触发时,再对多媒体文件进行解析,得到解密信息,本实施方式对此不作任何限定。Specifically, when a multimedia file is received, the multimedia file can be parsed to obtain the decryption information; or when the encrypted file is detected to be triggered, the multimedia file can be parsed to obtain the decryption information. Do not make any restrictions.
在一个例子中,终端设备可以对最近一次接收到的多媒体文件进行解析,得到解密信息。通过对最近一次接收到的多媒体文件进行解析,得到解密信息,可以使得当接收到多个多媒体文件时,获知应当先根据哪一个多媒体文件进行解析,以便于根据得到的解密信息对加密文件进行解密,可以进一步提高解密效率。In an example, the terminal device may analyze the latest received multimedia file to obtain decryption information. By parsing the latest received multimedia file to obtain decryption information, it is possible to know which multimedia file should be parsed first when multiple multimedia files are received, so as to decrypt the encrypted file according to the obtained decryption information , which can further improve the decryption efficiency.
步骤103,根据解密信息,对加密文件进行解密。Step 103, decrypt the encrypted file according to the decryption information.
在一个例子中,在得到解密信息后,终端设备可以遍历存在该终端设备中的所有的加密文件,并逐一尝试对所有的加密文件进行解密。比如说,终端设备中存在5个加密文件,由于在得到解密信息后,终端设备本身并不知晓该解密信息具体用于解密哪一个加密文件,因此,可以根据解密信息,随机选择5个加密文件中的1个加密文件进行解密,若解密失败,则再从剩下的4个加密文件中随机选择1个加密文件进行解密……直到对至少一个加密文件解密成功。In an example, after obtaining the decryption information, the terminal device may traverse all encrypted files stored in the terminal device, and try to decrypt all encrypted files one by one. For example, there are 5 encrypted files in the terminal device. After obtaining the decrypted information, the terminal device itself does not know which encrypted file the decrypted information is used to decrypt. Therefore, 5 encrypted files can be randomly selected according to the decrypted information. One of the encrypted files is decrypted, and if the decryption fails, one encrypted file is randomly selected from the remaining four encrypted files to be decrypted...until at least one encrypted file is successfully decrypted.
在另一个例子中,可以当检测到加密文件被触发时,再根据解密信息,对被触发的加密文件进行解密。比如说,某用户的手机中存在多个加密文件,在得到解密信息后,终端设备并不使用该解密信息对多个加密文件进行逐一尝试解密,而是当检测到某个加密文件被触发时,再根据解密信息,对被触发的加密文件进行解密。这样做,可以使得当终端设备存在多个加密文件时,获知应当根据解密信息,对具体哪一个加密文件进行解密,从而可以提高解密效率。In another example, when it is detected that the encrypted file is triggered, the triggered encrypted file can be decrypted according to the decryption information. For example, there are multiple encrypted files in a user's mobile phone. After obtaining the decryption information, the terminal device does not use the decryption information to try to decrypt the multiple encrypted files one by one, but when it detects that an encrypted file is triggered , and then decrypt the triggered encrypted file according to the decryption information. In this way, when there are multiple encrypted files in the terminal device, it can be known which encrypted file should be decrypted according to the decryption information, so that the decryption efficiency can be improved.
另外,本实施方式中,一个携带解密信息的多媒体文件可以对应多个加密文件。比如说,携带解密信息的多媒体文件1既可以用于对加密文件1进行解密,也可以用于对加密文件2进行解密;一个携带解密信息的多媒体文件可以与加密文件一一对应。比如说,携带解密信息的多媒体文件1仅可以用于对加密文件1进行解密;携带解密信息的多媒体文件2仅可以用于对加密文件2进行解密,本实施方式对此不作具体限定。In addition, in this implementation manner, one multimedia file carrying decryption information may correspond to multiple encrypted files. For example, multimedia file 1 carrying decryption information can be used to decrypt both encrypted file 1 and encrypted file 2; a multimedia file carrying decryption information can be in one-to-one correspondence with encrypted files. For example, multimedia file 1 carrying decryption information can only be used to decrypt encrypted file 1; multimedia file 2 carrying decryption information can only be used to decrypt encrypted file 2, which is not specifically limited in this embodiment.
另外,在根据解密信息,对加密文件进行解密后,还可以自动删除与加密文件对应的多媒体文件。比如说,终端设备根据解密信息,对加密文件进行解密后,自动打开加密文件供用户浏览,当检测到加密文件被关闭后,则自动删除与加密文件对应的多媒体文件,如果用户再想要打开该加密文件,由于用于解密的多媒体文件已被删除,因此还需要用户重新获取该多媒体文件才能够打开该加密文件,这样做,尤其适用于针对临时加密文件进行解密的场景,可以提高加密文件的安全性;进一步的,还可以在自动删除与加密文件对应的多媒体文件后的同时,还删除加密文件,这样做,可以进一步提高加密文件的安全性。当然,用户可以根据实际需求进行设置,本实施方式对此不作具体限定。In addition, after the encrypted file is decrypted according to the decryption information, the multimedia file corresponding to the encrypted file can also be automatically deleted. For example, after the terminal device decrypts the encrypted file according to the decryption information, it automatically opens the encrypted file for the user to browse. When it detects that the encrypted file is closed, it automatically deletes the multimedia file corresponding to the encrypted file. If the user wants to open it again For the encrypted file, since the multimedia file used for decryption has been deleted, the user needs to obtain the multimedia file again to open the encrypted file. This is especially applicable to the scene of decrypting the temporary encrypted file, which can improve the security of the encrypted file. Further, after automatically deleting the multimedia file corresponding to the encrypted file, the encrypted file can also be deleted, which can further improve the security of the encrypted file. Of course, the user can set according to actual needs, which is not specifically limited in this embodiment.
与现有技术相比,本实施方式提供的一种解密方法,由于是根据接收到的多媒体文件对加密文件进行解密,可以使得在对文件进行加密的用户无需告知对方解密密码的情况下,即可通过发送多媒体文件的方式,供对方对加密文件进行解密,从而方便对文件进行加密的用户对一些临时性质的加密文件进行远程解密;而且,由于不是直接告知对方加密文件的密码,使得即使对文件进行加密的用户对很多文件都采用同一加密密码,也可以保证到加密文件的安全性。Compared with the prior art, the decryption method provided by this embodiment decrypts the encrypted file according to the received multimedia file, so that the user who encrypts the file does not need to inform the other party of the decryption password, that is, By sending multimedia files, the other party can decrypt the encrypted file, so that the user who encrypts the file can remotely decrypt some temporary encrypted files; moreover, because the password of the encrypted file is not directly informed to the other party, even Users who encrypt files use the same encryption password for many files, which can also ensure the security of encrypted files.
本发明的第二实施方式涉及一种解密方法。第二实施方式是在第一实施方式的基础上进行的改进,具体改进之处在于:在本实施方式中,多媒体文件,具体为:通过文件发送设备设置的视频彩铃;加密文件,具体为:通过文件发送设备加密的文件。本实施方式中,无需用户专门发送视频、图片等,而是通过视频彩铃这种属于常规业务的方式,将解密信息发送给对方,有利于提高解密的便捷性;又由于视频彩铃本身的种类较多,而解密信息又是隐藏于视频彩铃中的,因此有利于提高解密的安全性;并且视频彩铃的缓存不需要额外耗费流量,有利于节省用户的解密成本;视频彩铃具有短小精悍等优点,占用空间较小。A second embodiment of the present invention relates to a decryption method. The second embodiment is an improvement made on the basis of the first embodiment. The specific improvements are: in this embodiment, the multimedia file is specifically: the video ring tone set by the file sending device; the encrypted file is specifically: Send device-encrypted files via file. In this embodiment, it is not necessary for the user to send videos, pictures, etc., but the decryption information is sent to the other party through the conventional business method of video ring back tones, which is conducive to improving the convenience of decryption; Many, and the decryption information is hidden in the video CRBT, so it is beneficial to improve the security of decryption; and the cache of the video CRBT does not need to consume additional traffic, which is beneficial to save the decryption cost of the user; the video CRBT has the advantages of short and compact, occupying Small space.
本实施方式中的解密方法的流程图如图6所示,包括:The flowchart of the decryption method in this embodiment is shown in Figure 6, including:
步骤201,接收视频彩铃。Step 201, receiving a video ring back tone.
具体的说,这里所说的视频彩铃,可以是通过文件发送设备设置的视频彩铃,该视频彩铃携带隐藏于视频彩铃的解密信息。Specifically, the video CRBT mentioned here may be a video CRBT set by a file sending device, and the video CRBT carries decryption information hidden in the video CRBT.
在一个例子中,A用户通过终端设备对文件进行加密生成加密文件,B用户通过某种方式获取到该加密文件后告知A用户,试图从A用户处获知该加密文件的解密信息。A用户可以通过手机为B用户设置一个临时性的、携带解密信息的视频彩铃,通过给B用户拨打电话的方式,将携带解密信息的视频彩铃发送给B用户,供B用户根据接收到的视频彩铃对加密文件进行解密。In one example, user A encrypts the file through a terminal device to generate an encrypted file, and user B obtains the encrypted file in some way and informs user A, trying to obtain the decryption information of the encrypted file from user A. User A can set a temporary video ring back tone with decrypted information for user B through the mobile phone, and send the video ring back tone with decrypted information to user B by calling user B, so that user B can use the received video The CRBT decrypts the encrypted file.
可以理解,假设B用户为自己设置的是视频彩铃1,那么理论上来说,当A用户给B用户拨打电话时,B用户的手机显示的应当是视频彩铃1;然而在该例子中,A用户为了将包括解密信息的视频彩铃2发送给B用户,可以为B用户设置一个临时性的、携带解密信息的视频彩铃2,所以,当A用户给B用户拨打电话时,B用户的手机显示的应当是视频彩铃2。在该例子中,视频彩铃2仅一次有效。也就是说,在A用户没有为B用户设置临时性的、携带解密信息的视频彩铃的前提下,A用户再给B用户拨打电话时,B用户的手机显示的应当是视频彩铃1。It can be understood that assuming that user B sets video ring back tone 1 for himself, then in theory, when user A calls user B, the mobile phone of user B should display video ring back tone 1; however, in this example, user A In order to send the video CRBT 2 including the decrypted information to user B, a temporary CRBT 2 carrying the decrypted information can be set for user B. Therefore, when user A makes a call to user B, the mobile phone of user B displays It should be video ring back tone 2. In this example, video CRBT 2 is valid only once. That is to say, on the premise that user A does not set a temporary video ring tone carrying decrypted information for user B, when user A calls user B again, user B's mobile phone should display video ring tone 1.
需要说明的是,在上述例子中,在A用户为B用户设置一个临时性的、携带解密信息的视频彩铃后,服务器可以自动给B用户拨打电话,以将该视频彩铃发送给B用户;也可以是通过A用户手动给B用户拨打电话的方式,将该视频彩铃发送给B用户,本实施方式对此不作具体限定。It should be noted that, in the above example, after user A sets a temporary video ring tone carrying decrypted information for user B, the server can automatically dial a call to user B to send the video ring tone to user B; It may be that the user A manually dials the call to the user B, and the video ring tone is sent to the user B, which is not specifically limited in this embodiment.
步骤202,对视频彩铃进行解析,得到解密信息。Step 202, analyze the video ring back tone to obtain decrypted information.
由于本步骤202与第一实施方式中的步骤102大致相同,区别仅在于本步骤是对视频彩铃进行解析,而第一实施方式中的步骤102是对多媒体文件进行解析,为避免重复,此处不在赘述。Because this step 202 is roughly the same as step 102 in the first embodiment, the only difference is that this step is to analyze the video ring back tone, and step 102 in the first embodiment is to analyze the multimedia file, in order to avoid repetition, here I won't go into details.
步骤203,根据解密信息,对加密文件进行解密。Step 203, decrypt the encrypted file according to the decryption information.
具体的说,这里所说的加密文件,可以是通过文件发送设备加密的文件。通过文件发送设备生成加密文件后,可以将加密文件直接发送给用户,在这种情况下,用户被动接收加密文件;还可以将加密文件发送至云平台,供相关用户获取,在这种情况下,用户主动获取加密文件。Specifically, the encrypted file mentioned here may be a file encrypted by a file sending device. After the encrypted file is generated by the file sending device, the encrypted file can be sent directly to the user. In this case, the user passively receives the encrypted file; the encrypted file can also be sent to the cloud platform for relevant users to obtain. In this case , the user actively obtains the encrypted file.
与现有技术相比,本实施方式提供的一种解密方法,无需用户专门发送视频、图片等,而是通过视频彩铃这种属于常规业务的方式,将解密信息发送给对方,有利于提高解密的便捷性;又由于视频彩铃本身的种类较多,而解密信息又是隐藏于视频彩铃中的,因此有利于提高解密的安全性;并且视频彩铃的缓存不需要额外耗费流量,有利于节省用户的解密成本;视频彩铃具有短小精悍等优点,占用空间较小。Compared with the existing technology, the decryption method provided by this embodiment does not require the user to send videos, pictures, etc., but sends the decryption information to the other party through the conventional business method of video ring back tones, which is conducive to improving the decryption process. convenience; and because there are many types of video ring back tones, and the decryption information is hidden in the video ring back tones, it is beneficial to improve the security of decryption; and the cache of video ring tones does not need to consume additional traffic, which is conducive to saving users The decryption cost; the video CRBT has the advantages of being short and compact, and takes up less space.
本发明的第三实施方式涉及一种加密方法。本实施方式中,对文件进行加密,生成加密文件;加密文件用于供文件接收设备获取;将加密文件的解密信息隐藏于多媒体文件;发送多媒体文件,供文件接收设备对多媒体文件进行解析,得到解密信息,根据解密信息,对加密文件进行解密。A third embodiment of the present invention relates to an encryption method. In this embodiment, the file is encrypted to generate an encrypted file; the encrypted file is used for the file receiving device to obtain; the decryption information of the encrypted file is hidden in the multimedia file; the multimedia file is sent for the file receiving device to analyze the multimedia file to obtain The decryption information is used to decrypt the encrypted file according to the decryption information.
由于是将加密文件的解密信息隐藏于多媒体文件后,再发送多媒体文件,供文件接收设备对多媒体文件进行解析,得到解密信息,然后再根据解密信息,对加密文件进行解密,可以使得在对文件进行加密的用户无需告知对方解密密码的情况下,即可通过发送多媒体文件的方式,供对方对加密文件进行解密,从而方便对文件进行加密的用户对一些临时性质的加密文件进行远程解密;而且,由于不是直接告知对方加密文件的密码,使得即使对文件进行加密的用户对很多文件都采用同一加密密码,也可以保证到加密文件的安全性。Because the decryption information of the encrypted file is hidden in the multimedia file, and then the multimedia file is sent for the file receiving device to analyze the multimedia file to obtain the decryption information, and then according to the decryption information, the encrypted file is decrypted. The encrypted user can send multimedia files for the encrypted file to be decrypted by the other party without informing the other party of the decryption password, so that the encrypted file user can remotely decrypt some temporary encrypted files; and , because the password of the encrypted file is not directly informed to the other party, even if the user who encrypts the file uses the same encryption password for many files, the security of the encrypted file can be guaranteed.
下面对本实施方式的解密方法的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须。The implementation details of the decryption method in this embodiment will be described in detail below, and the following content is only implementation details provided for easy understanding, and is not necessary for implementing this solution.
需要说明的是,本实施方式中的加密方法的执行主体既可以为终端设备,也可以为服务器,此处不作具体限定。It should be noted that the execution subject of the encryption method in this embodiment may be a terminal device or a server, which is not specifically limited here.
本实施方式中的加密方法的流程图如图7所示,包括:The flowchart of the encryption method in this embodiment is shown in Figure 7, including:
步骤301,对文件进行加密,生成加密文件。Step 301, encrypting the file to generate an encrypted file.
其中,加密文件用于供文件接收设备获取。Wherein, the encrypted file is used for obtaining by the file receiving device.
在一个例子中,执行主体为终端设备,终端设备可以根据用户提供的文件和加密信息,生成加密文件。In an example, the execution subject is a terminal device, and the terminal device can generate an encrypted file according to the file and encrypted information provided by the user.
在另一个例子中,执行主体为服务器,当执行主体为服务器时,步骤301可以包括如下子步骤,其流程图如图8所示:In another example, the execution subject is a server, when the execution subject is a server, step 301 may include the following sub-steps, the flow chart of which is shown in Figure 8:
子步骤3011,判断文件是否设有加密规则。若判定存在加密规则,则进入子步骤3013;否则,进入子步骤3012。Sub-step 3011, determine whether the file has encryption rules. If it is determined that there is an encryption rule, go to substep 3013; otherwise, go to substep 3012.
子步骤3012,自动对文件进行加密,生成加密文件。Sub-step 3012, encrypting the file automatically to generate an encrypted file.
子步骤3013,根据加密规则,对文件进行加密,生成加密文件。Sub-step 3013, encrypt the file according to the encryption rules to generate an encrypted file.
此处对子步骤3011至子步骤3013进行说明:Substep 3011 to substep 3013 are described here:
在一个例子中,用户可以将文件和加密规则、加密信息均上传至服务器,这样,服务器可以根据用户提供的文件和加密规则、加密信息,生成加密文件,在这种情况下,由于服务器是根据用户提供的加密规则、加密信息对文件进行加密的,因此用户应当知晓加密信息的具体内容。In one example, users can upload files, encryption rules, and encryption information to the server, so that the server can generate encrypted files according to the files, encryption rules, and encryption information provided by the user. In this case, since the server is based on The encryption rules and encrypted information provided by the user encrypt the file, so the user should know the specific content of the encrypted information.
在另一个例子中,用户可以将文件和加密规则上传至服务器(用户没有上传加密信息),这样,服务器可以根据用户提供的文件和加密规则,生成加密文件,在这种情况下,由于服务器是根据用户提供的文件和加密规则对文件进行加密的,即加密信息时服务器自动选取的,因此用户仅知晓加密文件的加密规则,而并不知晓加密信息的具体内容。In another example, the user can upload files and encryption rules to the server (the user does not upload encrypted information), so that the server can generate encrypted files according to the files and encryption rules provided by the user. In this case, since the server is The file is encrypted according to the file and encryption rules provided by the user, that is, the server automatically selects the encrypted information, so the user only knows the encryption rule of the encrypted file, but does not know the specific content of the encrypted information.
在另一个例子中,用户还可以仅将文件上传至服务器,这样,服务器可以根据用户提供的文件进行自动选取加密规则和加密信息对文件进行加密,在这种情况下,由于是服务器根据加密规则和加密信息自动对文件进行加密的,因此用户也并不知晓加密规则以及加密信息的具体内容。In another example, the user can also only upload the file to the server. In this way, the server can automatically select the encryption rule and encryption information to encrypt the file according to the file provided by the user. In this case, because the server encrypts the file according to the encryption rule The file is automatically encrypted with the encryption information, so the user does not know the encryption rules and the specific content of the encryption information.
在上述三个例子中的后两个例子中,由于服务器在生成加密文件的同时,还可以自行从数据库中获取多媒体文件,并将对应的解密信息隐藏于多媒体文件中,因此,不用担心无人知晓加密信息和/或加密规则而导致加密文件无法打开的情况。In the last two of the above three examples, since the server can also obtain the multimedia files from the database and hide the corresponding decryption information in the multimedia files while generating the encrypted files, there is no need to worry that no one will Encrypted files cannot be opened due to knowledge of encryption information and/or encryption rules.
步骤302,将加密文件的解密信息隐藏于多媒体文件。Step 302, hide the decryption information of the encrypted file in the multimedia file.
需要说明的是,本实施方式中,可以将解密信息分成若干份,隐藏于若干个多媒体文件中,比如说,解密信息为123456789,则可以将123隐藏于多媒体文件1中,并标识多媒体文件1的优先级排在第1位,将456隐藏于多媒体文件2中,并标识多媒体文件2的优先级排在第2位,将789隐藏于多媒体文件3中,并标识多媒体文件3的优先级排在第3位。这样,当用户需要对加密文件进行解密时,需要在满足接收到多媒体文件1、多媒体文件2以及多媒体文件3的情况下,终端设备才可以根据多媒体文件1、多媒体文件2以及多媒体文件3得到解密信息,即,根据多媒体文件1、多媒体文件2以及多媒体文件3进行解析,并将解析结果根据多媒体文件其各自的优先级进行排序,得到解密信息。可以理解,这种情况较适用于多个用户分别掌握解密信息的一部分的情况,这样做,可以进一步包括加密文件的安全性。It should be noted that in this embodiment, the decrypted information can be divided into several parts and hidden in several multimedia files. For example, if the decrypted information is 123456789, then 123 can be hidden in multimedia file 1, and multimedia file 1 can be identified The priority of 456 is hidden in the multimedia file 2, and the priority of identifying the multimedia file 2 is ranked 2nd, 789 is hidden in the multimedia file 3, and the priority of identifying the multimedia file 3 is ranked in the 3rd place. In this way, when the user needs to decrypt the encrypted file, the terminal device can decrypt the multimedia file 1, the multimedia file 2 and the multimedia file 3 only when the multimedia file 1, the multimedia file 2 and the multimedia file 3 are received. The information, that is, is analyzed according to the multimedia file 1, the multimedia file 2, and the multimedia file 3, and the analysis results are sorted according to the respective priorities of the multimedia files to obtain decrypted information. It can be understood that this situation is more applicable to the situation where multiple users respectively hold a part of the decrypted information, and in doing so, the security of the encrypted file can be further included.
步骤303,发送多媒体文件。Step 303, sending the multimedia file.
也就是说,通过发送多媒体文件,供文件接收设备对多媒体文件进行解析,得到解密信息,根据解密信息,对加密文件进行解密。That is to say, by sending the multimedia file, the file receiving device analyzes the multimedia file to obtain decryption information, and decrypts the encrypted file according to the decryption information.
在一个例子中,多媒体文件,可以为:通过文件发送设备设置的视频彩铃;加密文件,可以为:通过文件发送设备加密的文件。In an example, the multimedia file may be: a video ring tone set by the file sending device; the encrypted file may be: a file encrypted by the file sending device.
与现有技术相比,本实施方式提供的一种加密方法,由于是将加密文件的解密信息隐藏于多媒体文件后,再发送多媒体文件,供文件接收设备对多媒体文件进行解析,得到解密信息,然后再根据解密信息,对加密文件进行解密,可以使得在对文件进行加密的用户无需告知对方解密密码的情况下,即可通过发送多媒体文件的方式,供对方对加密文件进行解密,从而方便对文件进行加密的用户对一些临时性质的加密文件进行远程解密;而且,由于不是直接告知对方加密文件的密码,使得即使对文件进行加密的用户对很多文件都采用同一加密密码,也可以保证到加密文件的安全性。Compared with the prior art, the encryption method provided by this embodiment hides the decryption information of the encrypted file in the multimedia file, and then sends the multimedia file for the file receiving device to analyze the multimedia file to obtain the decryption information. Then, according to the decryption information, the encrypted file is decrypted, so that the user who encrypts the file does not need to inform the other party of the decryption password, and can send a multimedia file for the other party to decrypt the encrypted file. The user who encrypts the file remotely decrypts some temporary encrypted files; moreover, since the password of the encrypted file is not directly informed to the other party, even if the user who encrypts the file uses the same encryption password for many files, it can still be encrypted. Document Security.
不难发现,本实施方式为与第一实施方式或第二实施方式相对应的方法实施例,本实施方式可与第一实施方式或第二实施方式互相配合实施。第一实施方式或第二实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第一实施方式或第二实施方式中。It is not difficult to find that this embodiment is a method example corresponding to the first embodiment or the second embodiment, and this embodiment can be implemented in cooperation with the first embodiment or the second embodiment. The relevant technical details mentioned in the first embodiment or the second embodiment are still valid in this embodiment, and will not be repeated here to reduce repetition. Correspondingly, the relevant technical details mentioned in this implementation manner can also be applied in the first implementation manner or the second implementation manner.
本发明的第四实施方式涉及一种加密方法。本实施方式是在第三实施方式的基础上进行的改进,具体改进之处在于:在本实施方式中的加密方法应用于服务器,将加密文件的解密信息隐藏于多媒体文件,包括:对原始多媒体文件进行复制,得到多媒体文件;获取与多媒体文件对应的第一标识信息;其中,第一标识信息用于识别与多媒体文件对应的加密文件;将加密文件的解密信息以及第一标识信息隐藏于多媒体文件。通过对原始多媒体文件进行复制,得到多媒体文件,可以解决很多用户都将各自的解密信息隐藏于这一个多媒体文件中而使得多媒体文件被污染的情况;而且,这样做还可以达到不干扰其他用户将该多媒体文件对其他文件进行解密的目的;通过对多媒体文件添加第一标识信息,还可以避免多媒体文件与加密文件对应关系的混乱。A fourth embodiment of the present invention relates to an encryption method. This embodiment is an improvement on the basis of the third embodiment. The specific improvement is that: the encryption method in this embodiment is applied to the server, and the decryption information of the encrypted file is hidden in the multimedia file, including: The file is copied to obtain the multimedia file; the first identification information corresponding to the multimedia file is obtained; wherein the first identification information is used to identify the encrypted file corresponding to the multimedia file; the decryption information of the encrypted file and the first identification information are hidden in the multimedia file. document. By copying the original multimedia file to obtain the multimedia file, it can solve the situation that many users hide their decryption information in this multimedia file and make the multimedia file polluted; The multimedia file decrypts other files; by adding the first identification information to the multimedia file, the confusion of the corresponding relationship between the multimedia file and the encrypted file can also be avoided.
本实施方式中的加密方法的流程图如图9所示,包括:The flowchart of the encryption method in this embodiment is shown in Figure 9, including:
步骤401,对文件进行加密,生成加密文件。Step 401, encrypting the file to generate an encrypted file.
由于本步骤401与第三实施方式中的步骤301大致相同,为避免重复,此处不再赘述。Since this step 401 is substantially the same as step 301 in the third embodiment, in order to avoid repetition, details are not repeated here.
步骤402,对原始多媒体文件进行复制,得到多媒体文件。Step 402, copy the original multimedia file to obtain the multimedia file.
在一个例子中,服务器可以存储有多种原始多媒体文件,可以当接收到用户选定的、作为携带解密信息的载体的原始多媒体文件时,对原始多媒体文件进行复制,得到多媒体文件。In an example, the server may store multiple original multimedia files, and when receiving an original multimedia file selected by the user as a carrier carrying decryption information, copy the original multimedia file to obtain a multimedia file.
步骤403,获取与多媒体文件对应的第一标识信息。Step 403, acquiring first identification information corresponding to the multimedia file.
其中,这里所说的第一标识信息用于识别与多媒体文件对应的加密文件。Wherein, the first identification information mentioned here is used to identify the encrypted file corresponding to the multimedia file.
步骤404,将加密文件的解密信息以及第一标识信息隐藏于多媒体文件。Step 404, hiding the decryption information of the encrypted file and the first identification information in the multimedia file.
此处结合一个例子对步骤403和步骤404进行说明:用户可以通过终端设备或服务器为A加密文件设定A多媒体文件作为解密载体,为B加密文件也设定A多媒体文件作为解密载体,然而,A加密文件对应的A解密信息和B加密文件对应的B解密信息不同。因此,通过将加密文件的解密信息以及第一标识信息隐藏于多媒体文件,可以保证准确的获取到与A加密文件对应的携带A解密信息的A多媒体文件,以及与B加密文件对应的携带B解密信息的A多媒体文件,从而可以达到避免多媒体文件与加密文件对应关系的混乱的目的。Here is an example to illustrate steps 403 and 404: the user can set the A multimedia file as the decryption carrier for the A encrypted file through the terminal device or the server, and also set the A multimedia file as the decryption carrier for the B encrypted file. However, The A decryption information corresponding to the A encrypted file is different from the B decryption information corresponding to the B encrypted file. Therefore, by hiding the decryption information of the encrypted file and the first identification information in the multimedia file, it can be ensured that the A multimedia file corresponding to the A encrypted file carrying the A decryption information and the A multimedia file corresponding to the B encrypted file carrying the B decryption information can be accurately obtained. A multimedia file of the information, so that the purpose of avoiding the confusion of the corresponding relationship between the multimedia file and the encrypted file can be achieved.
步骤405,发送多媒体文件。Step 405, sending the multimedia file.
由于本步骤405与第三实施方式中的步骤303大致相同,为避免重复,此处不再赘述。Since this step 405 is substantially the same as step 303 in the third embodiment, in order to avoid repetition, details are not repeated here.
与现有技术相比,本实施方式提供的一种加密方法,通过对原始多媒体文件进行复制,得到多媒体文件,可以解决很多用户都将各自的解密信息隐藏于这一个多媒体文件中而使得多媒体文件被污染的情况;而且,这样做还可以达到不干扰其他用户将该多媒体文件对其他文件进行解密的目的;通过对复制后的多媒体文件添加第一标识信息,还可以避免多媒体文件与加密文件对应关系的混乱。Compared with the prior art, the encryption method provided by this embodiment obtains the multimedia file by duplicating the original multimedia file, which can solve the problem that many users hide their respective decryption information in this multimedia file and make the multimedia file pollution; moreover, doing so can also achieve the purpose of not interfering with other users to decrypt the multimedia file to other files; by adding the first identification information to the copied multimedia file, it can also avoid the correspondence between the multimedia file and the encrypted file. Relationship chaos.
本发明的第五实施方式涉及一种加密方法。本实施方式是在第三实施方式的基础上进行的改进,具体改进之处在于:在本实施方式中的解密方法应用于服务器,在对文件进行加密,生成加密文件后,还发送与加密文件对应的第二标识信息,供文件接收设备获取;其中,第二标识信息用于识别与加密文件对应的多媒体文件;若接收到文件接收设备上传的第二标识信息,则获取与第二标识信息对应的多媒体文件;将与第二标识信息对应的多媒体文件发送至文件接收设备。通过将与第二标识信息对应的多媒体文件发送至文件接收设备,可以解决在时间过得比较久的情况下,由于服务器并不知晓用户要对具体哪一个加密文件进行解密,也就无法向用户精准地发送用于对该加密文件进行解密的多媒体文件的技术问题。A fifth embodiment of the present invention relates to an encryption method. This embodiment is an improvement on the basis of the third embodiment. The specific improvement is that: the decryption method in this embodiment is applied to the server, and after encrypting the file and generating the encrypted file, it is also sent to the encrypted file The corresponding second identification information is obtained by the file receiving device; wherein, the second identification information is used to identify the multimedia file corresponding to the encrypted file; if the second identification information uploaded by the file receiving device is received, the second identification information is obtained. The corresponding multimedia file: sending the multimedia file corresponding to the second identification information to the file receiving device. By sending the multimedia file corresponding to the second identification information to the file receiving device, it can be solved that when the time passes for a long time, since the server does not know which encrypted file the user wants to decrypt, it cannot send the encrypted file to the user. The technical problem of accurately sending the multimedia file used to decrypt the encrypted file.
本实施方式中的解密方法的流程图如图10所示,包括:The flowchart of the decryption method in this embodiment is shown in Figure 10, including:
步骤501,对文件进行加密,生成加密文件。Step 501, encrypt the file to generate an encrypted file.
步骤502,将加密文件的解密信息隐藏于多媒体文件。Step 502, hide the decryption information of the encrypted file in the multimedia file.
步骤503,发送多媒体文件。Step 503, sending the multimedia file.
由于本实施方式中的步骤501至步骤503与第三实施方式中的步骤301至步骤303大致相同,为避免重复,此处不再赘述。Since steps 501 to 503 in this embodiment are substantially the same as steps 301 to 303 in the third embodiment, to avoid repetition, details are not repeated here.
步骤504,发送与加密文件对应的第二标识信息。Step 504, sending second identification information corresponding to the encrypted file.
也就是说,发送与加密文件对应的第二标识信息,以供文件接收设备获取。That is to say, the second identification information corresponding to the encrypted file is sent for acquisition by the file receiving device.
其中,第二标识信息用于识别与加密文件对应的多媒体文件Wherein, the second identification information is used to identify the multimedia file corresponding to the encrypted file
步骤505,若接收到文件接收设备上传的第二标识信息,则获取与第二标识信息对应的多媒体文件。Step 505, if the second identification information uploaded by the file receiving device is received, acquire the multimedia file corresponding to the second identification information.
步骤506,将与第二标识信息对应的多媒体文件发送至文件接收设备。Step 506, sending the multimedia file corresponding to the second identification information to the file receiving device.
此处结合一个例子对步骤504至步骤506进行说明:若用户通过文件接收设备接收到多媒体文件,则可以通过隐藏于多媒体文件的解密信息对加密文件进行解密。对加密文件进行解密后,多媒体文件被删除(既可以通过用户手动删除,也可以是通过设置文件接收设备的方式供其进行自动删除,还可以是多媒体文件本身即为一次性文件)。假设过了15天后,用户还需要打开该加密文件,但是与该加密文件对应的用于解密的多媒体文件已被删除。在这种情况下,用户可以查看接收到的与该加密文件对应的第二标识信息,并根据第二标识信息向服务器发送请求,以使得服务器可以根据第二标识信息获取与加密文件对应的多媒体文件,并将与第二标识信息对应的多媒体文件发送至文件接收设备。这样做,可以使得在时间过得比较久的情况下,由于服务器并不知晓用户要对具体哪一个加密文件进行解密,也就无法向用户精准地发送用于对该加密文件进行解密的多媒体文件的技术问题。Steps 504 to 506 are described here with an example: if the user receives the multimedia file through the file receiving device, the encrypted file can be decrypted through the decryption information hidden in the multimedia file. After the encrypted file is decrypted, the multimedia file is deleted (either manually by the user, or automatically deleted by setting the file receiving device, or the multimedia file itself is a one-time file). Assume that after 15 days, the user still needs to open the encrypted file, but the multimedia file used for decryption corresponding to the encrypted file has been deleted. In this case, the user can view the received second identification information corresponding to the encrypted file, and send a request to the server according to the second identification information, so that the server can obtain the multimedia information corresponding to the encrypted file according to the second identification information. file, and send the multimedia file corresponding to the second identification information to the file receiving device. In this way, when the time has passed for a long time, since the server does not know which encrypted file the user wants to decrypt, it cannot accurately send the multimedia file used to decrypt the encrypted file to the user. technical issues.
需要说明的是,本实施方式也可以是在第四实施方式的基础上作出的改进。It should be noted that this implementation manner may also be an improvement made on the basis of the fourth implementation manner.
与现有技术相比,本实施方式提供的一种加密方法,通过将与第二标识信息对应的多媒体文件发送至文件接收设备,可以解决在时间过得比较久的情况下,由于服务器并不知晓用户要对具体哪一个加密文件进行解密,也就无法向用户精准地发送用于对该加密文件进行解密的多媒体文件的技术问题。Compared with the prior art, the encryption method provided by this embodiment can solve the problem that the server does not Knowing which encrypted file the user wants to decrypt, the technical problem of accurately sending the multimedia file for decrypting the encrypted file cannot be sent to the user.
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The step division of the above various methods is only for the sake of clarity of description. During implementation, it can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. ; Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but not changing the core design of the algorithm and process are all within the scope of protection of this patent.
本发明第六实施方式涉及一种终端设备,如图11所示,包括:至少一个处理器601;以及,与所述至少一个处理器601通信连接的存储器602;其中,所述存储器602存储有可被所述至少一个处理器601执行的指令,所述指令被所述至少一个处理器601执行,以使所述至少一个处理器601能够执行如第一至第二实施方式中任一的解密方法,或者以使至少一个处理器601能够执行如第三实施方式的加密方法。The sixth embodiment of the present invention relates to a terminal device, as shown in FIG. 11 , including: at least one processor 601; and a memory 602 communicatively connected to the at least one processor 601; Instructions that can be executed by the at least one processor 601, the instructions are executed by the at least one processor 601, so that the at least one processor 601 can perform the decryption as in any one of the first to second embodiments method, or enable at least one processor 601 to execute the encryption method as in the third embodiment.
其中,存储器602和处理器601采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器601和存储器602的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器601处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器601。Wherein, the memory 602 and the processor 601 are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors 601 and various circuits of the memory 602 together. The bus may also connect together various other circuits such as peripherals, voltage regulators, and power management circuits, all of which are well known in the art and therefore will not be further described herein. The bus interface provides an interface between the bus and the transceivers. A transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing means for communicating with various other devices over a transmission medium. The data processed by the processor 601 is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor 601 .
处理器601负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器602可以被用于存储处理器601在执行操作时所使用的数据。Processor 601 is responsible for managing the bus and general processing, and may also provide various functions including timing, peripheral interface, voltage regulation, power management, and other control functions. And the memory 602 may be used to store data used by the processor 601 when performing operations.
本发明第七实施方式涉及一种服务器,如图12所示,包括:至少一个处理器701;以及,与所述至少一个处理器701通信连接的存储器702;其中,所述存储器702存储有可被所述至少一个处理器701执行的指令,所述指令被所述至少一个处理器701执行,以使所述至少一个处理器701能够执行如第三至第五实施方式中任一的加密方法。The seventh embodiment of the present invention relates to a server, as shown in FIG. 12 , including: at least one processor 701; and a memory 702 communicatively connected to the at least one processor 701; Instructions executed by the at least one processor 701, the instructions are executed by the at least one processor 701, so that the at least one processor 701 can execute the encryption method in any one of the third to fifth embodiments .
其中,存储器702和处理器701采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器701和存储器702的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器701处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器701。Wherein, the memory 702 and the processor 701 are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors 701 and various circuits of the memory 702 together. The bus may also connect together various other circuits such as peripherals, voltage regulators, and power management circuits, all of which are well known in the art and therefore will not be further described herein. The bus interface provides an interface between the bus and the transceivers. A transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing means for communicating with various other devices over a transmission medium. The data processed by the processor 701 is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor 701 .
处理器701负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器702可以被用于存储处理器701在执行操作时所使用的数据。The processor 701 is responsible for managing the bus and general processing, and may also provide various functions including timing, peripheral interface, voltage regulation, power management and other control functions. And the memory 702 may be used to store data used by the processor 701 when performing operations.
本发明第八实施方式涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现第一至第二实施方式中任一的解密方法;或者计算机程序被处理器执行时实现第三至第五实施方式中任一的加密方法。The eighth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. When the computer program is executed by the processor, the decryption method in any one of the first to second embodiments is realized; or when the computer program is executed by the processor, the encryption method in any one of the third to fifth embodiments is realized.
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing related hardware through a program, the program is stored in a storage medium, and includes several instructions to make a device ( It may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and other media that can store program codes.
本领域的普通技术人员可以理解,上述各实施方式是实现本发明的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。Those of ordinary skill in the art can understand that the above-mentioned embodiments are specific examples for realizing the present invention, and in practical applications, various changes can be made to it in form and details without departing from the spirit and spirit of the present invention. scope.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910752276.8ACN110545263B (en) | 2019-08-15 | 2019-08-15 | Decryption method, encryption method, terminal device, server and readable storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910752276.8ACN110545263B (en) | 2019-08-15 | 2019-08-15 | Decryption method, encryption method, terminal device, server and readable storage medium |
| Publication Number | Publication Date |
|---|---|
| CN110545263Atrue CN110545263A (en) | 2019-12-06 |
| CN110545263B CN110545263B (en) | 2022-03-11 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910752276.8AActiveCN110545263B (en) | 2019-08-15 | 2019-08-15 | Decryption method, encryption method, terminal device, server and readable storage medium |
| Country | Link |
|---|---|
| CN (1) | CN110545263B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111526100A (en)* | 2020-04-16 | 2020-08-11 | 中南大学 | Cross-network traffic identification method and device based on dynamic identification and path hiding |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030208686A1 (en)* | 2002-05-06 | 2003-11-06 | Thummalapally Damodar R. | Method of data protection |
| JP2012182827A (en)* | 2005-07-14 | 2012-09-20 | Qualcomm Inc | Method and apparatus for encrypting/decrypting multimedia content to allow random access |
| CN102752314A (en)* | 2012-07-23 | 2012-10-24 | 南京邮电大学 | Multimedia internet of thing secure communication method based on information hiding technology |
| CN103067367A (en)* | 2012-12-21 | 2013-04-24 | 网秦无限(北京)科技有限公司 | Password hidden method and device and password retrieval method and device |
| CN106850671A (en)* | 2017-02-27 | 2017-06-13 | 南京聚鲲物联网科技有限公司 | The identity identifying method and its system of a kind of utilization acoustic communication |
| CN108011879A (en)* | 2017-11-30 | 2018-05-08 | 广州酷狗计算机科技有限公司 | File encryption, method, apparatus, equipment and the storage medium of decryption |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030208686A1 (en)* | 2002-05-06 | 2003-11-06 | Thummalapally Damodar R. | Method of data protection |
| JP2012182827A (en)* | 2005-07-14 | 2012-09-20 | Qualcomm Inc | Method and apparatus for encrypting/decrypting multimedia content to allow random access |
| CN102752314A (en)* | 2012-07-23 | 2012-10-24 | 南京邮电大学 | Multimedia internet of thing secure communication method based on information hiding technology |
| CN103067367A (en)* | 2012-12-21 | 2013-04-24 | 网秦无限(北京)科技有限公司 | Password hidden method and device and password retrieval method and device |
| CN106850671A (en)* | 2017-02-27 | 2017-06-13 | 南京聚鲲物联网科技有限公司 | The identity identifying method and its system of a kind of utilization acoustic communication |
| CN108011879A (en)* | 2017-11-30 | 2018-05-08 | 广州酷狗计算机科技有限公司 | File encryption, method, apparatus, equipment and the storage medium of decryption |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111526100A (en)* | 2020-04-16 | 2020-08-11 | 中南大学 | Cross-network traffic identification method and device based on dynamic identification and path hiding |
| CN111526100B (en)* | 2020-04-16 | 2021-08-24 | 中南大学 | Cross-network traffic identification method and device based on dynamic identification and path hiding |
| Publication number | Publication date |
|---|---|
| CN110545263B (en) | 2022-03-11 |
| Publication | Publication Date | Title |
|---|---|---|
| US9990513B2 (en) | System and method of applying adaptive privacy controls to lossy file types | |
| US12277242B2 (en) | Redacting restricted content in files | |
| CN108989848B (en) | Video resource file acquisition method and management system | |
| KR102361400B1 (en) | Terminal for User, Apparatus for Providing Service, Driving Method of Terminal for User, Driving Method of Apparatus for Providing Service and System for Encryption Indexing-based Search | |
| US9231952B2 (en) | Key-based content management and access systems and methods | |
| US8547568B2 (en) | Approach for securely printing electronic documents | |
| US10970403B1 (en) | Forensic investigation tool | |
| JP7302600B2 (en) | Information processing system and information processing method | |
| JP2006344212A (en) | Secure printing of electronic documents | |
| CN104636645A (en) | Method and device for controlling data accessing | |
| US20180351742A1 (en) | Setting information utilization system and setting information utilization method | |
| US20060279760A1 (en) | Approach for securely printing electronic documents | |
| WO2019205366A1 (en) | Picture management method and apparatus, computer device, and storage medium | |
| CN112287372A (en) | Method and apparatus for protecting clipboard privacy | |
| WO2020110830A1 (en) | Information processing device and information processing method | |
| CN113935059A (en) | Dynamic encryption method, device and storage medium applicable to financial data | |
| CN110545263B (en) | Decryption method, encryption method, terminal device, server and readable storage medium | |
| CN118199992B (en) | Data encryption method and device, electronic equipment and storage medium | |
| CN109286636A (en) | Key management method, key server and storage medium | |
| CN113240836A (en) | Bluetooth lock connection method adopting two-dimensional code and related configuration system | |
| CN111131270B (en) | Data encryption and decryption method and device, electronic equipment and storage medium | |
| CN117540395A (en) | Data encryption and decryption methods, encryption and decryption systems, electronic equipment and media | |
| CN109474591A (en) | Account's sharing method, device, electronic equipment and storage medium between multisystem | |
| US20230124197A1 (en) | Device and Method for Evacuating Cryptocurrency and Program Therefor | |
| US9560022B1 (en) | Avoiding collection of biometric data without consent |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |