> On Jun 22, 2017, at 11:30 PM, Jens Alfke <j...@mooseyard.com> wrote:
> 
>> On Jun 22, 2017, at 5:18 PM, Carl Hoefs <newsli...@autonomy.caltech.edu 
>> <mailto:newsli...@autonomy.caltech.edu>> wrote:
>> 
>> Is it possible to add encryption to this chain, so the movie file is written 
>> out encrypted? 
> 
> I’ve never seen any crypto stuff in AVFoundation (but it’s been a few years.) 
> You’ll probably need to hook something in to run your own callbacks, and then 
> write callbacks to do the encryption (e.g. using CommonCrypto or 
> SecTransform.)
> 
> (Warning: It’s easy to shoot yourself in the foot using crypto primitives, 
> and end up with something that’s trivially breakable. For example, most block 
> ciphers like AES have the “fun” property that if you ever encrypt two 
> different messages with the same key and initialization vector, the 
> encryption can be broken by XOR’ing the messages.)
> 
> (Also, IIRC many media formats require random access during playback. Making 
> an encrypted file format with random access capabilities turns out to be 
> annoyingly hard; I had to do it a year or so ago.)

Thanks for your insights.  I'm currently recording 1280x720 at 240fps H.264 
video on the iPhone, then encrypting the video file as a post-recording step 
(using AES256 to be HIPAA-compliant).  At this high frame rate, I'm expecting 
that callbacks would not be able to keep up in real time without an 
unacceptably high rate of dropped frames.

Having the encryption integrated within the capture / movie file chain would be 
ideal (perhaps implemented by utilizing the iPhone's GPU to keep up pace), but 
it doesn't sound like iOS supports it at this point.

-Carl

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to