CN115225933A - Encryption method and decryption method of video file, server and terminal equipment - Google Patents

Encryption method and decryption method of video file, server and terminal equipment Download PDF

Info

Publication number
CN115225933A
CN115225933A CN202210841131.7A CN202210841131A CN115225933A CN 115225933 A CN115225933 A CN 115225933A CN 202210841131 A CN202210841131 A CN 202210841131A CN 115225933 A CN115225933 A CN 115225933A
Authority
CN
China
Prior art keywords
original
encrypted
byte
data block
video file
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
CN202210841131.7A
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.)
Beijing Guosheng Huaxing Technology Co ltd
Original Assignee
Beijing Guosheng Huaxing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Guosheng Huaxing Technology Co ltd filed Critical Beijing Guosheng Huaxing Technology Co ltd
Priority to CN202210841131.7A priority Critical patent/CN115225933A/en
Publication of CN115225933A publication Critical patent/CN115225933A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption
    • H04N21/23476Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption by partially encrypting, e.g. encrypting the ending portion of a movie
    • 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/0435Network 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 symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/26613Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel for generating or managing keys in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream decryption
    • H04N21/44055Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream decryption by partially decrypting, e.g. decrypting a video stream that has been partially encrypted

Landscapes

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

Abstract

The application provides an encryption method, a decryption method, a server and a terminal device for a video file, wherein the encryption method comprises the following steps: generating an original data block in response to acquiring an original video file; performing first encryption processing on original video data to obtain encrypted video data; carrying out second encryption processing on the original data block to obtain an encrypted data block; and obtaining an encrypted video file based on the encrypted data block and the encrypted video data. The decryption method comprises the following steps: responding to the playing operation of the target video, and performing first decryption processing on the encrypted data block to obtain an original data block; acquiring encrypted video data of a target byte corresponding to the playing progress; and carrying out second decryption processing on the encrypted video data corresponding to the target byte to obtain original video data. By the encryption method and the decryption method, the encryption speed can be higher, and the terminal equipment can occupy smaller memory and the video playing is smoother.

Description

Encryption method and decryption method of video file, server and terminal equipment
Technical Field
The application relates to the technical field of video playing, in particular to an encryption method, a decryption method, a server and terminal equipment for a video file.
Background
Currently, when playing standard MP4 or FLV video files, it is common to play them via HTTP protocol. However, with the method for playing through the HTTP protocol, an unauthorized person can play the video only by acquiring the access address of the video file, and thus, great hidden danger exists in the aspects of content and copyright protection of the video file. In order to solve the problem, the server is generally required to encrypt the video file, and the terminal decrypts the encrypted video file and plays the video file, so that an unauthorized person is prevented from stealing the video file without authorization, and the content and the copyright of the video file are protected.
In the prior art of encrypting and decrypting video files, the video files are generally completely encrypted and decrypted by using algorithms such as DES (data encryption standard) or AES (advanced encryption standard), namely, in the encryption process, a server encrypts the whole video file by using the DES or AES algorithm. However, in the method in the prior art, in the encryption process, since the video file is completely encrypted by using the algorithm such as DES or AES, the encryption speed is slow. In the decryption process, since all the data of the bytes before the byte corresponding to the playing progress in the encrypted video file must be acquired, the occupied memory is large, and the video playing is not smooth.
Disclosure of Invention
In view of the above, the present application aims to provide an encryption method, a decryption method, a server and a terminal device for a video file. The encryption speed can be higher, and the terminal equipment can occupy smaller memory and make the video playing more smooth.
In a first aspect, an embodiment of the present application provides an encryption method for a video file, which is applied to a server, and the encryption method includes:
acquiring an original video file, and determining the file size of the original video file and original video data corresponding to each byte of the original video file;
in response to the original video file being obtained, generating an original data block with a data block size of the random integer by using the random integer; the random integer is an integer in a numerical range randomly generated based on a predetermined numerical range;
aiming at each byte of the original video file, performing first encryption processing on original video data corresponding to the byte by using the random integer and the original data block to obtain encrypted video data corresponding to the byte;
responding to the obtained encrypted video data corresponding to all bytes of the original video file, and generating a secret key based on the file size of the original video file;
performing second encryption processing on the original data block by using a preset encryption and decryption algorithm and the secret key to obtain an encrypted data block;
and obtaining an encrypted video file based on the encrypted data blocks and the encrypted video data corresponding to each byte.
Optionally, the performing, for each byte of the original video file, the first encryption processing on the original video data corresponding to the byte by using the random integer and the original data block to obtain encrypted video data corresponding to the byte includes:
aiming at each byte of the original video file, acquiring a position serial number corresponding to the byte, and performing modular operation on the position serial number corresponding to the byte and the random integer to obtain an index position corresponding to the original data block; the index position indicates a few bytes in the original data block;
taking the original data block data corresponding to the index position in the original data blocks as original data block index data corresponding to the byte;
and carrying out exclusive OR operation on the original video data corresponding to the byte and the index data of the original data block to obtain the encrypted video data corresponding to the byte.
Optionally, the obtaining an encrypted video file based on the encrypted data block and the encrypted video data corresponding to each byte includes:
creating a new blank file;
writing the encrypted video data corresponding to each byte into the blank file according to the sequence of the position serial number corresponding to the byte;
in response to the encrypted video data corresponding to all bytes being written into the blank file, writing the encrypted data block into the blank file;
and taking the blank file written with the encrypted video data corresponding to each byte and the encrypted data block as an encrypted video file.
In a second aspect, an embodiment of the present application provides a decryption method for a video file, where the decryption method is applied to a terminal device, and the decryption method includes:
responding to a playing operation of a target video, and acquiring an encrypted data block and a pre-generated random integer in an encrypted video file corresponding to the target video from a server; the encrypted data block is obtained by encrypting an original data block generated by using the random integer;
acquiring a secret key;
carrying out first decryption processing on the encrypted data block by using a preset encryption and decryption algorithm and the secret key to obtain an original data block;
acquiring the playing progress of the video in real time; the playing progress corresponds to at least one byte of an original video file in the encrypted video files;
based on the playing progress, acquiring encrypted video data of a target byte corresponding to the playing progress from an encrypted video file;
and aiming at each target byte, carrying out second decryption processing on the encrypted video data corresponding to the target byte by using the random integer and the original data block to obtain original video data corresponding to the target byte.
Optionally, the performing, for each target byte, a second decryption process on the encrypted video data corresponding to the target byte by using the random integer and the original data block to obtain original video data corresponding to the target byte includes:
for each target byte, acquiring a position serial number corresponding to the target byte, and performing modular operation on the position serial number corresponding to the target byte and the random integer to obtain an index position corresponding to the original data block;
taking the original data block data corresponding to the index position in the original data blocks as original data block index data corresponding to the target byte;
and carrying out exclusive OR operation on the encrypted video data corresponding to the target byte and the index data of the original data block to obtain the original video data corresponding to the target byte.
Optionally, the key is obtained by:
responding to the playing operation of the target video, and acquiring a secret key from a server;
alternatively, the first and second electrodes may be,
and generating a secret key by using a secret key generator preset on the terminal equipment in response to the touch operation of playing the video.
Optionally, the generating a key by using a key generator preset on the terminal device in response to the touch operation of playing the video includes:
responding to touch operation of playing a video, and acquiring the file size and a preset integer of an encrypted video file;
taking the difference between the file size of the encrypted video file and the predetermined integer as the file size of the original video file;
and generating a key by using a key generator preset on the terminal equipment based on the file size of the original video file.
In a third aspect, an embodiment of the present application provides a server, where the server includes:
the device comprises an original video file acquisition module, a video file processing module and a video file processing module, wherein the original video file acquisition module is used for acquiring an original video file and determining the file size of the original video file and original video data corresponding to each byte of the original video file;
an original data block generating module, configured to generate, in response to obtaining the original video file, an original data block having a data block size of the random integer by using a random integer; the random integer is an integer in a numerical range randomly generated based on a predetermined numerical range;
the first encryption module is used for carrying out first encryption processing on original video data corresponding to each byte of the original video file by using the random integer and the original data block to obtain encrypted video data corresponding to the byte;
the key generation module is used for responding to the encrypted video data corresponding to all bytes of the obtained original video file and generating a key based on the file size of the original video file;
the second encryption module is used for carrying out second encryption processing on the original data block by using a preset encryption and decryption algorithm and the secret key to obtain an encrypted data block;
and the encrypted video file obtaining module is used for obtaining an encrypted video file based on the encrypted data block and the encrypted video data corresponding to each byte.
In a fourth aspect, an embodiment of the present application provides a terminal device, where the terminal device includes:
the device comprises an encrypted data block acquisition module, a data storage module and a data processing module, wherein the encrypted data block acquisition module is used for responding to the playing operation of a target video and acquiring an encrypted data block and a pre-generated random integer in an encrypted video file corresponding to the target video from a server; the encrypted data block is obtained by encrypting an original data block generated by using the random integer;
the key acquisition module is used for acquiring a key;
the first decryption module is used for performing first decryption processing on the encrypted data block by using a preset encryption and decryption algorithm and the secret key to obtain an original data block;
the playing progress acquiring module is used for acquiring the playing progress of the video in real time; the playing progress corresponds to at least one byte of an original video file in the encrypted video file;
the encrypted video data acquisition module is used for acquiring encrypted video data of a target byte corresponding to the playing progress from an encrypted video file based on the playing progress;
and the original video data obtaining module is used for carrying out second decryption processing on the encrypted video data corresponding to each target byte by using the random integer and the original data block to obtain the original video data corresponding to the target byte.
In a fifth aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate with each other through the bus, and the processor executes the machine-readable instructions to perform the steps of the video file encryption method according to the first aspect and/or the video file decryption method according to the second aspect.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor, and the computer program performs the steps of the method for encrypting a video file according to any one of the first aspect and/or the steps of the method for decrypting a video file according to any one of the second aspect.
According to the encryption method, the decryption method, the server and the terminal device of the video file, the entire original video file does not need to be encrypted by an AES algorithm in the encryption process, and only one original data block needs to be encrypted by the AES algorithm, so that the encryption speed is higher, and in the decryption process, only encrypted video data of a target byte corresponding to the playing progress in the encrypted video file needs to be acquired, and encrypted video data of all bytes in the encrypted video file before the target byte corresponding to the playing progress does not need to be acquired, so that the terminal device can occupy smaller memory, and the video playing is smoother.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating an encryption method for a video file according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating an encryption process of a video file according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for decrypting a video file according to an embodiment of the present application;
fig. 4 shows a schematic structural diagram of a server provided in an embodiment of the present application;
fig. 5 shows a schematic structural diagram of a terminal device provided in an embodiment of the present application;
fig. 6 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. Every other embodiment that can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present application falls within the protection scope of the present application.
For the purpose of understanding the embodiments of the present application, a detailed description will be given first of all of an encryption method for a video file disclosed in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a flowchart illustrating an encryption method for a video file according to an embodiment of the present disclosure. As shown in fig. 1, a method for encrypting a video file provided in an embodiment of the present application includes the following steps:
s101, an original video file is obtained, and the file size of the original video file and original video data corresponding to each byte of the original video file are determined.
Here, the original video file is a video file in a standard format suitable for HTTP online playback. As an example, the original video file may be an MP4 format video file, or alternatively, the original video file may be an FLV format video file.
The file size of the original video file indicates the number of bytes of the original video file. For example, if the file size of the original video file is 2048 bytes (2048 bytes), the number of bytes of the original video file is 2048. Here, since each byte corresponds to 8 bits (8 bits), the original video data corresponding to each byte is data corresponding to the 8 bits (8 bits).
S102, in response to the fact that the original video file is obtained, an original data block with the data block size being the random integer is generated through the random integer.
Here, the data block size indicates the number of bytes of the data block. For example, if the data block size is 20 bytes, it means that the data block has 20 bytes.
Here, the random integer is an integer within one of the value intervals that is randomly generated based on a predetermined value interval.
It should be noted that, before the encryption method described in the embodiment of the present application is executed, a predetermined integer, a value interval, a random integer generator, and a random data block generator need to be set in the server in advance.
Here, the predetermined integer L is a positive integer which is an integer multiple of 16, which is predefined in the server. For example, the predetermined integer L may be 16, 32, etc. It should be noted that, the larger the predetermined integer is, the higher the security of encrypting the original video file is, but the larger the predetermined integer is, the larger the space occupied by the encrypted file is, and therefore, in the specific implementation process, a suitable predetermined integer may be selected according to the actual situation.
Here, as an example, the numerical range may be [ L-16, L-1]. For example, if the predetermined integer L is 32, the numerical interval is [16, 31].
As an example, after the original video data is acquired, in step S102, the value interval may be first input into the random integer generator, so that the random integer generator generates a random integer within the value interval, for example, the random integer may be 20, and then the random integer is input into the random data block generator, so that the random data block generator generates an original data block with a data block size of the random integer, for example, if the random integer is 20, an original data block with a data block size of 20 bytes may be generated.
S103, aiming at each byte of the original video file, performing first encryption processing on original video data corresponding to the byte by using the random integer and the original data block to obtain encrypted video data corresponding to the byte.
As an example, this step may include: s1031, S1032, and S1033.
S1031, aiming at each byte of the original video file, obtaining a position serial number corresponding to the byte, and performing modular operation on the position serial number corresponding to the byte and the random integer to obtain an index position corresponding to the original data block; the index position indicates the several bytes in the original data block.
Here, the position sequence number corresponding to each byte is the sequence number of the position of the byte in the original video file, and the position sequence number is calculated from 0. For example, if the byte is the 30 th byte in the original video file, the position sequence number corresponding to the byte is 29.
For example, for each byte of the original video file, the index position i' corresponding to the original data block can be obtained by using the following formula:
i’=i%SL;
wherein, i represents the position sequence number of the (i + 1) th byte of the original video file; SL is a random integer; % is the modulo operation.
And S1032, taking the original data block data corresponding to the index position in the original data blocks as the original data block index data corresponding to the byte.
For example, the original data block index data is XorSource [ i' ].
S1033, carrying out XOR operation on the original video data corresponding to the byte and the index data of the original data block to obtain the encrypted video data corresponding to the byte.
For example, the encrypted video data N [ i ] corresponding to the byte can be obtained by using the following formula:
N[i]=F[i]^XorSource[i’];
wherein, F [ i ] is the original video data corresponding to the byte; and ^ is XOR operation.
And S104, responding to the encrypted video data corresponding to all bytes of the obtained original video file, and generating a secret key based on the file size of the original video file.
As an example, after acquiring the encrypted video data corresponding to all bytes of the original video file, the file size of the original video file may be input into a key generator provided in the server in advance, and a key may be generated.
Here, a key generator provided in the server in advance is configured to receive a parameter of an integer type and output a key of a preset length. Here, the preset length is related to a preset encryption and decryption algorithm. For example, if the predetermined encryption and decryption algorithm is the AES128 algorithm, the predetermined length is 16 bytes, if the predetermined encryption and decryption algorithm is the AES192 algorithm, the predetermined length is 24 bytes, and if the predetermined encryption and decryption algorithm is the AES256 algorithm, the predetermined length is 32 bytes.
Next, how the key generator generates a key of a preset length when the preset encryption/decryption algorithm is the AES128 algorithm will be described. As an example, the key generator may first receive an integer type parameter, then convert the integer type parameter into a string type parameter, and then perform an operation of adding bytes or deleting bytes according to the string length of the string type parameter, so as to obtain a key with a length of 16 bytes. As an example, the supplementary byte may be a character string in which the front is repeated until the character string length is 16 bytes, or the supplementary byte may be a character string type parameter followed by only 0 until the character string length is 16 bytes.
Note that, when the file size received by the key generator is the same, the generated key is also the same.
And S105, performing second encryption processing on the original data block by using a preset encryption and decryption algorithm and the secret key to obtain an encrypted data block.
As an example, the preset encryption and decryption algorithm may be any one of an AES128 algorithm, an AES192 algorithm, and an AES256 algorithm.
In this step, as an example, the original data block may be encrypted based on the key using a method of encrypting data using the AES128 algorithm in the related art, thereby obtaining an encrypted data block.
Here, the size of the acquired encrypted data block is the same as the predetermined integer L, for example, when the predetermined integer L set in advance is 32, the size of the acquired encrypted data block is 32 bytes. Here, it is known that, after plaintext data is encrypted by AES128 algorithm, the length of generated ciphertext data is always an integral multiple of 16 bytes, and the integral multiple is related to the length of plaintext data. For example, if the length of plaintext data is 1 to 15 bytes, the length of generated ciphertext data is 16 bytes, if the length of plaintext data is 16 to 31 bytes, the length of generated ciphertext data is 32 bytes, and if the length of plaintext data is 160 to 175 bytes, the length of generated ciphertext data is 176 bytes. Therefore, when the predetermined integer L is 32, the data block size of the original data block (corresponding to plaintext data) is 20 bytes, and the data block size of the corresponding encrypted data block (corresponding to ciphertext data) is 32 bytes.
S106, obtaining an encrypted video file based on the encrypted data block and the encrypted video data corresponding to each byte.
As an example, in this step, first, a new blank file is created, then the encrypted video data corresponding to each byte is written into the blank file in the order of the position number corresponding to the byte, then in response to that all the encrypted video data corresponding to the byte are written into the blank file, the encrypted data block is written into the blank file, and finally the blank file into which the encrypted video data corresponding to each byte and the encrypted data block are written is used as the encrypted video file.
In a specific example, how to obtain an encrypted video file will be described below with reference to fig. 2.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating an encryption process of a video file according to an embodiment of the present disclosure.
As shown in fig. 2, first, an original video file F is obtained, and a file size FileSize of the original video file F and original video data F0 to F i corresponding to each byte of the original video file F are determined, in response to obtaining the original video file F, an original data block XorSource with a data block size SL is generated by using a random integer SL randomly generated based on a predetermined numerical interval, then, for each byte of the original video file, using the random integer SL and the original data block XorSource to perform a first encryption process on the original video data corresponding to the byte, obtaining encrypted video data F [0] < Lambda > XorSource [0 > < Lambda > SL ] < Lambda > XorSource [ i% SL ] < Lambda > corresponding to each byte, after acquiring the encrypted video data corresponding to all bytes of the original video file F, inputting the file size FileSize of the original video file into a Key generator to obtain a Key, then, the AES128 algorithm and the Key are used for carrying out second encryption processing on the original data block XorSource to obtain an encrypted data block EncXorSource with the data block size of a preset integer L, then, a new blank file is created, encrypted video data F [0] xORSource [0] SL ] -F [ i ] xORSource [ i% SL ] corresponding to each byte is written into the blank file in the order of the position number corresponding to the byte, and then in response to the encrypted video data corresponding to all bytes being written into the blank file, writing the encrypted data block EncXorSource into the blank file, and using the blank file into which the encrypted video data F [0] < Lambda > XorSource [0 > < SL > -F [ i ] < Lambda > XorSource [ i% SL ] corresponding to each byte and the encrypted data block EncXorSource are written as an encrypted video file NF.
According to the video file encryption method provided by the embodiment of the application, the entire original video file does not need to be encrypted by an AES algorithm in the encryption process, and only one original data block needs to be encrypted by the AES algorithm, so that the encryption speed is higher.
In addition, the embodiment of the application also provides a decryption method of the video file. A method for decrypting a video file disclosed in the embodiment of the present application will be described in detail below with reference to fig. 3.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for decrypting a video file according to an embodiment of the present disclosure. As shown in fig. 3, the method for decrypting a video file provided in the embodiment of the present application includes the following steps:
s201, responding to the playing operation of the target video, and acquiring an encrypted data block and a pre-generated random integer in an encrypted video file corresponding to the target video from a server.
Here, the target video is a video file to be played, which is in a standard format suitable for HTTP online playing.
Here, the encrypted video file corresponding to the target video is encrypted in advance and stored in the corresponding server. The encrypted video file comprises encrypted video data and encrypted data blocks. The encrypted data block is encrypted based on an original data block generated using the random integer. Here, please refer to the above-mentioned encryption method for the video file in the process of obtaining the encrypted data block, which is not described herein again.
As an example, in this step, an encrypted video file corresponding to the target video may be accessed through a URI first in response to a play operation on the target video, and then an encrypted data block in the encrypted video file corresponding to the target video may be obtained by using a Range request of HTTP.
S202, obtaining a key.
As an example, in this step, the key may be acquired from the server in response to a play operation of the target video, or the key may be generated with a key generator provided in advance on the terminal device in response to a touch operation of playing the video.
As an example, the step of generating the key by using a key generator preset on the terminal device in response to the touch operation of playing the video includes:
s2021, responding to the touch operation of playing the video, and acquiring the file size and the preset integer of the encrypted video file.
Here, since the block size of the encrypted data block is the same as the predetermined integer, acquiring the predetermined integer corresponds to acquiring the block size of the encrypted data block in the encrypted video file.
Here, the predetermined integer is the same as a predetermined integer previously set in the server in the encryption process. Therefore, the predetermined integer may be set in advance on the terminal device.
As an example, in this step, the predetermined integer may be acquired from a server in response to a play operation on the target video, or may be acquired from the terminal device in response to a touch operation on the play video.
The mode of obtaining the predetermined integer from the server can adjust the predetermined integer according to actual needs, so that the encryption and decryption processes of the video file are more flexible. The method for acquiring the predetermined integer from the terminal equipment avoids the risk of leakage of the predetermined integer, so that the encryption and decryption processes of the video file are safer.
S2022, taking the difference between the file size of the encrypted video file and the predetermined integer as the file size of the original video file.
For example, the file size FileSize of the original video file may be determined using the following formula:
FileSize=NFileSize-L;
the NFilesize is the file size of the encrypted video file; l is a predetermined integer.
S2023, generating a key by using a key generator preset on the terminal device based on the file size of the original video file.
As an example, the file size of the original video file may be input into a key generator set in advance on the terminal device in this step, and a key is generated.
Here, the preset key generator is the same as the key generator in the corresponding server. I.e. when the size of the file received by the key generator is the same, the generated key is the same. Therefore, since the input parameter received by the key generator set in the server in advance in the encryption process is also the size of the original video file, when the input parameter received by the key generator set in advance on the terminal device is the file size of the original video file, the key generated by the key generator set in advance on the terminal device is the same as the key obtained in the encryption process.
The mode of obtaining the key from the server can enable the key generator to be adjusted according to actual needs, so that the encryption and decryption processes of the video file are more flexible. The mode of generating the key by using the key generator preset on the terminal device avoids the risk of key leakage, so that the encryption and decryption processes of the video file are safer.
S203, carrying out first decryption processing on the encrypted data block by using a preset encryption and decryption algorithm and the secret key to obtain an original data block.
Here, the preset encryption/decryption algorithm is the same algorithm as the encryption/decryption algorithm in the encryption process. As an example, the preset encryption and decryption algorithm may be an AES128 algorithm, or an AES192 algorithm, or an AES256 algorithm.
In this step, the encrypted data block may be decrypted based on the key using the method of decrypting the data using the AES128 algorithm in the prior art, thereby obtaining the original data block. Here, the size of the acquired original data block is the same as the random integer SL, for example, when the random integer SL is 20, the size of the acquired original data block is 20 bytes.
S204, acquiring the playing progress of the video in real time; the playback progress corresponds to at least one byte of an original video file of the encrypted video files.
Here, the playing progress is a time progress of the video currently needing to be played, and the playing progress may be 9 minutes as an example. Here, since the player is preset with a corresponding relationship between the playing progress and each byte in the original video file, at least one byte of the original video file corresponding to the playing progress can be found according to the playing progress.
S205, based on the playing progress, obtaining the encrypted video data of the target byte corresponding to the playing progress from the encrypted video file.
Here, the target byte is at least one byte of an original video file among the encrypted video files corresponding to the current play progress. For example, if the file size of the original video file is 180 bytes, and if the playing progress is 2 minutes, at least one byte corresponding to the playing progress is 120 th to 180 th bytes, the target byte is 120 to 180, and the encrypted video data of the target byte corresponding to the playing progress is NF 119 to NF 179.
S206, aiming at each target byte, carrying out second decryption processing on the encrypted video data corresponding to the target byte by using the random integer and the original data block to obtain the original video data corresponding to the target byte.
As an example, this step may comprise: s2061, S2062 and S2063.
S2061, aiming at each target byte, obtaining a position serial number corresponding to the target byte, and performing modular operation on the position serial number corresponding to the target byte and the random integer to obtain an index position corresponding to the original data block.
Here, the position sequence number corresponding to each target byte is the sequence number of the position of the target byte in the original video file in the encrypted video file. For example, if the target bytes are 120 th to 180 th bytes, the position numbers corresponding to the target bytes are 119 th to 179 th, respectively.
For example, for each byte of the original video file, the index position i' corresponding to the original data block can be obtained by using the following formula:
i’=i%SL;
wherein, i represents the position sequence number of the (i + 1) th byte of the original video file; SL is a random integer; % is the modulo operation.
S2062, using the original data block data corresponding to the index position in the original data blocks as the original data block index data corresponding to the target byte.
For example, the original data block index data is XorSource [ i' ].
S2063, performing an exclusive or operation on the encrypted video data corresponding to the target byte and the original data block index data to obtain the original video data corresponding to the target byte.
For example, the original video data F [ i ] corresponding to the byte can be obtained by using the following formula:
F[i]=N[i]^XorSource[i’];
wherein, N [ i ] is the encrypted video data corresponding to the byte; and ^ is an exclusive-OR operation.
As an example, after the encrypted video data of the target byte corresponding to the playing progress is obtained from the encrypted video file, the decrypted original data block and the encrypted video data of the target byte corresponding to the playing progress may be transmitted to a player, and the player performs decoding and picture rendering, thereby completing playing of the target video.
According to the video file decryption method provided by the embodiment of the application, in the decryption process, only the encrypted video data of the target byte corresponding to the playing progress in the encrypted video file needs to be acquired, and the encrypted video data of all bytes in the encrypted video file before the target byte corresponding to the playing progress does not need to be acquired, so that the terminal equipment can occupy smaller memory, and the video playing is smoother.
Based on the same inventive concept, the embodiment of the application also provides a server.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 400 includes:
an original video file obtaining module 401, configured to obtain an original video file, and determine a file size of the original video file and original video data corresponding to each byte of the original video file;
an original data block generating module 402, configured to generate, in response to obtaining the original video file, an original data block with a data block size of a random integer by using the random integer; the random integer is an integer in a numerical range randomly generated based on a predetermined numerical range;
a first encryption module 403, configured to, for each byte of the original video file, perform first encryption processing on original video data corresponding to the byte by using the random integer and the original data block, to obtain encrypted video data corresponding to the byte;
a key generation module 404, configured to generate a key based on the file size of the original video file in response to acquiring encrypted video data corresponding to all bytes of the original video file;
a second encryption module 405, configured to perform a second encryption process on the original data block by using a preset encryption and decryption algorithm and the key, so as to obtain an encrypted data block;
an encrypted video file obtaining module 406, configured to obtain an encrypted video file based on the encrypted data block and the encrypted video data corresponding to each byte.
In a possible implementation manner, the first encryption module 403 is specifically configured to:
aiming at each byte of the original video file, acquiring a position serial number corresponding to the byte, and performing modular operation on the position serial number corresponding to the byte and the random integer to obtain an index position corresponding to the original data block; the index position indicates a few bytes in the original data block;
taking the original data block data corresponding to the index position in the original data blocks as original data block index data corresponding to the byte;
and carrying out exclusive OR operation on the original video data corresponding to the byte and the index data of the original data block to obtain the encrypted video data corresponding to the byte.
In a possible implementation manner, the encrypted video file obtaining module 406 is specifically configured to:
creating a new blank file;
writing the encrypted video data corresponding to each byte into the blank file according to the sequence of the position serial number corresponding to the byte;
in response to the encrypted video data corresponding to all bytes being written into the blank file, writing the encrypted data block into the blank file;
and taking the blank file written with the encrypted video data corresponding to each byte and the encrypted data block as an encrypted video file.
According to the server provided by the embodiment of the application, the whole original video file does not need to be encrypted by the AES algorithm in the encryption process, and only one original data block needs to be encrypted by the AES algorithm, so that the encryption speed is higher.
Based on the same inventive concept, the embodiment of the application also provides the terminal equipment.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application, where the terminal device 500 includes:
an encrypted data block obtaining module 501, configured to, in response to a playing operation on a target video, obtain, from a server, an encrypted data block and a pre-generated random integer in an encrypted video file corresponding to the target video; the encrypted data block is obtained by encrypting an original data block generated by using the random integer;
a key obtaining module 502, configured to obtain a key;
a first decryption module 503, configured to perform a first decryption process on the encrypted data block by using a preset encryption and decryption algorithm and the key, to obtain an original data block;
a playing progress acquiring module 504, configured to acquire a playing progress of the video in real time; the playing progress corresponds to at least one byte of an original video file in the encrypted video file;
an encrypted video data obtaining module 505, configured to obtain, based on the play progress, encrypted video data of a target byte corresponding to the play progress from an encrypted video file;
an original video data obtaining module 506, configured to perform, for each target byte, second decryption processing on the encrypted video data corresponding to the target byte by using the random integer and the original data block, so as to obtain original video data corresponding to the target byte.
In a possible implementation, the key obtaining module 502 is specifically configured to:
responding to the playing operation of the target video, and acquiring a secret key from a server;
alternatively, the first and second electrodes may be,
and responding to the touch operation of playing the video, and generating a secret key by using a secret key generator preset on the terminal equipment.
In a possible implementation manner, the key obtaining module 502, when configured to generate a key by using a key generator preset on the terminal device in response to a touch operation of playing a video, is specifically configured to:
responding to touch operation of playing a video, and acquiring the file size and a preset integer of an encrypted video file;
taking the difference between the file size of the encrypted video file and the predetermined integer as the file size of the original video file;
and generating a key by using a key generator preset on the terminal equipment based on the file size of the original video file.
In a possible implementation, the raw video data obtaining module 506 is specifically configured to:
aiming at each target byte, acquiring a position serial number corresponding to the target byte, and performing modular operation on the position serial number corresponding to the target byte and the random integer to obtain an index position corresponding to the original data block;
taking the original data block data corresponding to the index position in the original data blocks as original data block index data corresponding to the target byte;
and carrying out exclusive or operation on the encrypted video data corresponding to the target byte and the original data block index data to obtain original video data corresponding to the target byte.
According to the terminal device provided by the embodiment of the application, in the decryption process, only the encrypted video data of the target byte corresponding to the playing progress in the encrypted video file needs to be acquired, and the encrypted video data of all bytes in the encrypted video file before the target byte corresponding to the playing progress does not need to be acquired, so that the terminal device can occupy a smaller memory, and the video playing is smoother.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, the electronic device 600 includes a processor 610, a memory 620, and a bus 630.
The memory 620 stores machine-readable instructions executable by the processor 610, when the electronic device 600 runs, the processor 610 communicates with the memory 620 through the bus 630, and when the machine-readable instructions are executed by the processor 610, the steps of the video file encryption method and/or the steps of the video file decryption method in the above method embodiments may be executed.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the step of the video file encryption method and/or the step of the video file decryption method in the foregoing method embodiments may be executed.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units into only one type of logical function may be implemented in other ways, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some communication interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used to illustrate the technical solutions of the present application, but not to limit the technical solutions, and the scope of the present application is not limited to the above-mentioned embodiments, although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: those skilled in the art can still make modifications or changes to the embodiments described in the foregoing embodiments, or make equivalent substitutions for some features, within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. An encryption method for a video file, applied to a server, the encryption method comprising:
acquiring an original video file, and determining the file size of the original video file and original video data corresponding to each byte of the original video file;
in response to the original video file being obtained, generating an original data block with a data block size of the random integer by using the random integer; the random integer is an integer in a numerical range randomly generated based on a predetermined numerical range;
aiming at each byte of the original video file, performing first encryption processing on original video data corresponding to the byte by using the random integer and the original data block to obtain encrypted video data corresponding to the byte;
responding to the obtained encrypted video data corresponding to all bytes of the original video file, and generating a secret key based on the file size of the original video file;
performing second encryption processing on the original data block by using a preset encryption and decryption algorithm and the secret key to obtain an encrypted data block;
and obtaining an encrypted video file based on the encrypted data blocks and the encrypted video data corresponding to each byte.
2. The encryption method according to claim 1, wherein said performing, for each byte of the original video file, a first encryption process on the original video data corresponding to the byte by using the random integer and the original data block to obtain encrypted video data corresponding to the byte comprises:
aiming at each byte of the original video file, acquiring a position serial number corresponding to the byte, and performing modular operation on the position serial number corresponding to the byte and the random integer to obtain an index position corresponding to the original data block; the index position indicates a few bytes in the original data block;
taking the original data block data corresponding to the index position in the original data blocks as original data block index data corresponding to the byte;
and carrying out exclusive OR operation on the original video data corresponding to the byte and the index data of the original data block to obtain the encrypted video data corresponding to the byte.
3. The encryption method according to claim 1, wherein obtaining an encrypted video file based on the encrypted data block and the encrypted video data corresponding to each byte comprises:
creating a new blank file;
writing the encrypted video data corresponding to each byte into the blank file according to the sequence of the position serial number corresponding to the byte;
in response to the encrypted video data corresponding to all bytes being written into the blank file, writing the encrypted data block into the blank file;
and taking the blank file written with the encrypted video data corresponding to each byte and the encrypted data block as an encrypted video file.
4. A decryption method of a video file is applied to a terminal device, and the decryption method comprises the following steps:
responding to a playing operation of a target video, and acquiring an encrypted data block and a pre-generated random integer in an encrypted video file corresponding to the target video from a server; the encrypted data block is obtained by encrypting an original data block generated by using the random integer;
acquiring a secret key;
performing first decryption processing on the encrypted data block by using a preset encryption and decryption algorithm and the key to obtain an original data block;
acquiring the playing progress of the video in real time; the playing progress corresponds to at least one byte of an original video file in the encrypted video file;
based on the playing progress, acquiring encrypted video data of a target byte corresponding to the playing progress from an encrypted video file;
and for each target byte, carrying out second decryption processing on the encrypted video data corresponding to the target byte by using the random integer and the original data block to obtain the original video data corresponding to the target byte.
5. The decryption method according to claim 4, wherein the second decryption processing of the encrypted video data corresponding to each target byte by using the random integer and the original data block to obtain the original video data corresponding to the target byte comprises:
for each target byte, acquiring a position serial number corresponding to the target byte, and performing modular operation on the position serial number corresponding to the target byte and the random integer to obtain an index position corresponding to the original data block;
taking the original data block data corresponding to the index position in the original data blocks as original data block index data corresponding to the target byte;
and carrying out exclusive or operation on the encrypted video data corresponding to the target byte and the original data block index data to obtain original video data corresponding to the target byte.
6. Decryption method according to claim 4, characterized in that the key is obtained by:
responding to the playing operation of the target video, and acquiring a secret key from a server;
alternatively, the first and second electrodes may be,
and responding to the touch operation of playing the video, and generating a secret key by using a secret key generator preset on the terminal equipment.
7. The decryption method according to claim 6, wherein the generating a key by using a key generator preset on the terminal device in response to the touch operation of playing the video comprises:
responding to touch operation of playing a video, and acquiring the file size and a preset integer of an encrypted video file;
taking the difference between the file size of the encrypted video file and the predetermined integer as the file size of the original video file;
and generating a key by using a key generator preset on the terminal equipment based on the file size of the original video file.
8. A server, characterized in that the server comprises:
the device comprises an original video file acquisition module, a video file processing module and a video file processing module, wherein the original video file acquisition module is used for acquiring an original video file and determining the file size of the original video file and original video data corresponding to each byte of the original video file;
an original data block generating module, configured to generate, in response to obtaining the original video file, an original data block having a data block size of the random integer by using a random integer; the random integer is an integer in a numerical range randomly generated based on a predetermined numerical range;
the first encryption module is used for carrying out first encryption processing on original video data corresponding to each byte of the original video file by using the random integer and the original data block to obtain encrypted video data corresponding to the byte;
the key generation module is used for responding to the encrypted video data corresponding to all bytes of the obtained original video file and generating a key based on the file size of the original video file;
the second encryption module is used for carrying out second encryption processing on the original data block by utilizing a preset encryption and decryption algorithm and the secret key to obtain an encrypted data block;
and the encrypted video file obtaining module is used for obtaining an encrypted video file based on the encrypted data block and the encrypted video data corresponding to each byte.
9. A terminal device, characterized in that the terminal device comprises:
the device comprises an encrypted data block acquisition module, a data storage module and a data processing module, wherein the encrypted data block acquisition module is used for responding to the playing operation of a target video and acquiring an encrypted data block and a pre-generated random integer in an encrypted video file corresponding to the target video from a server; the encrypted data block is obtained by encrypting an original data block generated by using the random integer;
the key acquisition module is used for acquiring a key;
the first decryption module is used for performing first decryption processing on the encrypted data block by using a preset encryption and decryption algorithm and the secret key to obtain an original data block;
the playing progress acquiring module is used for acquiring the playing progress of the video in real time; the playing progress corresponds to at least one byte of an original video file in the encrypted video file;
the encrypted video data acquisition module is used for acquiring encrypted video data of a target byte corresponding to the playing progress from an encrypted video file based on the playing progress;
and the original video data acquisition module is used for carrying out second decryption processing on the encrypted video data corresponding to each target byte by using the random integer and the original data block to obtain the original video data corresponding to the target byte.
10. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operated, the machine-readable instructions when executed by the processor performing the steps of the method for encrypting a video file according to any one of claims 1 to 3 and/or the steps of the method for decrypting a video file according to any one of claims 4 to 7.
11. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, performs the steps of the method for encrypting a video file according to any one of claims 1 to 3 and/or the steps of the method for decrypting a video file according to any one of claims 4 to 7.
CN202210841131.7A 2022-07-18 2022-07-18 Encryption method and decryption method of video file, server and terminal equipment Pending CN115225933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210841131.7A CN115225933A (en) 2022-07-18 2022-07-18 Encryption method and decryption method of video file, server and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210841131.7A CN115225933A (en) 2022-07-18 2022-07-18 Encryption method and decryption method of video file, server and terminal equipment

Publications (1)

Publication Number Publication Date
CN115225933A true CN115225933A (en) 2022-10-21

Family

ID=83611446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210841131.7A Pending CN115225933A (en) 2022-07-18 2022-07-18 Encryption method and decryption method of video file, server and terminal equipment

Country Status (1)

Country Link
CN (1) CN115225933A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117596086A (en) * 2024-01-19 2024-02-23 广东海洋大学 Commodity data encryption transmission method and system based on supply chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117596086A (en) * 2024-01-19 2024-02-23 广东海洋大学 Commodity data encryption transmission method and system based on supply chain
CN117596086B (en) * 2024-01-19 2024-04-05 广东海洋大学 Commodity data encryption transmission method and system based on supply chain

Similar Documents

Publication Publication Date Title
KR101226167B1 (en) Method and system for obfuscating a cryptographic function
EP3174238B1 (en) Protecting white-box feistel network implementation against fault attack
US20120269340A1 (en) Hierarchical encryption/decryption device and method thereof
JP2013059078A (en) Multimedia data protection
JP5337411B2 (en) Information concealment method and information concealment device
CN106878013B (en) File encryption and decryption method and device
US9047445B2 (en) Memory device and method for updating a security module
CN106888081B (en) Wide coding of intermediate values within white-box implementations
JP2004318154A (en) Protection of digital content using block cipher cryptography
EP2593895A1 (en) Storage device and method for providing a partially-encrypted content file to a host device
JP2002229861A (en) Recording device with copyright protecting function
WO2001052474A1 (en) Authentication communication device and authentication communication system
EP1143656B1 (en) Copyright protection system, encryption device, decryption device, and recording medium
JP6517436B2 (en) Encryption device and encoding device
EP2425369B1 (en) Memory device and method for adaptive protection of content
KR20130093557A (en) System, devices and methods for collaborative execution of a software application comprising at least one encrypted instruction
CN105721156A (en) General Encoding Functions For Modular Exponentiation Encryption Schemes
EP3382929A1 (en) Technique to generate symmetric encryption algorithms
CN115225933A (en) Encryption method and decryption method of video file, server and terminal equipment
JP4713745B2 (en) Authentication communication apparatus and authentication communication system
CN114390317B (en) Encryption method and system for streaming video
JP4731034B2 (en) Copyright protection system, encryption device, decryption device, and recording medium
CN114329568A (en) File encryption method, device, system platform and file decryption method
JP4287397B2 (en) Ciphertext generation apparatus, ciphertext decryption apparatus, ciphertext generation program, and ciphertext decryption program
JP2009284231A (en) Key generating apparatus, key generating method, key generating program, and electronic apparatus

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