CN112040275A - Video encryption and decryption method - Google Patents

Video encryption and decryption method Download PDF

Info

Publication number
CN112040275A
CN112040275A CN202010761451.2A CN202010761451A CN112040275A CN 112040275 A CN112040275 A CN 112040275A CN 202010761451 A CN202010761451 A CN 202010761451A CN 112040275 A CN112040275 A CN 112040275A
Authority
CN
China
Prior art keywords
sub
video
module
modules
decryption
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
CN202010761451.2A
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.)
MOTION MAGIC DIGITAL ENTERTAINMENT Inc
Original Assignee
MOTION MAGIC DIGITAL ENTERTAINMENT Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by MOTION MAGIC DIGITAL ENTERTAINMENT Inc filed Critical MOTION MAGIC DIGITAL ENTERTAINMENT Inc
Priority to CN202010761451.2A priority Critical patent/CN112040275A/en
Publication of CN112040275A publication Critical patent/CN112040275A/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/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, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video stream decryption
    • 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, manipulating MPEG-4 scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving video stream encryption
    • 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, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display

Abstract

The invention relates to a video encryption and decryption method, which comprises the following steps: splitting video data into a plurality of sub-modules, naming the sub-modules respectively, encrypting the name of each sub-module, thereby disordering the front and back sequence of the sub-modules, and inserting characters with set length into each sub-module with an encrypted name to complete video encryption; the decryption method comprises the following steps: decrypting the name of each sub-module, sequencing the sub-modules according to the names, eliminating characters in the process, and sequentially writing the sequenced and character-eliminated sub-modules into an appointed file to finish video decryption. Compared with the prior art, the encryption and decryption process is quick, simple and convenient, short in time consumption and high in safety.

Description

Video encryption and decryption method
Technical Field
The invention relates to the field of videos, in particular to a video encryption and decryption method.
Background
At present, the video encryption scheme has the disadvantages of more complicated encryption process and longer time consumption for encryption and decryption, so that some occasions are not applicable, for example, occasions requiring embedding video files in APP packages and having higher requirements on time consumption for decryption.
Disclosure of Invention
The present invention is directed to a video encryption and decryption method for overcoming the above-mentioned drawbacks of the prior art.
The purpose of the invention can be realized by the following technical scheme:
a method of video encryption, the method comprising the steps of:
step S1: splitting video data into a plurality of sub-modules;
step S2: naming the sub-modules respectively, and encrypting the name of each sub-module;
step S3: and inserting characters with set length into each sub-module with the encryption name to finish video encryption.
The size of the sub-module does not exceed 1M.
The name of each sub-module is encrypted using the MD5 code.
The set length is 1 byte.
The characters inserted by each sub-module are randomly extracted from the sub-module.
Each submodule inserts characters with set length at the appointed position.
The names are numerical numbers ordered according to a specific rule.
A decryption method for the video encryption method, the decryption method comprising the steps of:
step S101: decrypting the name of each sub-module;
step S102: sequencing the sub-modules according to names, and eliminating characters in the process;
step S103: and sequentially writing the plurality of sub-modules which are sequenced and the characters are removed into the appointed file to finish video decryption.
The decrypted video is loaded by the video decoder and the video file is immediately deleted.
Compared with the prior art, the invention has the following advantages:
(1) the video file is split into the sub-modules in the encryption process, so that quick confusion encryption is realized, the video is prevented from being stolen by unpacking by a third party after being packed, and the encryption process is quick, simple and convenient.
(2) After the decryption of the specific client is started, the sub-modules can be dynamically decrypted into a video file which can be played, and the decryption process only needs 0.5s, so that the user experience is not influenced, and meanwhile, the security is high.
(3) After the video decoder of the specific client decodes the video, the video file is immediately deleted, so that the video file is prevented from being stolen or copied in the playing process.
Drawings
FIG. 1 is a flow chart of an encryption method of the present invention;
FIG. 2 is a flowchart of a decryption method of the present invention;
fig. 3 is a schematic diagram of encryption and decryption according to the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the scope of the present invention is not limited to the following embodiments.
Examples
The embodiment provides a video encryption method, which comprises the following steps:
step S1: splitting video data into a plurality of sub-modules;
step S2: naming the sub-modules respectively, and encrypting the name of each sub-module;
step S3: and inserting characters with set length into each sub-module with the encryption name to finish video encryption.
Specifically, the method comprises the following steps:
the size of the sub-module does not exceed 1M, and the length is set to be 1 byte.
The names are numbers sequenced according to specific rules, and the numbering rules can be 1-n conventional numbering schemes, or 1-2 x n-1 or other numbering schemes
The name of each submodule is encrypted by MD5 code, and the name of the submodule can be encrypted by other encryption modes only by recording the numbering and sequencing rule and the encryption mode.
The character inserted by each sub-module is randomly extracted from the sub-module and inserted into a set position.
The decryption method of the video encryption method comprises the following steps:
step S101: decrypting the name of each sub-module;
step S102: sequencing the sub-modules according to names, and eliminating characters in the process;
step S103: and sequentially writing the plurality of sub-modules which are sequenced and the characters are removed into the appointed file to finish video decryption.
The decrypted video is loaded by the video decoder and the video file is immediately deleted.
The using method comprises the following steps:
the encryption program carries out encryption and records the sequence of the names of the sub-modules, the decryption rules of the names of the sub-modules and the characters inserted by each sub-module; the decryption program decrypts according to the sequence of the sub-module names, the decryption rules of the sub-module names and the characters inserted by each sub-module; the decrypted video is loaded by a video decoder.
The encryption and decryption method of the embodiment has the following advantages:
the encrypted video sub-module names are subjected to confusion encryption, and the sub-module names are difficult to restore if the sequence of the sub-module names and the decryption rules of the sub-module names are not clear.
1 byte character is inserted into the specific area of the encrypted sub-modules, so that even if the sub-modules are combined and restored into a video file in sequence, the video file cannot be played normally.
The decryption process is the reverse process of encryption, decryption only needs to read a plurality of sub-modules and combines the sub-modules into a file, and compared with a conventional decryption scheme, the decryption mode is higher in speed.
The time-consuming operation of the encryption and decryption scheme is mainly the time-consuming operation of reading and writing the file, complex encryption and decryption operations are abandoned, and the time-consuming operation of encryption and decryption is greatly reduced. The time consumed for encrypting the 350M video file is about 1.4s, and the time consumed for decrypting the video file is about 0.5 s.

Claims (9)

1. A method for video encryption, the method comprising the steps of:
step S1: splitting video data into a plurality of sub-modules;
step S2: naming the sub-modules respectively, and encrypting the name of each sub-module;
step S3: and inserting characters with set length into each sub-module with the encryption name to finish video encryption.
2. A video encryption method according to claim 1, characterized in that said sub-module size does not exceed 1M.
3. A video encryption method according to claim 1, characterized in that the name of each sub-module is encrypted using MD5 code.
4. A video encryption method according to claim 1, wherein said set length is 1 byte.
5. A video encryption method according to claim 1, in which the characters inserted by each sub-module are randomly extracted from the sub-module.
6. The video encryption method of claim 1, wherein each sub-module inserts a character of a predetermined length at a predetermined position.
7. A video encryption method according to claim 1, characterized in that said names are numerical numbers ordered according to a specific rule.
8. A decryption method for the video encryption method according to any one of claims 1 to 7, characterized in that the decryption method comprises the steps of:
step S101: decrypting the name of each sub-module;
step S102: sequencing the sub-modules according to names, and eliminating characters in the process;
step S103: and sequentially writing the plurality of sub-modules which are sequenced and the characters are removed into the appointed file to finish video decryption.
9. A video decryption method according to claim 8, wherein the decrypted video is loaded by the video decoder and the video file is immediately deleted.
CN202010761451.2A 2020-07-31 2020-07-31 Video encryption and decryption method Pending CN112040275A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010761451.2A CN112040275A (en) 2020-07-31 2020-07-31 Video encryption and decryption method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010761451.2A CN112040275A (en) 2020-07-31 2020-07-31 Video encryption and decryption method

Publications (1)

Publication Number Publication Date
CN112040275A true CN112040275A (en) 2020-12-04

Family

ID=73583825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010761451.2A Pending CN112040275A (en) 2020-07-31 2020-07-31 Video encryption and decryption method

Country Status (1)

Country Link
CN (1) CN112040275A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014965A (en) * 2021-03-03 2021-06-22 成都知了汇智科技有限公司 Video processing method in TF card

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050123136A1 (en) * 2003-12-08 2005-06-09 Daeyang Foundation Motion picture file encryption method and digital rights management method using the same
CN106254895A (en) * 2016-07-21 2016-12-21 重庆科技学院 A kind of for audio frequency and video Mp4 file encryption decryption system
CN107547915A (en) * 2017-10-23 2018-01-05 江苏省公用信息有限公司 A kind of IPTV video contents tamper resistant method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050123136A1 (en) * 2003-12-08 2005-06-09 Daeyang Foundation Motion picture file encryption method and digital rights management method using the same
CN106254895A (en) * 2016-07-21 2016-12-21 重庆科技学院 A kind of for audio frequency and video Mp4 file encryption decryption system
CN107547915A (en) * 2017-10-23 2018-01-05 江苏省公用信息有限公司 A kind of IPTV video contents tamper resistant method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014965A (en) * 2021-03-03 2021-06-22 成都知了汇智科技有限公司 Video processing method in TF card

Similar Documents

Publication Publication Date Title
CN101031923B (en) Method, device and computer program product for activating the right of use of at least one secured content item
WO2017148316A1 (en) File encryption method, file decryption method, electronic device, and storage medium
CN100514471C (en) Method and system of visiting encrypting content on mobile media by device
JP5337411B2 (en) Information concealment method and information concealment device
JP4855272B2 (en) Content duplication apparatus and content duplication method
KR20050035140A (en) Content processing apparatus and content protection program
US20090119514A1 (en) Content data structure and memory card
CN110188555A (en) A kind of hard disk data protection method, system and associated component
CN112040275A (en) Video encryption and decryption method
US20080118060A1 (en) Method of decoding/encoding content file
RU2001128432A (en) Device for processing data and method for processing data
JP2010171920A (en) Key management apparatus and key management method
CN108256343B (en) Encryption method and device and decryption method and device of Shader file
CN108256342B (en) Encryption method and device and decryption method and device of Shader file
JP2002108911A (en) Method and device for retrieving enciphered file and computer readable recording medium
CN112532379A (en) File protection method and device
JP2003078515A (en) Contents distributing system, decoding device, encrypting device, decoding program, and encrypting program
US20100058071A1 (en) System and method for encrypting an electronic file in a mobile electronic device
US20050232414A1 (en) Block encoding method and block encoding/decoding circuit
KR20080112082A (en) Data encryption method and encrypted data reproduction method
CN109922228B (en) Ciphertext preservation method under carrier damage
CN106060604A (en) Method and system for realizing digital rights management play based on BHD file
KR20000055719A (en) Encryption method for digital data file
US7707431B2 (en) Device of applying protection bit codes to encrypt a program for protection
JP2002149497A (en) System and method for protecting privacy information

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
CB02 Change of applicant information

Address after: No.13, Lane 777, Guangzhong West Road, Jing'an District, Shanghai 200072

Applicant after: Shanghai magic Digital Creative Technology Co.,Ltd.

Address before: No.13, Lane 777, Guangzhong West Road, Jing'an District, Shanghai 200072

Applicant before: MOTION MAGIC DIGITAL ENTERTAINMENT Inc.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20201204

RJ01 Rejection of invention patent application after publication