Next: , Previous: Top, Up: Top



1 Overview

libencio is a library providing stdio-like interface for reading and writing of encrypted files in MCrypt format. Additionally, through creation of an "index", libencio provices full support for fseek()-like random read access of encrypted data. This allows one to operate on MCrypt-encrypted files as if they were ordinary, cleartext files.

The main motivation for this library was to create code for easy random access of encrypted data for a project I'm working on. This is a preliminary, proof-of-concept release, able to seek/encrypt/decrypt to MCrypt format only and with symmetric encryption algorithms only. The final goal is to implement reading, writing and seeking of data in OpenPGP format, with support for public key algorithms. As it's an open question how much time will I have to continue working on it, I'm putting it out in case someone finds it useful. I will, however, accept patches and bugfixes.

A library like this one can be used to provide MUAs (mail readers) with a layer to transparently handle encrypted attachments, or, more interestingly, as a backend to software such as ffmpeg or mplayer to directly play encrypted files without making temporary, decrypted copies. Another use would be to combine it with tar archives for encrypted backups, like duplicity does. A KDE IO-Slave can also be envisioned.

libencio uses libmcrypt and libmhash libraries for encryption and hashing algorithms, respectively. I've chosen these two mostly for their simple API. In the future, a transition to libgcrypt is likely, due to its wider userbase.