]> git.saurik.com Git - apple/security.git/blob - SecurityTests/cspxutils/cryptTool/README
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / cspxutils / cryptTool / README
1 cryptTool Info
2 last update 4/24/2001
3
4 This directory contains a program, cryptTool, intended to illustrate
5 the use of the CDSA API to perform simple symmetric encryption
6 and decryption. The program consists of one source file, cryptTool.c.
7
8 See the README in the parent directory (CDSA_Examples) for information
9 on building this program.
10
11 The cryptTool program is a command-line utility which does the
12 following:
13
14 create a symmetric key derived from a user-specified password;
15 read a user-specified input file;
16 either encrypt or decrypt that file using a the key generated
17 above and a user-specified encryption algorithm;
18 write the result out to a user-specified output file;
19
20 Several different symmetric encryption algorithms are supported,
21 illustrating the use of both stream and block ciphers.
22
23 Running cryptTool with no command-line arguments gives usage
24 instructions, like so:
25
26 localhost> ./cryptTool
27 usage:
28 ./cryptTool op password keySize inFile outFile [a=algorithm]
29 op:
30 e encrypt
31 d decrypt
32 algorithm:
33 4 RC4 (default if no algorithm specified)
34 c ASC/ComCryption
35 d DES
36 a AES
37
38 All arguments except for the last one are required. A description of the
39 arguments follows.
40
41 op Indicates whether to encrypt (e) or decrypt (d)
42 password A user-specified ASCII string which is used to derive a
43 symmetric key.
44 keySize The key size in bytes. This is variable for stream ciphers
45 and fixed for block ciphers.
46 inFile The name of the file to encrypt or decrypt.
47 outFile The name of the file to which the result of the encrypt or
48 decrypt is written.
49 algorithm An optional algorithm.
50
51 A shell script, runCrypt, is also provided which illustrates the actual
52 usage of cryptTool to encrypt a file and decrypt the result. Run this
53 script with no arguments to show a typical sequence of operations. The
54 runCrypt script and the cryptTool executable must be in the same
55 directory.