473,748 Members | 2,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ANN hashtar 0.1: archival encryption to corruptible media


hashtar is a utility designed for encrypted archiving to media
vulnerable to corruption (eg, CDR, DVDR).

http://nitace.bsd.uchicago.edu:8080/hashtar

Comments, bug reports, suggestions for improvement all welcome.

John Hunter

OVERVIEW

hashtar: an encrypted archive utility designed for secure archiving
to media vulnerable to corruption.

Recursively encrypt the files and directories passed as arguments.
Rather than preserving the directory structure, or archiving to a
single file as in tar, the files are encrypted to a single dir and
named with the hash of their relative path. The file information
(filename, hash, permission mode, uid, gid) is encrypted and stored
in the header of the file itself, and can be used to restore the
original file with dir structure from the archive file.

For example, the command
hashtar.py -cvf tmp.htar finance/
prompts for a password and generates an encrypted recursive archive
of the finance dir in the tmp.htar dir, with filenames mapped like

finance/irs/98/f1040.pdf -> tmp.htar/e5/e5ed546c0bc0191 d80d791bc2f73c8 90
finance/sale_house/notes -> tmp.htar/58/580e89bad7563ae 76c295f75aecea0 30
finance/online/accounts.gz.mcr -> tmp.htar/bb/bbf12f06dc3fcee 04067d40b9781f4 a8
finance/phone/prepaid1242.doc -> tmp.htar/c1/c1fe52a9d8cbef5 5eff8840d379d97 2a

The encrypted files are placed in subdirs based on the first two
characters in their hash name because if too many files are placed
in one dir, it may not be possible to pass all of them as command
line arguments to the restore command. The entire finance dir
structure can later be restored with
hashtar.py -xvf tmp.htar
The advantage of this method of encrypted archiving, as opposed to
archiving to a single tar file and encrypting it, is that this
method is not sensitive to single byte corruption, which becomes
important especially on externally stored archives, such as on CDR,
or DVDR. Any individual file contains all the information needed to
restore itself, with directory structure, permission bits, etc. So
only the specific files that are corrupted on the media will be
lost.

The alternative strategy, encrypting all the files in place and then
archiving to external media, doesn't suffer from single byte
corruption but affords less privacy since the filenames, dir
structure, and permission bits are available, and less security
since a filename may indicate contents and thus expose the archive
to a known plaintext attack.

A match string allows you to only extract files matching a given
pattern. Eg, to only extract pdf and xls files, do
hashtar.py -m pdf,xls -xvf tmp.htar
Because the filenames are stored in the header, only a small portion
of the file needs to be decrypted to determine the match, so this is
quite fast.

Data can be encrypted and decrypted across platforms (tested between
linux and win32 and vice-versa) but of course some information may
be lost, such as uid, gid for platforms that don't support it.

USAGE:
hashtar.py [OPTIONS] files
OPTIONS

-h, --help Show help message and exit
-fDIR, --arcdir=DIR Write hashed filenames to archive dir
-pFILE, --passwdfile=FILE
Get passwd from FILE, otherwise prompt
-mPATTERN, --match=PATTERN
Only extract files that match PATTERN.
PATTERN is a comma separated list of strings,
one of which must match the filename
-u, --unlink Delete files after archiving them
-c, --create Create archive dir
-x, --extract Extract files recursively from archive dir
-v, --verbose Decrypt files recursively

WARNING:

I think this software is suitable to protect your data from your
sister, your boss, and even the nosy computer hacker next door, but
not the NSA.

REQUIREMENTS:

python2.3 - python.org
yawPyCrypto and Flatten - http://yawpycrypto.sourceforge.net/
pycrypto - http://www.amk.ca/python/code/crypto.html

The python dependencies are very easy to install; just do the usual python setup.py install

PLATFORMS:

Tested on linux and win32

AUTHOR:

John D. Hunter <jd******@ace.b sd.uchicago.edu >

LICENSE:

same as python2.3

KNOWN BUGS:

Ignores symbolic links

DEDICATION:

For Erik Curiel, who's life's work I lost when I volunteered to
backup the only copy of his home dir on a CD containing a single
encrypted gzipped tar file, which was subsequently corrupted.

Jul 18 '05 #1
0 1525

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
2067
by: c3poptuse | last post by:
Supercomputer and encryption and compression @ rate of 96% Take a document then or a 3D matrix document change it two random or binary code or just a program for 0's and 1's and fold it over and over like a piece of paper then having the 1 and 0 add each other or the 0,1's canceling each other out 1+0=0 and 0+1=1 1+1=1 0+0=0 if you gave the folds addresses like on a spread sheet there would be no math. First A 1-24 would fold to k 1-24...
1
2946
by: Garmt de Vries | last post by:
For a long time, I've used CSS to style my webpages, but only for media "screen" and "print". Now I've started looking into styling them for other media like "projection" and "handheld". I'd be happy to hear your advice on a couple of practicalities. 1. media="all" required? In the <head> of my pages, I have the following: <link rel="stylesheet" href="style.css" type="text/css"></link>
113
12339
by: Bonj | last post by:
I was in need of an encryption algorithm to the following requirements: 1) Must be capable of encrypting strings to a byte array, and decyrpting back again to the same string 2) Must have the same algorithm work with strings that may or may not be unicode 3) Number of bytes back must either be <= number of _TCHARs in * sizeof(_TCHAR), or the relation between output size and input size can be calculated simply. Has to take into account the...
1
1375
by: Vanga Sasidhar | last post by:
Hi All, I am developing a program in Visual Basic .NET 2002. There are some videos in AVI format. For the protection of these AVI files i encrypted my files with the use of DES algorithm in the system.security.cryptography namespace. My program developed in VB.NET will have all the passwords for these AVI files and my program only can open these files using the same algorithm. I used Windows Media Player control in my application to show...
4
4447
by: subeen | last post by:
Hi, I am trying to parse a rss similar to the one found here (in example) http://www.feedforall.com/mediarss.htm <!-- Snipped for Brevity --> <item> <title>FeedForAll's Show Tunes and Song</title> <link>http://www.feedforall.com/songs.htm</link> <description>FeedForAll cool show tunes and lyrics. </description>
0
2037
by: Konrad | last post by:
Hi everyone. I've got problem with converting xml file to xsd schema. The Xml file looks like: <?xml version="1.0" encoding="iso-8859-2"?> <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title>Song Site</title> <media:title type="plain">TitleOfMedia</media:title> <link>http://www.foo.com</link> <description>Songs galore at different bitrates</description>
0
1587
by: kplazinski | last post by:
Hi everyone. I've got problem with converting xml file to xsd schema. The Xml file looks like: <?xml version="1.0" encoding="iso-8859-2"?> <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title>Song Site</title> <media:title type="plain">TitleOfMedia</media:title> <link>http://www.foo.com</link> <description>Songs galore at different bitrates</description>
0
1584
by: kplazinski | last post by:
Hi everyone. I've got problem with converting xml file to xsd schema. The Xml file looks like: <?xml version="1.0" encoding="iso-8859-2"?> <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title>Song Site</title> <media:title type="plain">TitleOfMedia</media:title> <link>http://www.foo.com</link> <description>Songs galore at different bitrates</description>
1
2536
by: deshaipet | last post by:
As only primary database does archival logging - 1) How should I setup archival logging(LOGARCHMETH1 and LOGARCHMETH2 for Primary and Standby databases in HADR setup ? 2) Should I only use one NFS mount(separate NFS mounts for LOGARCHAMETH1&2) for archival logging which is created on Primary database server and mounted onto standby database server ? 3) Please suggest me any other better options for the HADR setup. Thanks
0
8823
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9530
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9238
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8237
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.