Re: AVCaptureMovieFileOutput + encryption
Re: AVCaptureMovieFileOutput + encryption
- Subject: Re: AVCaptureMovieFileOutput + encryption
- From: Jens Alfke <email@hidden>
- Date: Thu, 22 Jun 2017 23:30:34 -0700
> On Jun 22, 2017, at 5:18 PM, Carl Hoefs <email@hidden>
> 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.)
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden