CN108337561B - Local DRM video stream decryption method based on internal HTTPServer of iOS client - Google Patents
Local DRM video stream decryption method based on internal HTTPServer of iOS client Download PDFInfo
- Publication number
- CN108337561B CN108337561B CN201710045988.7A CN201710045988A CN108337561B CN 108337561 B CN108337561 B CN 108337561B CN 201710045988 A CN201710045988 A CN 201710045988A CN 108337561 B CN108337561 B CN 108337561B
- Authority
- CN
- China
- Prior art keywords
- local
- httpserver
- player
- ios client
- video
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 13
- 230000009191 jumping Effects 0.000 claims description 3
- 238000003672 processing method Methods 0.000 claims description 3
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing 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/4405—Processing 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a local DRM video stream decryption method based on an internal HTTPServer of an iOS client, wherein a video file is firstly encrypted at a server, then the iOS client downloads the encrypted DRM video to the local, then the local and the server negotiate a decryption scheme to decrypt the video, and finally the video is played, if other people acquire the downloaded local DRM video file, the video cannot be directly played, so that the copyright of the video is protected.
Description
Technical Field
The invention relates to the technical field of video playing, in particular to a local DRM video stream decryption method based on an internal HTTPServer of an iOS client.
Background
The iOS terminal builds and starts an internal HTTPServer as a network server of the iOS local player to load and decrypt the DRM video file locally stored by the iOS so as to play the DRM video; in the prior art, the iOS mobile phone directly plays the unencrypted video file after downloading the unencrypted video file locally by an iOS native or third-party player. The prior art has the following disadvantages: the video file can be acquired and played by others, and no protection measures are taken at all.
Disclosure of Invention
The present invention aims to provide a local DRM video stream decryption method based on an iOS client internal http server to solve the problems proposed in the above background art.
In order to achieve the purpose, the invention provides the following technical scheme: a local DRM video stream decryption method based on an internal HTTPServer of an iOS client comprises the following steps:
A. the iOS client wants to play a DRM file, and first loads a corresponding url address of the video by using a player;
B. the player sends a network request to a local HTTPServer of the iOS end;
C. loading the DRM file by the local HTTPServer;
D. the local HTTPServer acquires the encrypted DRM file stream;
E. the local HTTPServer decrypts the DRM file stream;
F. the local HTTPServer sends the decrypted video stream to the player;
G. and the local player plays the decrypted video.
Preferably, the decryption method in step E includes the following steps:
A. the iOS client downloads the encrypted DRM video file from the server side at first;
B. the iOS client starts a local HTTPServer and monitors a certain port number; wherein the port number is self-determined by a developer;
C. the player loads a video url to be played and requests a local HTTPServer server;
D. after receiving the http request sent by the player, the local HTTPServer of the iOS client returns a request result to the iOS client;
E. a local HTTPServer of the iOS client acquires a start parameter according to a Range field of the http request;
F. parsing a header portion of a local DRM video file;
G. the encryption part of the decrypted DRM file, because the encryption fields are all encrypted by DES, decryption keys are stored in the memory of the mobile phone in advance;
H. the local HTTPServer of the iOS client circularly decrypts the encrypted fields by using a decryption key according to the obtained values of the count and the length, and stores the encrypted fields in the memory of the iOS mobile phone;
I. and after the local HTTPServer of the iOS client performs different processing according to the acquired start parameter, the data is transmitted back to the player and played by the player.
Preferably, the processing method that the local http server of the iOS client in step I needs to do according to the start parameter includes the following steps:
A. if the start parameter is equal to 0, the local HTTPServer of the iOS client returns all decrypted data and unencrypted data to the player;
B. if the start parameter is larger than 0 and smaller than the original length of the encrypted part, the local HTTPServer of the iOS client returns the decrypted data and the unencrypted data after the start length value to the player;
C. if the start parameter is larger than the original length of the encrypted part, the file jump position is calculated according to the start parameter, the original length of the encrypted data and the encrypted length, and the data is returned to the player after jumping to the corresponding position of the DRM file.
Compared with the prior art, the invention has the beneficial effects that: in the invention, the video file is firstly encrypted at the server side, then the iOS client side downloads the encrypted DRM video to the local side, then the local side and the server negotiate a decryption scheme to decrypt the video, and finally the video is played, if other people acquire the downloaded local DRM video file, the video cannot be directly played, so that the copyright of the video is protected.
Drawings
FIG. 1 is a flow chart of the present invention;
fig. 2 is a decryption flow chart of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, the present invention provides a technical solution: a local DRM video stream decryption method based on an internal HTTPServer of an iOS client comprises the following steps:
A. the iOS client wants to play a DRM file, and first loads a corresponding url address of the video by using a player;
B. the player sends a network request to a local HTTPServer of the iOS end;
C. loading the DRM file by the local HTTPServer;
D. the local HTTPServer acquires the encrypted DRM file stream;
E. the local HTTPServer decrypts the DRM file stream;
F. the local HTTPServer sends the decrypted video stream to the player;
G. and the local player plays the decrypted video.
In this embodiment, the decryption method in step E includes the following steps:
A. the iOS client downloads the encrypted DRM video file from the server side at first;
B. the iOS client starts a local HTTPServer and monitors a certain port number; wherein the port number is self-determined by a developer;
C. the player loads a video url to be played and requests a local HTTPServer server;
D. after receiving the http request sent by the player, the local HTTPServer of the iOS client returns a request result to the iOS client;
E. a local HTTPServer of the iOS client acquires a start parameter according to a Range field of the http request;
F. parsing a header portion of a local DRM video file;
G. the encryption part of the decrypted DRM file, because the encryption fields are all encrypted by DES, decryption keys are stored in the memory of the mobile phone in advance;
H. the local HTTPServer of the iOS client circularly decrypts the encrypted fields by using a decryption key according to the obtained values of the count and the length, and stores the encrypted fields in the memory of the iOS mobile phone;
I. and after the local HTTPServer of the iOS client performs different processing according to the acquired start parameter, the data is transmitted back to the player and played by the player.
In this embodiment, the processing method that the local HTTPServer of the iOS client in step I needs to do according to the start parameter includes the following steps:
A. if the start parameter is equal to 0, the local HTTPServer of the iOS client returns all decrypted data and unencrypted data to the player;
B. if the start parameter is larger than 0 and smaller than the original length of the encrypted part, the local HTTPServer of the iOS client returns the decrypted data and the unencrypted data after the start length value to the player;
C. if the start parameter is larger than the original length of the encrypted part, the file jump position is calculated according to the start parameter, the original length of the encrypted data and the encrypted length, and the data is returned to the player after jumping to the corresponding position of the DRM file.
In the invention, the video file is firstly encrypted at the server side, then the iOS client side downloads the encrypted DRM video to the local side, then the local side and the server negotiate a decryption scheme to decrypt the video, and finally the video is played, if other people acquire the downloaded local DRM video file, the video cannot be directly played, so that the copyright of the video is protected.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (2)
1. A local DRM video stream decryption method based on an internal HTTPServer of an iOS client is characterized in that: the method comprises the following steps:
A. the iOS client wants to play a DRM file, and first loads a corresponding url address of the video by using a player;
B. the player sends a network request to a local HTTPServer of the iOS end;
C. loading the DRM file by the local HTTPServer;
D. the local HTTPServer acquires the encrypted DRM file stream;
E. the local HTTPServer decrypts the DRM file stream;
F. the local HTTPServer sends the decrypted video stream to the player;
G. the local player plays the decrypted video;
the decryption method in the step E comprises the following steps:
A. the iOS client downloads the encrypted DRM video file from the server side at first;
B. the iOS client starts a local HTTPServer and monitors a certain port number; wherein the port number is self-determined by a developer;
C. the player loads a video url to be played and requests a local HTTPServer server;
D. after receiving the http request sent by the player, the local HTTPServer of the iOS client returns a request result to the iOS client;
E. a local HTTPServer of the iOS client acquires a start parameter according to a Range field of the http request;
F. parsing a header portion of a local DRM video file;
G. the encryption part of the decrypted DRM file, because the encryption fields are all encrypted by DES, decryption keys are stored in the memory of the mobile phone in advance;
H. the local HTTPServer of the iOS client circularly decrypts the encrypted fields by using a decryption key according to the obtained values of the count and the length, and stores the encrypted fields in the memory of the iOS mobile phone;
I. and after the local HTTPServer of the iOS client performs different processing according to the acquired start parameter, the data is transmitted back to the player and played by the player.
2. The local DRM video stream decryption method based on iOS client internal http server as claimed in claim 1, wherein: the processing method that the local HTTPServer of the iOS client needs to do according to the start parameter in the step I comprises the following steps:
A. if the start parameter is equal to 0, the local HTTPServer of the iOS client returns all decrypted data and unencrypted data to the player;
B. if the start parameter is larger than 0 and smaller than the original length of the encrypted part, the local HTTPServer of the iOS client returns the decrypted data and the unencrypted data after the start length value to the player;
C. if the start parameter is larger than the original length of the encrypted part, the file jump position is calculated according to the start parameter, the original length of the encrypted data and the encrypted length, and the data is returned to the player after jumping to the corresponding position of the DRM file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710045988.7A CN108337561B (en) | 2017-01-20 | 2017-01-20 | Local DRM video stream decryption method based on internal HTTPServer of iOS client |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710045988.7A CN108337561B (en) | 2017-01-20 | 2017-01-20 | Local DRM video stream decryption method based on internal HTTPServer of iOS client |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108337561A CN108337561A (en) | 2018-07-27 |
CN108337561B true CN108337561B (en) | 2021-07-30 |
Family
ID=62922343
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710045988.7A Active CN108337561B (en) | 2017-01-20 | 2017-01-20 | Local DRM video stream decryption method based on internal HTTPServer of iOS client |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108337561B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103620609A (en) * | 2011-05-02 | 2014-03-05 | 英赛瑟库尔公司 | Method for playing digital contents protected with a DRM (digital right management) scheme and corresponding system |
CN104104676A (en) * | 2014-07-09 | 2014-10-15 | 福建星网视易信息系统有限公司 | Audio/video playing method and device |
CN106101866A (en) * | 2016-07-14 | 2016-11-09 | 观止云(北京)信息技术有限公司 | A kind of method of HLS Streaming Media DRM |
CN106331751A (en) * | 2016-08-31 | 2017-01-11 | 广州易方信息科技有限公司 | Online encrypted slice video playing method based on iOS operating system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8806193B2 (en) * | 2011-12-22 | 2014-08-12 | Adobe Systems Incorporated | Methods and apparatus for integrating digital rights management (DRM) systems with native HTTP live streaming |
-
2017
- 2017-01-20 CN CN201710045988.7A patent/CN108337561B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103620609A (en) * | 2011-05-02 | 2014-03-05 | 英赛瑟库尔公司 | Method for playing digital contents protected with a DRM (digital right management) scheme and corresponding system |
CN104104676A (en) * | 2014-07-09 | 2014-10-15 | 福建星网视易信息系统有限公司 | Audio/video playing method and device |
CN106101866A (en) * | 2016-07-14 | 2016-11-09 | 观止云(北京)信息技术有限公司 | A kind of method of HLS Streaming Media DRM |
CN106331751A (en) * | 2016-08-31 | 2017-01-11 | 广州易方信息科技有限公司 | Online encrypted slice video playing method based on iOS operating system |
Also Published As
Publication number | Publication date |
---|---|
CN108337561A (en) | 2018-07-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11055429B2 (en) | Key providing method, video playing method, server and client | |
US20200236408A1 (en) | Reducing time to first encrypted frame in a content stream | |
US10079870B2 (en) | System and method for effectively controlling client behavior in adaptive streaming | |
US8813246B2 (en) | Method for playing digital contents protected with a DRM (digital right management) scheme and corresponding system | |
JP5861220B2 (en) | System and method for effective support for short term crypto periods in template mode | |
US9213809B2 (en) | System and method for protecting digital contents with digital rights management (DRM) | |
TWI510066B (en) | Systems and methods for securely streaming media content | |
US9202024B2 (en) | Method for playing digital contents projected with a DRM (digital rights management) scheme and corresponding system | |
US20130144714A1 (en) | Method, Apparatus and System for Supporting Advertisement Contents in HTTP Streaming Play Mode | |
US20140068693A1 (en) | Method, system, or user device for adaptive bandwidth control of proxy multimedia server | |
WO2013152326A1 (en) | System and method for secure asynchronous event notification for adaptive streaming based on iso base media file format | |
CN107707504A (en) | A kind of player method of Streaming Media, system and server and client side | |
CN106303615A (en) | Play the methods, devices and systems of video | |
US20170329986A1 (en) | Method and device for processing multimedia file | |
CN108989886A (en) | A kind of method and system playing encrypted video | |
CN112565656B (en) | Video call method, device, system, electronic equipment and storage medium | |
CN108055356A (en) | A kind of information processing method, server, client and readable storage medium storing program for executing | |
CN108337561B (en) | Local DRM video stream decryption method based on internal HTTPServer of iOS client | |
CN111355980A (en) | Copyright attribution processing method, middleware and system for digital video product | |
US20200275142A1 (en) | A method for delivering digital content to at least one client device | |
CN109714299B (en) | Method for playing encrypted video | |
KR100712921B1 (en) | Mobile communication terminal enable to play content in short time and its operating method | |
JP2007528140A (en) | Multimedia content distribution method via distribution network | |
CN107133497B (en) | Data file server side encryption method and system and user side decryption method and system | |
Swaminathan et al. | Offline protected video playback on heterogeneous platforms |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |