Howdy. I have a application I'm developing where I need to encrypt the data inside an OGG stream. I will be using a regular block cypher (AES, or others... configurable); and I would like to encrypt the pages in an OGG stream. I'm thinking that if I sit my decrypter in between the reading application and the encrypted file, you should be able to use all the normal seeking operations, etc, on the "encrypted" file as the cleartext stream. But my brain gets a bit stuck on implementation... I'm not quite sure how to "interpose" my library/application that way. I'm using Python for development (I can always backtrack to C++/etc); my application should take an encrypted OGG stream and a key, and you should be able to seek through the file as if it wasn't encrypted. Any pointers? Similar projects? Any help would be appreciated. -- +----+ Shawn Boles +------+/ /( )/| "Chief Engineer" | \/ +----+ + AutoDMC Labs |Cert. | |oooo|/ |Video | +----+ autodmc@autodmclabs.com +------+
On Mon, Apr 17, 2006 at 03:07:30PM -0500, Shawn AutoDMC Boles wrote:> Howdy. > > I have a application I'm developing where I need to encrypt the data > inside an OGG stream. I will be using a regular block cypher (AES, or > others... configurable); and I would like to encrypt the pages in an OGG > stream. > > I'm thinking that if I sit my decrypter in between the reading > application and the encrypted file, you should be able to use all the > normal seeking operations, etc, on the "encrypted" file as the cleartext > stream. > > But my brain gets a bit stuck on implementation... I'm not quite sure > how to "interpose" my library/application that way. > > I'm using Python for development (I can always backtrack to C++/etc); > my application should take an encrypted OGG stream and a key, and you > should be able to seek through the file as if it wasn't encrypted. > > Any pointers? Similar projects? Any help would be appreciated.You'd probably want to encrypt the data in ogg packets, not pages. That way you can still use the existing paging mechanism and existing ogg libraries to find encrypted packets and seek through the data. There's not much in the way of python modules that will help with what you want; I think there is a python wrapper for the low-level libogg, but that's not particularly useful by itself. If you're comfortable with dropping to C I'll suggest you use liboggz, which provides an API for seeking. You can find it and some documentation at http://www.annodex.net/software/liboggz/ btw. I'd also be pretty keen on some python bindings for liboggz ... Conrad.
Shawn "AutoDMC" Boles wrote:> Howdy. > > I have a application I'm developing where I need to encrypt the data > inside an OGG stream. I will be using a regular block cypher (AES, or > others... configurable); and I would like to encrypt the pages in an OGG > stream. > > I'm thinking that if I sit my decrypter in between the reading > application and the encrypted file, you should be able to use all the > normal seeking operations, etc, on the "encrypted" file as the cleartext > stream. > > But my brain gets a bit stuck on implementation... I'm not quite sure > how to "interpose" my library/application that way. > > I'm using Python for development (I can always backtrack to C++/etc); my > application should take an encrypted OGG stream and a key, and you > should be able to seek through the file as if it wasn't encrypted. >Maybe you should use "counter mode" in block cipher thus you don't need to decrypt the file from beginning.> Any pointers? Similar projects? Any help would be appreciated.-- PaulLiu(???) E-mail address:PaulLiu.bbs@bbs.cis.nctu.edu.tw -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 253 bytes Desc: OpenPGP digital signature Url : http://lists.xiph.org/pipermail/ogg-dev/attachments/20060418/4e0a1742/signature.pgp