CN114124413A - Media file encryption method, decryption method, transmission method and device - Google Patents

Media file encryption method, decryption method, transmission method and device Download PDF

Info

Publication number
CN114124413A
CN114124413A CN202010795267.XA CN202010795267A CN114124413A CN 114124413 A CN114124413 A CN 114124413A CN 202010795267 A CN202010795267 A CN 202010795267A CN 114124413 A CN114124413 A CN 114124413A
Authority
CN
China
Prior art keywords
media file
code
mapping
sub
codes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010795267.XA
Other languages
Chinese (zh)
Inventor
董伯平
赵庆明
许学超
刘庆祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202010795267.XA priority Critical patent/CN114124413A/en
Publication of CN114124413A publication Critical patent/CN114124413A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The disclosure discloses a media file encryption method, a media file decryption method, a media file transmission method and a media file encryption device, and relates to the field of encryption and decryption. The method comprises the following steps: splitting the code of the source media file into a plurality of sub-codes, wherein each sub-code corresponds to a two-dimensional coordinate; determining a mapping code corresponding to each two-dimensional coordinate according to a mapping table; and combining the mapping codes corresponding to the plurality of sub-codes according to the code splitting sequence of the source media file to obtain the code of the encrypted media file. According to the method and the device, under the condition that the positions of the key frames in the encrypted media file and the source media file do not need to be deviated, the safety of data is guaranteed, and decryption is facilitated.

Description

Media file encryption method, decryption method, transmission method and device
Technical Field
The present disclosure relates to the field of encryption and decryption, and in particular, to a media file encryption method, a media file decryption method, a media file transmission method, and a media file transmission device.
Background
In the field of audio file transmission, when a client requests a server to transmit an audio file, the server generally needs to encrypt the transmitted file in order to protect the file from being stolen, and the client receives the audio file transmitted by the server, decrypts the audio file and plays the audio file.
In the related art, in the process of encrypting an audio file, the format of the audio file needs to be modified, or the size of a source audio file needs to be changed, or the size of audio data in the source audio file needs to be changed, so that the position offset of key frames in the encrypted media file and the source media file changes, and if corresponding processing is not performed, the client cannot perform operations such as audio dragging.
Disclosure of Invention
One technical problem to be solved by the present disclosure is to provide a media file encryption method, a decryption method, a transmission method, and a device, which can ensure data security without shifting the positions of key frames in an encrypted media file and a source media file.
According to an aspect of the present disclosure, a media file encryption method is provided, including: splitting the code of the source media file into a plurality of sub-codes, wherein each sub-code corresponds to a two-dimensional coordinate; determining a mapping code corresponding to each two-dimensional coordinate according to a mapping table; and combining the mapping codes corresponding to the plurality of sub-codes according to the code splitting sequence of the source media file to obtain the code of the encrypted media file.
In some embodiments, a private key is used to encrypt a combination of mapping encodings corresponding to the subcodes.
In some embodiments, splitting the encoding of the source media file into a plurality of sub-encodings comprises: splitting the code of the source media file according to the first byte number to obtain a plurality of sub-codes, wherein the first dimension coordinate of the two-dimensional coordinate of each sub-code corresponds to the second byte number, the second dimension coordinate corresponds to the third byte number, and the sum of the second byte number and the third byte number is the first byte number.
In some embodiments, the first number of bytes is determined according to a format of the source media file.
In some embodiments, determining the mapping code for each two-dimensional coordinate includes: determining a node value corresponding to each two-dimensional coordinate according to the two-dimensional coordinate corresponding to each sub-code; and determining the mapping code corresponding to each node value according to the mapping table.
In some embodiments, each mapping code corresponds to a fourth byte count, wherein the fourth byte count is determined according to the format of the source media file.
According to another aspect of the present disclosure, a media file decryption method is further provided, including: splitting the encoding of the encrypted media file into a plurality of mapping encodings; mapping each mapping code into a two-dimensional coordinate according to a mapping table; and combining the sub-codes corresponding to the plurality of two-dimensional coordinates according to the code splitting sequence of the encrypted media file to obtain the code of the source media file.
In some embodiments, the encoding of the encrypted media file is decrypted using a public key.
In some embodiments, each sub-code corresponds to a first byte number, the first dimension coordinate of the two-dimensional coordinate of each sub-code corresponds to a second byte number, the second dimension coordinate corresponds to a third byte number, and the sum of the second byte number and the third byte number is the first byte number.
In some embodiments, the first number of bytes is determined according to a format of the source media file.
In some embodiments, a corresponding node value for each mapping code is determined according to a mapping table; and determining a two-dimensional coordinate corresponding to each sub-code according to the node value.
In some embodiments, each mapping code corresponds to a fourth byte count, wherein the fourth byte count is determined according to the format of the source media file.
According to another aspect of the present disclosure, a media file transmission method is further provided, including: the encryption equipment divides the code of the source media file into a plurality of sub-codes, wherein each sub-code corresponds to a two-dimensional coordinate, the mapping code corresponding to each two-dimensional coordinate is determined according to a mapping table, the mapping codes corresponding to the plurality of sub-codes are combined according to the code splitting sequence of the source media file to obtain the code of the encrypted media file, and the code of the encrypted media file is sent to the decryption equipment; and the decryption device divides the code of the encrypted media file into a plurality of mapping codes, maps each mapping code into a two-dimensional coordinate according to a mapping table, determines the sub-code corresponding to each two-dimensional coordinate, and combines the plurality of sub-codes according to the code division sequence of the encrypted media file to obtain the code of the source media file.
According to another aspect of the present disclosure, there is also provided a media file encryption apparatus, including: the encoding device comprises a first encoding splitting unit, a second encoding splitting unit and a third encoding splitting unit, wherein the first encoding splitting unit is configured to split encoding of a source media file into a plurality of sub-encoding, and each sub-encoding corresponds to a two-dimensional coordinate; the first code mapping unit is configured to determine a mapping code corresponding to each two-dimensional coordinate according to a mapping table; and the encrypted file generating unit is configured to combine the mapping codes corresponding to the plurality of sub-codes according to the code splitting order of the source media file to obtain the code of the encrypted media file.
According to another aspect of the present disclosure, there is also provided a media file decryption apparatus, including: a second encoding splitting unit configured to split the encoding of the encrypted media file into a plurality of mapping encodings; the second code mapping unit is configured to map each mapping code into a two-dimensional coordinate according to the mapping table; and the source file generating unit is configured to combine the sub-codes corresponding to the plurality of two-dimensional coordinates according to the coding splitting sequence of the encrypted media file to obtain the code of the source media file.
According to another aspect of the present disclosure, there is also provided a media file encryption and decryption system, including: the above media file encryption device; and the media file decryption device.
According to another aspect of the present disclosure, there is also provided an electronic device, including: a memory; and a processor coupled to the memory, the processor configured to execute the media file encryption method as described above, or the media file decryption method as described above, or the media file transmission method as described above, based on instructions stored in the memory.
According to another aspect of the present disclosure, there is also provided a non-transitory computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement a media file encryption method as described above, or a media file decryption method as described above, or a media file transmission method as described above.
In the embodiment of the disclosure, compared with a pure stream type encryption algorithm, under the condition that the positions of key frames in the encrypted media file and the source media file do not need to be shifted, the security of data is ensured, and the decryption is facilitated.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
The present disclosure may be understood more clearly and in accordance with the following detailed description, taken with reference to the accompanying drawings,
wherein:
fig. 1 is a flow diagram of some embodiments of a media file encryption method of the present disclosure.
Fig. 2 is a flowchart illustrating a media file encryption method according to another embodiment of the disclosure.
Fig. 3 is a schematic diagram of source media file encoding and splitting according to the present disclosure.
Fig. 4 is a flow chart illustrating some embodiments of a media file decryption method of the present disclosure.
Fig. 5 is a flow diagram of some embodiments of a media file transfer method of the present disclosure.
Fig. 6 is a schematic structural diagram of some embodiments of a media file encryption apparatus according to the present disclosure.
Fig. 7 is a schematic structural diagram of some embodiments of a media file decryption apparatus according to the present disclosure.
Fig. 8 is a schematic structural diagram of some embodiments of the media file encryption and decryption system of the present disclosure.
Fig. 9 is a schematic structural diagram of some embodiments of an electronic device of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
Fig. 1 is a flow diagram of some embodiments of a media file encryption method of the present disclosure.
At step 110, the encoding of the source media file is split into a plurality of sub-encodings, where each sub-encoding corresponds to a two-dimensional coordinate.
In some embodiments, the media file is, for example, an audio file.
In some embodiments, the encoding of the source media file is split by a first number of bytes to obtain a plurality of sub-encodings.
In some embodiments, the first number of bytes is determined according to a format of the source media file. For example, if the audio file is in an 8k16bit format, the encoding of the audio file may be optionally split into two-dimensional coordinates every 16 bits, i.e. 2 bytes.
In some embodiments, the encoding of the media file may also be split by a multiple of bits of the media file. For example, the encoding of an audio file is split by 4 bytes, 8 bytes. Only the protocol of the encryption equipment and the decryption equipment is good.
In some embodiments, the first dimension coordinate of each sub-code two-dimensional coordinate corresponds to a second byte number, the second dimension coordinate corresponds to a third byte number, and the sum of the second byte number and the third byte number is the first byte number. For example, the encoding of the source audio file is split by 2 bytes, with the 1 st byte of each sub-encoding corresponding to the X-axis of the coordinate system and the 2 nd byte corresponding to the Y-axis of the coordinate system. The value corresponding to the 1 st byte is converted into a decimal number and used as the coordinate of the X axis, and the value corresponding to the 2 nd byte is converted into a decimal number and used as the coordinate of the Y axis.
In step 120, a mapping code corresponding to each two-dimensional coordinate is determined according to the mapping table.
In some embodiments, the correspondence between the two-dimensional coordinates and the mapping code is preset. By querying the mapping table, the mapping code corresponding to each two-dimensional coordinate can be determined. The mapping code is different from the corresponding sub-code.
In some embodiments, a node value corresponding to each two-dimensional coordinate determines a mapping code corresponding to each node value according to the mapping table. For example, coordinate (5, 6) corresponds to a node value of 500, then the 16 bits of the map are encoded as 1011011110100, etc.
In some embodiments, each mapping code corresponds to a fourth byte count, wherein the fourth byte count is determined according to the format of the source media file. For example, if the source audio file is in an 8k16bit format, each mapping code corresponds to 16 bits.
In some embodiments, each mapping code may also correspond to other byte numbers, and only the encryption device and the decryption device need to have good mutual agreement.
In step 130, the mapping codes corresponding to the multiple sub-codes are combined according to the code splitting order of the source media file to obtain the code of the encrypted media file.
In some embodiments, mapping codes corresponding to the plurality of sub-codes are combined according to the coding splitting order of the source audio file to obtain a new code, which is the code of the encrypted audio file.
In the above embodiment, the encoding of the source media file is split into a plurality of sub-codes, where each sub-code corresponds to one two-dimensional coordinate; determining a mapping code corresponding to each two-dimensional coordinate according to a mapping table; and the combination of the mapping codes corresponding to the plurality of sub-codes is used as the code of the encrypted media file, and compared with a simple stream type encryption algorithm, the data security is ensured under the condition that the positions of key frames in the encrypted media file and the source media file do not need to be shifted, so that the decryption is convenient.
In some embodiments, a private key is used to encrypt a combination of mapping encodings corresponding to the subcodes.
For example, a public-private key pair is generated according to a PKI key system, and a combination of mapping codes corresponding to the pair codes is secondarily encrypted by using a private key, so that the media file can only be decrypted by the public key corresponding to the encrypted private key because the private key in the PKI system is not leaked, the media file cannot be decrypted in the transmission process, and the security of the media file is improved.
Fig. 2 is a flowchart illustrating a media file encryption method according to another embodiment of the disclosure. In this embodiment, the media file is described by taking an audio file as an example.
In step 210, the code of the source audio file is divided by 2 bytes to obtain a plurality of sub-codes.
For example, as shown in fig. 3, the encoding of the source audio file is split from the header, and each adjacent two bytes are split into one sub-encoding. If the encoding of the source audio file is represented in binary, such as 11001100011101001100101001010101, the encoding of the source audio file is split into 1100110001110100 and 1100101001010101.
In step 220, the value of the 1 st byte of each sub-code is taken as the value of the first coordinate axis of the two-dimensional coordinates, and the value of the 2 nd byte of each sub-code is taken as the value of the second coordinate axis of the two-dimensional coordinates.
In some embodiments, a two-dimensional grid consisting of an X-axis and a Y-axis is set, and since the encoding of the source audio file is divided by 2 bytes, the range of values of the X-axis and the Y-axis corresponds to 0-255, and each pair (X, Y) has a unique value at the grid node.
In some embodiments, if the encoding of the source audio file is divided by 4 bytes, the range of values for the X-axis and Y-axis should be set to 0-65535.
In step 230, a node value corresponding to each two-dimensional coordinate is determined.
In step 240, a mapping code corresponding to each node value is found according to the mapping table of the node values. As shown in table 1, each mapping is encoded in 2 bytes.
ID (node value) Mapping code
500 1011011011110100
125 1110010101110001
110 1111110101110001
345 0000111101010101
261 1010100111101011
656 1101010101010101
TABLE 1
In step 250, mapping codes corresponding to the multiple sub-codes are combined according to the coding splitting order of the source audio file.
At step 260, the combination of the plurality of mapping codes is encrypted using the private key to obtain the code of the encrypted audio file.
In the embodiment, compared with a pure stream encryption algorithm, a mapping coding method of a two-dimensional grid is used, so that data security is ensured, and the positions of key frames in the encrypted media file and the source media file do not need to be shifted; the process of inquiring mapping codes is similar to the joint search of a database, and the method is simple and easy to operate and is convenient to decrypt.
Fig. 4 is a flow chart illustrating some embodiments of a media file decryption method of the present disclosure.
At step 410, the encoding of the encrypted media file is split into a plurality of mapping encodings.
In some embodiments, the media file is, for example, an audio file.
In some embodiments, each mapping code corresponds to a fourth byte count, wherein the fourth byte count is determined according to the format of the source media file. For example, each mapping is encoded as 2 bytes.
In some embodiments, each mapping code may also correspond to other byte numbers, and only the encryption device and the decryption device have good protocol.
In step 420, each mapping code is mapped to a two-dimensional coordinate according to the mapping table.
In some embodiments, the correspondence between the two-dimensional coordinates and the mapping code is preset. By querying the mapping table, the two-dimensional coordinates corresponding to each mapping code can be determined. The mapping code is different from the corresponding sub-code.
In some embodiments, a node value corresponding to each two-dimensional coordinate may be determined according to the mapping table, and then the two-dimensional coordinate of each node value may be determined.
In step 430, the sub-codes corresponding to the multiple two-dimensional coordinates are combined according to the code splitting order of the encrypted media file to obtain the code of the source media file.
In some embodiments, each sub-code is a first byte number, the first dimension coordinate of the two-dimensional coordinate of each sub-code corresponds to a second byte number, the second dimension coordinate corresponds to a third byte number, and the sum of the second byte number and the third byte number is the first byte number.
In some embodiments, the first number of bytes is determined according to a format of the source media file. For example, if the audio file is in 8k16bit format, each sub-code is 2 bytes, the 1 st byte of each sub-code corresponds to the X-axis of the coordinate system, and the 2 nd byte corresponds to the Y-axis of the coordinate system.
In the above embodiment, after receiving the code of the encrypted media file, the decryption device first splits the code of the encrypted media file into a plurality of mapping codes, maps each mapping code into one two-dimensional coordinate according to the mapping table, determines the sub-code corresponding to each two-dimensional coordinate, and combines the plurality of sub-codes to serve as the code of the source media file. The decryption operation of the media file can be quickly realized, and key frames of the encrypted media file do not need to be shifted.
In some embodiments, if the encoding of the encrypted media file is an encrypted encoding, the encoding of the encrypted media file is decrypted using the public key. After decryption, the encoding of the encrypted media file is split into a plurality of mapping encodings.
Fig. 5 is a flow diagram of some embodiments of a media file transfer method of the present disclosure.
At step 510, the encryption device splits the encoding of the source media file into a plurality of sub-encodings, where each sub-encoding corresponds to a two-dimensional coordinate.
In step 520, the encryption device determines a mapping code corresponding to each two-dimensional coordinate according to the mapping table.
In some embodiments, a node value corresponding to each two-dimensional coordinate determines a mapping code corresponding to each node value according to the mapping table.
At step 530, the encryption device combines the mapping codes corresponding to the plurality of sub-codes according to the code splitting order of the source media file to obtain the code of the encrypted media file.
In some embodiments, the combination of the mapping codes corresponding to the sub-codes is encrypted with a private key to further increase the security of the media file.
At step 540, the encryption device sends the encoding of the encrypted media file to the decryption device.
At step 550, the decryption device splits the encoding of the encrypted media file into a plurality of mapped encodings.
In some embodiments, if the encoding of the encrypted media file is encrypted with a private key, the decryption device first decrypts the encrypted encoding with a public key.
In step 560, the decryption device maps each mapping code to a two-dimensional coordinate according to the mapping table.
At step 570, the decryption device determines the subcode corresponding to each two-dimensional coordinate.
At step 580, the decryption device combines the multiple sub-codes in the order of the code splits for the encrypted media file to obtain the code for the source media file.
In the above embodiment, the encryption device encrypts the media file, and the decryption device performs reverse decryption, thereby ensuring the security of data transmission.
Fig. 6 is a schematic structural diagram of some embodiments of a media file encryption apparatus according to the present disclosure. The encryption apparatus includes a first code splitting unit 610, a first code mapping unit 620, and an encrypted file generating unit 630.
The first encoding splitting unit 610 is configured to split the encoding of the source media file into a plurality of sub-encodings, wherein each sub-encoding corresponds to one two-dimensional coordinate.
In some embodiments, the encoding of the source media file is split by a first number of bytes to obtain a plurality of sub-encodings.
In some embodiments, the first number of bytes is determined according to a format of the source media file. For example, if the audio file is in 8k16bit format, the codes of the audio file may be divided into a plurality of sub-codes according to 16 bits, i.e. 2 bytes.
In some embodiments, the first dimension coordinate of each sub-code two-dimensional coordinate corresponds to a second byte number, the second dimension coordinate corresponds to a third byte number, and the sum of the second byte number and the third byte number is the first byte number. For example, the encoding of the source audio file is split by 2 bytes, with the 1 st byte of each sub-encoding corresponding to the X-axis of the coordinate system and the 2 nd byte corresponding to the Y-axis of the coordinate system.
The first code mapping unit 620 is configured to determine a mapping code corresponding to each two-dimensional coordinate according to the mapping table.
In some embodiments, the correspondence between the two-dimensional coordinates and the mapping code is preset. By querying the mapping table, the mapping code corresponding to each two-dimensional coordinate can be determined. The mapping code is different from the corresponding sub-code.
In some embodiments, a node value corresponding to each two-dimensional coordinate determines a mapping code corresponding to each node value according to the mapping table.
In some embodiments, each mapping code corresponds to a fourth byte count, wherein the fourth byte count is determined according to the format of the source media file.
The encrypted file generating unit 630 is configured to combine mapping codes corresponding to the plurality of sub-codes according to the coding splitting order of the source media file, resulting in a code of the encrypted media file.
In some embodiments, mapping codes corresponding to the plurality of sub-codes are combined according to the coding splitting order of the source media file to obtain a new code, which is the code of the encrypted media file.
In some embodiments, the encrypted file generating unit 630 is further configured to encrypt a combination of the mapped encodings corresponding to the sub-encodings using a private key.
In the above embodiment, the encoding of the source media file is split into a plurality of sub-codes, where each sub-code corresponds to one two-dimensional coordinate; determining a mapping code corresponding to each two-dimensional coordinate according to a mapping table; and the combination of the mapping codes corresponding to the plurality of sub-codes is used as the code of the encrypted media file of the source media file, and compared with a simple stream type encryption algorithm, the data security is ensured, and meanwhile, the positions of key frames in the encrypted media file and the source media file do not need to be shifted, so that the decryption is facilitated.
Fig. 7 is a schematic structural diagram of some embodiments of a media file decryption apparatus according to the present disclosure. The decryption apparatus includes: a second code splitting unit 710, a second code mapping unit 720, and a source file generating unit 730.
The second encoding splitting unit 710 is configured to split the encoding of the encrypted media file into a plurality of mapped encodings.
In some embodiments, each mapping code corresponds to a fourth byte count, wherein the fourth byte count is determined according to the format of the source media file. For example, each mapping is encoded as 2 bytes.
In some embodiments, the second encoding splitting unit 710 is further configured to split the encoding of the encrypted media file into a plurality of mapping encodings after decrypting the encoding of the encrypted media file with the public key if the encoding of the encrypted media file is an encrypted encoding.
The second code mapping unit 720 is configured to map each mapping code to a two-dimensional coordinate according to a mapping table.
In some embodiments, the correspondence between the two-dimensional coordinates and the mapping code is preset. By querying the mapping table, the two-dimensional coordinates corresponding to each mapping code can be determined. The mapping code is different from the corresponding sub-code.
In some embodiments, a node value corresponding to each two-dimensional coordinate may be determined according to the mapping table, and then the two-dimensional coordinate of each node value may be determined.
The source file generating unit 730 is configured to combine the sub-codes corresponding to the plurality of two-dimensional coordinates according to the coding splitting order of the encrypted media file, so as to obtain the code of the source media file.
In some embodiments, each sub-code is a first byte number, the first dimension coordinate of the two-dimensional coordinate of each sub-code corresponds to a second byte number, the second dimension coordinate corresponds to a third byte number, and the sum of the second byte number and the third byte number is the first byte number.
In some embodiments, the first number of bytes is determined according to a format of the source media file. For example, if the audio file is in 8k16bit format, each sub-code is 2 bytes, the 1 st byte of each sub-code corresponds to the X-axis of the coordinate system, and the 2 nd byte corresponds to the Y-axis of the coordinate system.
In some embodiments, the sub-codes corresponding to the multiple two-dimensional coordinates are combined according to the coding splitting order of the encrypted media file to obtain the code of the source media file.
In the above embodiment, after receiving the code of the encrypted media file, the decryption device first splits the code of the encrypted media file into a plurality of mapping codes, maps each mapping code into one two-dimensional coordinate according to the mapping table, determines the sub-code corresponding to each two-dimensional coordinate, and uses the combination of the plurality of sub-codes as the code of the source media file, thereby being capable of quickly implementing the decryption operation of the media file.
Fig. 8 is a schematic structural diagram of some embodiments of the media file encryption and decryption system of the present disclosure. The encryption and decryption system comprises a media file encryption device 810 and a media file decryption device 820, wherein the media file encryption device 810 and the media file decryption device 820 have been described in detail in the above embodiments. The media file encryption device 810 and the media file decryption device 820 may be two servers.
In some embodiments, the encryption and decryption system is applied to an intelligent voice navigation system, and the implementation is simple and efficient through practical detection, and has wider adaptability.
Fig. 9 is a schematic structural diagram of some embodiments of an electronic device of the present disclosure. The electronic device includes a memory 910 and a processor 920. Wherein: the memory 910 may be a magnetic disk, flash memory, or any other non-volatile storage medium. The electronic equipment can be positioned in the media file encryption device and also can be positioned in the media file decryption device. The electronic device is located in the media file encryption apparatus, the memory 910 is configured to store the instructions in the embodiments corresponding to fig. 1, 2, and 5, and when located in the media file decryption apparatus, the memory 910 is configured to store the instructions in the embodiments corresponding to fig. 4 and 5. Coupled to memory 910, processor 920 may be implemented as one or more integrated circuits, such as a microprocessor or microcontroller. The processor 920 is configured to execute instructions stored in a memory.
In some embodiments, processor 920 is coupled to memory 910 through a BUS BUS 930. The electronic device 900 may also be coupled to an external storage system 950 via a storage interface 940 for retrieving external data, and may also be coupled to a network or another computer system (not shown) via a network interface 960. And will not be described in detail herein.
In this embodiment, the security of the media file is improved.
In other embodiments, a computer-readable storage medium has stored thereon computer program instructions which, when executed by a processor, implement the steps of the method in the embodiments corresponding to fig. 1-2, 4-5. As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, apparatus, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Thus far, the present disclosure has been described in detail. Some details that are well known in the art have not been described in order to avoid obscuring the concepts of the present disclosure. It will be fully apparent to those skilled in the art from the foregoing description how to practice the presently disclosed embodiments.
Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the foregoing examples are for purposes of illustration only and are not intended to limit the scope of the present disclosure. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims (18)

1. A media file encryption method, comprising:
splitting the code of a source media file into a plurality of sub-codes, wherein each sub-code corresponds to a two-dimensional coordinate;
determining a mapping code corresponding to each two-dimensional coordinate according to a mapping table; and
and combining the mapping codes corresponding to the plurality of sub-codes according to the code splitting sequence of the source media file to obtain the code of the encrypted media file.
2. The media file encryption method of claim 1, further comprising:
and encrypting the combination of the mapping codes corresponding to the sub-codes by using a private key.
3. The media file encryption method of claim 1, wherein splitting the encoding of the source media file into a plurality of sub-encodings comprises:
splitting the code of the source media file according to a first byte number to obtain a plurality of sub-codes, wherein a first dimension coordinate of a two-dimensional coordinate of each sub-code corresponds to a second byte number, a second dimension coordinate corresponds to a third byte number, and the sum of the second byte number and the third byte number is the first byte number.
4. The media file encryption method of claim 3,
the first byte number is determined according to the format of the source media file.
5. The media file encryption method of any one of claims 1 to 4, wherein determining the mapping code corresponding to each of the two-dimensional coordinates comprises:
determining a node value corresponding to each two-dimensional coordinate according to the two-dimensional coordinate corresponding to each sub-code; and
and determining the mapping code corresponding to each node value according to the mapping table.
6. The media file encryption method of claim 5,
each mapping code corresponds to a fourth byte number, wherein the fourth byte number is determined according to the format of the source media file.
7. A media file decryption method, comprising:
splitting the encoding of the encrypted media file into a plurality of mapping encodings;
mapping each mapping code into a two-dimensional coordinate according to a mapping table; and
and combining the sub-codes corresponding to the two-dimensional coordinates according to the code splitting sequence of the encrypted media file to obtain the code of the source media file.
8. The media file decryption method of claim 7, further comprising:
decrypting the encoding of the encrypted media file using a public key.
9. The media file decryption method of claim 7,
each sub-code corresponds to a first byte number, the first dimension coordinate of the two-dimensional coordinate of each sub-code corresponds to a second byte number, the second dimension coordinate corresponds to a third byte number, and the sum of the second byte number and the third byte number is the first byte number.
10. The media file decryption method of claim 9,
the first byte number is determined according to the format of the source media file.
11. The media file decryption method of any one of claims 7 to 10,
determining a node value corresponding to each mapping code according to a mapping table; and
and determining a two-dimensional coordinate corresponding to each sub-code according to the node value.
12. The media file decryption method of claim 11,
each mapping code corresponds to a fourth byte number, wherein the fourth byte number is determined according to the format of the source media file.
13. A media file transfer method, comprising:
the method comprises the steps that an encryption device divides a code of a source media file into a plurality of sub-codes, wherein each sub-code corresponds to a two-dimensional coordinate, a mapping code corresponding to each two-dimensional coordinate is determined according to a mapping table, the mapping codes corresponding to the sub-codes are combined according to a code division sequence of the source media file to obtain a code of the encrypted media file, and the code of the encrypted media file is sent to a decryption device; and
the decryption device divides the code of the encrypted media file into a plurality of mapping codes, maps each mapping code into a two-dimensional coordinate according to a mapping table, determines a sub-code corresponding to each two-dimensional coordinate, and combines the plurality of sub-codes according to the code splitting sequence of the encrypted media file to obtain the code of the source media file.
14. A media file encryption apparatus comprising:
the encoding device comprises a first encoding splitting unit, a second encoding splitting unit and a first encoding decoding unit, wherein the first encoding splitting unit is configured to split encoding of a source media file into a plurality of sub-encoding, and each sub-encoding corresponds to a two-dimensional coordinate;
the first code mapping unit is configured to determine a mapping code corresponding to each two-dimensional coordinate according to a mapping table; and
and the encrypted file generating unit is configured to combine the mapping codes corresponding to the plurality of sub-codes according to the coding splitting order of the source media file to obtain the code of the encrypted media file.
15. A media file decryption apparatus comprising:
a second encoding splitting unit configured to split the encoding of the encrypted media file into a plurality of mapping encodings;
the second code mapping unit is configured to map each mapping code into a two-dimensional coordinate according to a mapping table; and
and the source file generating unit is configured to combine the sub-codes corresponding to the two-dimensional coordinates according to the coding splitting sequence of the encrypted media file to obtain the code of the source media file.
16. A media file encryption and decryption system comprising:
the media file encryption apparatus of claim 14; and
the media file decryption device of claim 15.
17. An electronic device, comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the media file encryption method of any of claims 1 to 6, or the media file decryption method of any of claims 7 to 12, or the media file transmission method of claim 13, based on instructions stored in the memory.
18. A non-transitory computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the media file encryption method of any one of claims 1 to 6, or the media file decryption method of any one of claims 7 to 12, or the media file transmission method of claim 13.
CN202010795267.XA 2020-08-10 2020-08-10 Media file encryption method, decryption method, transmission method and device Pending CN114124413A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010795267.XA CN114124413A (en) 2020-08-10 2020-08-10 Media file encryption method, decryption method, transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010795267.XA CN114124413A (en) 2020-08-10 2020-08-10 Media file encryption method, decryption method, transmission method and device

Publications (1)

Publication Number Publication Date
CN114124413A true CN114124413A (en) 2022-03-01

Family

ID=80373589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010795267.XA Pending CN114124413A (en) 2020-08-10 2020-08-10 Media file encryption method, decryption method, transmission method and device

Country Status (1)

Country Link
CN (1) CN114124413A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101536484A (en) * 2006-11-14 2009-09-16 日本电信电话株式会社 Image signal coding method and decoding mehod, information source coding method and decoding mehod, devices for them, their programs, and memory medium with recorded program
CN101692636A (en) * 2009-10-27 2010-04-07 中山爱科数字科技有限公司 Data element and coordinate algorithm-based method and device for encrypting mixed data
CN102214282A (en) * 2011-05-27 2011-10-12 苏州海客科技有限公司 Protection method suitable for multimedia data files in portable system
US20180337812A1 (en) * 2017-05-19 2018-11-22 Sasken Technologies Ltd System and method for encoding and decoding data
CN110598156A (en) * 2019-09-19 2019-12-20 腾讯科技(深圳)有限公司 Drawing data processing method, drawing data processing device, terminal, server and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101536484A (en) * 2006-11-14 2009-09-16 日本电信电话株式会社 Image signal coding method and decoding mehod, information source coding method and decoding mehod, devices for them, their programs, and memory medium with recorded program
CN101692636A (en) * 2009-10-27 2010-04-07 中山爱科数字科技有限公司 Data element and coordinate algorithm-based method and device for encrypting mixed data
CN102214282A (en) * 2011-05-27 2011-10-12 苏州海客科技有限公司 Protection method suitable for multimedia data files in portable system
US20180337812A1 (en) * 2017-05-19 2018-11-22 Sasken Technologies Ltd System and method for encoding and decoding data
CN110598156A (en) * 2019-09-19 2019-12-20 腾讯科技(深圳)有限公司 Drawing data processing method, drawing data processing device, terminal, server and storage medium

Similar Documents

Publication Publication Date Title
CN110337649B (en) Method and system for dynamic symmetric searchable encryption with imperceptible search patterns
CN110391900B (en) Private key processing method based on SM2 algorithm, terminal and key center
TWI406549B (en) Key derivation functions to enhance security
US7860241B2 (en) Simple universal hash for plaintext aware encryption
TWI386005B (en) Data transformer, data security device, method for generating data transform and method for enhancing security of data
WO2014109828A2 (en) Method for secure substring search
CN112948784B (en) Internet of things terminal identity authentication method, computer storage medium and electronic equipment
JP5835326B2 (en) Encryption device, ciphertext comparison system, ciphertext comparison method, and ciphertext comparison program
CN106817358B (en) Encryption and decryption method and device for user resources
US8467526B2 (en) Key evolution method and system of block ciphering
CN109635573A (en) System, method, apparatus, electronic equipment and the medium of data distribution formula encryption and decryption
CN103366132A (en) Device and method for encrypting data
KR101825838B1 (en) Method of partially encrypting data, method of decrypting a partially-encrpted data, storage medium for a program decrypting a partially-encrpted data
CN113098675B (en) Binary data encryption system and method based on polynomial complete homomorphism
JP3794457B2 (en) Data encryption / decryption method
CN105099653A (en) Distributed data processing method, device and system
CN105100085A (en) Information encryption and decryption methods and devices
CN107104788B (en) Terminal and non-repudiation encryption signature method and device thereof
US20070277043A1 (en) Methods for Generating Identification Values for Identifying Electronic Messages
US20010033654A1 (en) W-EC1 encryption and decryption method and system
CN114218582A (en) Database data encryption method and terminal
KR20140078917A (en) Apparatas and method for security message transmission and reception of vehicle network
Salman et al. A homomorphic cloud framework for big data analytics based on elliptic curve cryptography
JP2003535362A (en) Decryption of cryptographic polynomial
CN114124413A (en) Media file encryption method, decryption method, transmission method and device

Legal Events

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