Update of /project/crypticl/cvsroot/crypticl/doc In directory common-lisp.net:/tmp/cvs-serv11177
Modified Files: USERGUIDE Log Message: Minor changes.
Date: Sat Oct 1 20:47:21 2005 Author: tskogan
Index: crypticl/doc/USERGUIDE diff -u crypticl/doc/USERGUIDE:1.2 crypticl/doc/USERGUIDE:1.3 --- crypticl/doc/USERGUIDE:1.2 Sun Nov 7 21:23:32 2004 +++ crypticl/doc/USERGUIDE Sat Oct 1 20:47:20 2005 @@ -17,12 +17,9 @@
INTRODUCTION ============ +This user guide focus on examples showing typical tasks. The unit tests for each algorithm is a further source of examples. To test the examples yourself load crypticl and then change into the package with in-package:
-The unit tests for each algorithm is a good source of examples. - -To use the examples, first load Crypticl and then change to the crypticl package with in-package: - -cl-user(2):(load "crypticl-package.lisp") +cl-user(2):(load "C:\crypticl\src\load.lisp") ... cl-user(3): (in-package crypticl) #<The crypticl package> @@ -32,7 +29,6 @@
HASH FUNCTIONS ============== - Create a SHA-1 object:
crypticl(4): (setf obj (new-instance 'SHA1)) @@ -59,10 +55,10 @@ crypticl(14): (hex (hash obj)) "a9993e364706816aba3e25717850c26c9cd0d89d"
- +Implementation note: There is a semantic difference between calling hash on a hash object with no data and calling hash on an empty byte vector. Calling hash on an empty object is more likely to be a user error and hence returns nil. Calling hash on an empty byte vector on the other hand, may simply mean that we got very short input and hence returns the initial state of the SHA-1 algorithm (which is a valid 160 bits byte vector).
-The object oriented interface is built on top of low level function primitives for each algorithm. Sometimes it's easier to work directly with them. To get the SHA1 hash of a stream (typically a file) use sha1-on-octet-stream: +The object oriented interface introduced above is built on top of low level function primitives for each algorithm. Sometimes it's easier to work directly with them. To get the SHA1 hash of a stream (typically a file) use sha1-on-octet-stream:
crypticl(31): (with-open-file (s "rsa.lisp") (hex (sha1-on-octet-stream s))) @@ -72,9 +68,7 @@
SYMMETRIC KEY ENCRYPTION ======================== - -The Cipher class provides common functionality for symmetric and asymmetric -algorithms used for encryption. Subclasses of the Cipher class must support the following methods: +The Cipher class provides common functionality for symmetric and asymmetric algorithms used for encryption. Subclasses of the Cipher class must support the following methods:
init-encrypt: Initializes the Cipher object for encryption. Arguments may include the key and mode to use.
@@ -145,7 +139,7 @@ crypticl(135): (hex (update obj #7(2))) ""
-This call didn't return any cryptotext because update didn't add enough cleartext to fill a whole block of cryptotext. +NOte how this call didn't return any cryptotext because update didn't add enough cleartext to fill a whole block of cryptotext.
crypticl(136): (hex (encrypt obj)) "e32e05ea9f3d9c40c12431c3ef77afbb" @@ -192,7 +186,6 @@
Diffie-Hellman ============== - The following functions illustrates the Diffie-Hellman interface. The result will be list with two secrets which should be equal. Each of the two Diffie-Hellman objects dh1 and dh2 represents the two endpoints in a secure exchange of a common secret.
(defun test-dh ()