All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.tools.Scar

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----cryptix.tools.Scar

public class Scar
extends Thread
A command line utility to (a) compress, encrypt and asciify files and/or directories (with or without directory recursion), and (b) accomplish the inverse with user-specified option for recreating a source tree directory.

Uses java.zip tools to deflate and inflate data, Cryptix IJCE for the cipher and message digest (used to compute cipher keys from user plain ascii passphrase) algorithms, and a PGP-style Base-64 armour with P. R. Zimmermann 24-bit CRC method (PRZ24 class) for the [de-]asciification.

Hard-wired default values for cipher (Square) and Simple String To Key (S2K) specifier with message digest (RIPEMD-160) algorithms are used. These and other default values can be individually modified for each user by setting the appropriate properties in a scar.properties file placed in the user's home directory.

Current scar properties that the user can alter are:

scar.header
The text that will be enclosed between a pair of ----- to visually indicate the start of an asciified scar. Current default is "BEGIN SCAR ARCHIVE".
scar.comment
A text that will follow the text "Comment: " in a line following scar version information in an asciified scar. Current default is "scar by Cryptix...".
scar.footer
The text that will be enclosed between a pair of ----- to visually indicate the end of an asciified scar. Current default is "END SCAR ARCHIVE."
scar.cipher.algorithm
The name of a symmetric cipher algorithm installed and accessible by the user Java VM. Current default is "Square". Square is a symmetric block cipher algorithm developed by Joan Daemen and Vincent Rijmen .
scar.passphrase
The text to use as the pass-phrase. This pass-phrase will be used as the basis for computing a session key. The algorithms used to generate a session key from the pass-phrase are an implementation of the proposed S2K Simple, Salted, Iterated and Salted-Iterated variations described in the OpenPGP IETF draft document dated November 1997. The current default is "sub rosa."
scar.md.algorithm
The Message Digest algorithm used in the S2K algorithms. "RIPEMD-160" Is the default. RIPEMD-160 is designed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
scar.md.salt
A salt value to use in S2K Salted and Iterated-Salted variants. Current value is "Cryptix Development Team".
scar.md.iterations
A positive integer to use in S2K Iterated and Salted-Iterated variants. Current default value is 7. To do: Note: this is an alpha release of scar. The format of encrypted archives may (and probably will) change incompatibly in future releases..

Copyright © 1997, 1998 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.3 $

Author:
Raif S. Naffah

Variable Index

 o DEBUG

Constructor Index

 o Scar()

Method Index

 o main(String[])
 o processOptions(String[])
Process command line arguments.
 o run()
main action.
 o unzip(ZipInputStream, File)
unzip files and/or directories to a destination.
 o zip(File, ZipOutputStream, int)
Zip files and/or directories to a ZipOutputStream.

Variables

 o DEBUG
 public static boolean DEBUG

Constructors

 o Scar
 public Scar()

Methods

 o main
 public static void main(String args[])
 o processOptions
 public void processOptions(String args[])
Process command line arguments.

 o run
 public void run()
main action.

Overrides:
run in class Thread
 o zip
 public void zip(File source,
                 ZipOutputStream zip,
                 int level) throws FileNotFoundException, IOException
Zip files and/or directories to a ZipOutputStream.

Parameters:
source - source file or directory.
zip - destination zip output stream.
level - depth level in the recursion tree of this method. Used to distinguish top level directory from sub- directories (whether to apply recursion or not).
Throws: IOException
if operation fails
 o unzip
 public void unzip(ZipInputStream zip,
                   File dest) throws FileNotFoundException, IOException
unzip files and/or directories to a destination.

Parameters:
src - source zip stream.
dest - destination File object.
Throws: IOException
if operation fails

All Packages  Class Hierarchy  This Package  Previous  Next  Index