1- \documentclass [b5paper ]{book }
1+ \documentclass [a4paper ]{book }
22\usepackage {hyperref }
33\usepackage {makeidx }
44\usepackage {amssymb }
4747\def\gap {\vspace {0.5ex}}
4848\makeindex
4949\begin {document }
50- \title {A Tiny Crypto Library, \\ LibTomCrypt \\ Version 0.96 }
50+ \title {LibTomCrypt \\ Version 0.97 }
5151\author {Tom St Denis \\
5252\\
5353tomstdenis@iahu.ca \\
54- http://libtomcrypt.org \\ \\
55- Phone: 1-613-836-3160\\
56- 111 Banning Rd \\
57- Kanata, Ontario \\
58- K2L 1C3 \\
59- Canada
54+ http://libtomcrypt.org
6055}
6156\maketitle
6257This text and source code library are both hereby placed in the public domain. This book has been
63- formatted for B5 [176x250] paper using the \LaTeX {} {\em book} macro package.
58+ formatted for A4 paper using the \LaTeX {} {\em book} macro package.
6459
6560\vspace {10cm}
6661
7065
7166Tom St Denis,
7267
73- Ontario, Canada
68+ Phone: 1-613-836-3160
69+
70+ 111 Banning Rd
71+
72+ Kanata, Ontario
73+
74+ K2L 1C3
75+
76+ Canada
7477\end {flushright }
7578\newpage
7679\tableofcontents
@@ -182,15 +185,15 @@ \section{License}
182185library.
183186
184187`` rc2.c'' is based on publicly available code that is not attributed to a person from the given source. `` safer.c''
185- was written by Richard De Moliner (demoliner@isi.ee.ethz.ch) and is public domain .
188+ was written by Richard De Moliner (demoliner@isi.ee.ethz.ch) and seems to be free for use .
186189
187190The project is hereby released as public domain.
188191
189192\section {Patent Disclosure }
190193
191194The author (Tom St Denis) is not a patent lawyer so this section is not to be treated as legal advice. To the best
192195of the authors knowledge the only patent related issues within the library are the RC5 and RC6 symmetric block ciphers.
193- They can be removed from a build by simply commenting out the two appropriate lines in the makefile script . The rest
196+ They can be removed from a build by simply commenting out the two appropriate lines in `` mycrypt \_ custom.h '' . The rest
194197of the ciphers and hashes are patent free or under patents that have since expired.
195198
196199The RC2 and RC4 symmetric ciphers are not under patents but are under trademark regulations. This means you can use
@@ -212,11 +215,11 @@ \section{Building against the library}
212215
213216In the recent versions the build steps have changed. The build options are now stored in `` mycrypt\_ custom.h'' and
214217no longer in the makefile. If you change a build option in that file you must re-build the library from clean to
215- ensure the build is intact. The perl script `` config.pl'' will help setup the custom header and a custom makefile
216- if you want one (the provided `` makefile'' will work with custom configs).
218+ ensure the build is intact.
217219
218220\section {Thanks }
219- I would like to give thanks to the following people (in no particular order) for helping me develop this project:
221+ I would like to give thanks to the following people (in no particular order) for helping me develop this project from
222+ early on:
220223\begin {enumerate }
221224 \item Richard van de Laarschot
222225 \item Richard Heathfield
@@ -233,6 +236,10 @@ \section{Thanks}
233236 \item Christopher Imes
234237\end {enumerate }
235238
239+ There have been quite a few other people as well. Please check the change log to see who else has contributed from
240+ time to time.
241+
242+
236243\chapter {The Application Programming Interface (API) }
237244\section {Introduction }
238245\index {CRYPT\_ ERROR} \index {CRYPT\_ OK}
@@ -581,9 +588,9 @@ \subsection{Notes}
581588\begin {tabular }{|l|l|l|}
582589\hline TWOFISH\_ SMALL & TWOFISH\_ TABLES & Speed and Memory (per key) \\
583590\hline undefined & undefined & Very fast, 4.2KB of ram. \\
584- \hline undefined & defined & As above, faster keysetup, larger code (1KB more) . \\
591+ \hline undefined & defined & Faster keysetup, larger code. \\
585592\hline defined & undefined & Very slow, 0.2KB of ram. \\
586- \hline defined & defined & Somewhat faster , 0.2KB of ram, larger code. \\
593+ \hline defined & defined & Faster , 0.2KB of ram, larger code. \\
587594\hline
588595\end {tabular }
589596\end {center }
@@ -615,7 +622,8 @@ \subsection{Notes}
615622 }
616623
617624 /* generic call to function (assuming the key in key[] was already setup) */
618- if ((err = cipher_descriptor[find_cipher("blowfish")].setup(key, 8, 0, &skey)) != CRYPT_OK) {
625+ if ((err = cipher_descriptor[find_cipher("blowfish")].setup(key, 8, 0, &skey)) !=
626+ CRYPT_OK) {
619627 printf("Error setting up Blowfish: %s\n", error_to_string(err));
620628 return -1;
621629 }
@@ -820,12 +828,13 @@ \subsection{Implementation}
820828 /* somehow fill out key and IV */
821829
822830 /* start up CTR mode */
823- if ((err = ctr_start(find_cipher("twofish"), /* index of desired cipher */
824- IV, /* the initial vector */
825- key, /* the secret key */
826- 16, /* length of secret key (16 bytes, 128 bits) */
827- 0, /* 0 == default # of rounds */
828- &ctr) /* where to store initialized CTR state */
831+ if ((err = ctr_start(
832+ find_cipher("twofish"), /* index of desired cipher */
833+ IV, /* the initial vector */
834+ key, /* the secret key */
835+ 16, /* length of secret key (16 bytes, 128 bits) */
836+ 0, /* 0 == default # of rounds */
837+ &ctr) /* where to store initialized CTR state */
829838 ) != CRYPT_OK) {
830839 printf("ctr_start error: %s\n", error_to_string(err));
831840 return -1;
0 commit comments