Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Right now I am thinking for a way to create a secure video streaming server with the following assumption:

  • people can be trusted not to distribute the video they have rights to see.

(I think in the first edit of my question I was not able to articulate my thoughts. The thing that people are trusted is not a requirement, but an assumption. And I think that in some cases it is valid. For example: you do not trust people with your credential card and do not want them to know your secret, but you might trust your wife with it). The same way there might be a group of people inside one organization that would like to have some shared videos and they trust each other (they might be wrong, but right now they trust).

and requirements:

  • people have to login with their credentials to see videos
  • different people should have rights to see different videos
  • it should be able to use CDN caching (videos can be pretty big)
  • video should be viewed on different platforms and devices.

The part with login credentials to see videos does not look so hard, the problem arise when you have to stream video to a user. Without somehow encrypting the video there is a potential to MITM attack (and also the chunks can be stored CDN and then freely viewed).

In the beginning I thought that this is also not a problem and the only thing that is needed is to serve the video over https. But then I realized that in such a way it is not possible to utilize CDN caching (although browser caching will still be possible).

Another approach I thought of is to create a private key for each video and to encode the video with this key. If the should have rights to view it he would receive a key to decrypt the video (thus all the users who have rights to view a particular video would have to access the same encrypted video and therefore it can be cached on CDN with no risk). The problem here is that decryption should be performed on the client and the way I can see it is through flash (which not every device support).

I assume that players like google and netflix has already done something like this but was not able to find how they have achieved it. So is it possible to build the system that satisfies the above mentioned criteria and if so - what is the approach?

share|improve this question
    
Flash is irrelevant here. You could pick another technology to do the decryption. –  Rory Alsop Nov 13 '13 at 23:09
    
Requirement 3 is DRM and thus problematic/impossible to do perfectly. The other requirements are standard and solvable with a bit of coding. –  CodesInChaos Nov 14 '13 at 8:52
    
3 is not a requirement. This is an assumption for a system. This is a hypothetical case. –  Salvador Dali Nov 14 '13 at 8:54
    
@CodesInChaos this is exactly what I am looking for. Some technical explanation how they have achieved it. –  Salvador Dali Nov 14 '13 at 9:39
1  
Just to add to that, some videos on You Tube use Abobe Protected Streaming, which is encrypted en.wikipedia.org/wiki/Protected_Streaming –  paj28 Nov 14 '13 at 11:03
show 1 more comment

1 Answer

Updated using your assumption that you will trust your users:

Of your 4 criteria, 2 are easy:

  • people have to login with their credentials to see videos
  • different people should have rights to see different videos

You just encrypt and provide them with the decryption key. If you have a lot of users, key management could be annoying, but this is still an easy problem to solve.

The final two are also relatively straightforward:

  • it should be able to use CDN caching (videos can be pretty big)

So just encrypt chunks and use a streaming mechanism to stream chunks to the user population.

  • video should be viewed on different platforms and devices.

So write your decrypt method in a cross platform language.

All these are standard, solved problems.

Or alternatively, just stream everything over https - and just require that the users log in. After your update, this is going to be your simplest solution - authenticate users; provide them with access to the content they are allowed; deliver it using https: problem solved.

share|improve this answer
    
Thank you for your answer. I think I was not able to articulate my thoughts. The thing that people are trusted is not a requirement, but an assumption. And I think that in some cases it is valid. For example: you do not trust people with your credential card and do not want them to know your secret, but you might trust your wife with it. –  Salvador Dali Nov 14 '13 at 8:57
    
regarding streaming with https - I thought about it and mentioned in the question. But I did not liked it because it will not be able to cache on CDN. Or am I wrong? –  Salvador Dali Nov 14 '13 at 15:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.