# This file is a work of a US government employee and as such is in the Public domain. # Simson L. Garfinkel, March 12, 2012 AFF Encryption ============= Release 2.4 of AFFLIB implements AFF pass-phrase encryption. Encryption is based on a 256-bit randomly-generated AES key (called the AFF key). This key is itself encrypted with an AFF passphrase and stored in its own segment. This strategy allows an AFF image encryption passphrase to be changed without re-encrypting the entire disk image. AFF PASSPHRASE ENCRYPTION ========================= The AFF passphrase may be specified either as part of the filename or, in some cases, as an optional argument for some of the AFF commands. AFF uses RFC 1630 URI syntax to specify encryption passphrases. Specifically, RFC 1630 allows the file myfile.aff to be specified as a URI: afinfo file:///myfile.aff The passphrase 'mypassphrase' can be added to this URL: afinfo file://:mypassphrase@/myfile.aff If you wish to refer to myfile.aff in the root directory, use this syntax: afinfo file:////myfile.aff Because windows interperts the forward and back slashes in the same manner, this will refer to the file c:\myfile.aff afinfo file:///c:/myfile.aff You can also save the passphrase in an environment variable called AFFPASSPHRASE: setenv AFFLIB_PASSPHRASE "mypassphrase" (csh) export AFFLIB_PASSPHRASE="mypassphrase" (bash) set AFFLIB_PASSPHRASE="mypassphrase" (windows) afinfo myfile.aff You can store the passphrase in a file and specify that file with the AFFLIB_PASSPHRASE_FILE variable. setenv AFFLIB_PASSPHRASE_FILE "/tmp/myfile" echo "mypassphrase" > /tmp/myfile afinfo myfile.aff A passphrase can also be read from a file descriptor by putting the file descriptor number in the environment variable AFFLIB_PASSPHRASE_FD: setenv AFFLIB_PASSPHRASE_FD "5" echo "mypassphrase" > /tmp/myfile afinfo myfile.aff 5