aegis_storage.h File Reference

Protected storage. More...

Go to the source code of this file.

Namespaces

namespace  aegis

Classes

class  aegis::p_file
 A single file in a protected store. More...
class  aegis::storage
 A secure file container. More...

Defines

#define foff_t   uint64_t
 A macro to encapsulate off_t.
#define O_RECOVER   010000000
 An additional open mode flag for p_open.

Typedefs

typedef std::map< std::string,
metadata_t > 
aegis::contents_map_t

Functions

const char * aegis::storage_root ()
 The storage directory.
bool aegis::set_alternative_storage_root (const char *to_this)
 Set alternative encrypted storage directory.


Detailed Description

Protected storage.

This library provides functions for protecting files against unauthorized reading by encryption and off-line tampering by signing. Files are grouped into stores, each store is collection of files with common security attributes.

Signed stores are just lists of filenames and hashes. The files exist where they are, but their integrity can be controlled by the functions provided by the classes. Globally signed stores can be created and populated at build time by using external PKI signing (to be added).

Encrypted stores implement a private storage area, where the contents of the files are stored in an encrypted form. The files do not necessarily exist with the filenames they are referred to in this API. An encrypted store hence implements a small virtual filesystem. Encrypted stores cannot be created at build time but they must be created by the calling applications. Hence, encrypted stores are always initially empty.

Each encrypted store uses an own key, which is generated from random data when the store is created. The secrets are protected by the BB5-backed functions in aegis_crypto.h.


Define Documentation

#define foff_t   uint64_t

A macro to encapsulate off_t.

The size of the off_t type defined in sys/stat.h varies depending on how _FILE_OFFSET_BITS is defined. But in this library it must always be 64 bits, so this macro is used to make sure that it is right even if the client would not have `pkg-config --cflags aegis-crypto` as a compiler switch.

#define O_RECOVER   010000000

An additional open mode flag for p_open.

Allow opening an encrypted file even if it fails integrity check and restore the store integrity with the new content.


Generated on Sat Jun 30 13:17:15 2012 for Aegis Crypto by  doxygen 1.5.6