source: project/crypt/crypt.html @ 1

Last change on this file since 1 was 1, checked in by azul, 15 years ago

Import everything.

File size: 8.4 KB
Line 
1<html><head><title>crypt</title>
2
3<style type="text/css">
4  <!--
5      CODE {
6             color: #666666;
7           }
8      EM {
9           font-weight: bold;
10           font-style: normal;
11         }
12      DT.function { 
13                    background: #f5f5f5;
14                    color: black;
15                    padding: 0.1em;
16                    border: 1px solid #bbbaaf;
17                    font-family: monospace;
18                  }
19      PRE {
20        background: #efeee0;
21        padding: 0.1em;
22        border: 1px solid #bbbaaf;
23      }
24    -->
25</style></head>
26  <body>
27
28<center><img src="egg.jpg"></center>
29<center><a href="index.html">back</a></center>
30
31<h2>crypt</h2>
32
33<h3>Description:</h3>
34Bindings to <a href="http://www.cs.auckland.ac.nz/~pgut001/cryptlib/">cryptlib</a>.
35
36<h3>Author:</h3>
37Thomas Christian Chust
38
39<h3>Version:</h3>
40<ul>
41<li>1.1
42Replaced use of <code>(end-of-file)</code> with <code>#!eof</code>
43<li>1.0
44</ul>
45
46<h3>Usage:</h3>
47<pre>(require-extension crypt)
48</pre>
49
50<h3>Download:</h3>
51<a href="crypt.scm">crypt.scm</a>
52
53<h3>Documentation:</h3>
54
55
56cryptlib is a high level cryptography library written by Peter Gutmann.
57You can find information and downloads for it at
58<a href="http://www.cs.auckland.ac.nz/~pgut001/cryptlib/">http://www.cs.auckland.ac.nz/~pgut001/cryptlib/</a>
59At the time of writing of this code, the library is available
60under the same license conditions as this code.
61
62<pre>
63The bindings in this package provide the same functionality as the
64functions documented in the original cryptlib documentation, with the
65following exceptions:
66
67-  All constants named CRYPT_xxx_yyy are named CRYPT-xxx-yyy in Scheme
68   code
69
70-  All functions named cryptXxxYyy are named crypt-xxx-yyy in Scheme
71   code
72
73-  None of the bindings returns an error code. Usually the return
74   value is (void). In case of error, an exception of the composite
75   kind (exn crypt) is signalled. It contains the parameters message
76   (with a descriptive message of the error condition) and code (with
77   the cryptlib error code)
78
79-  All crypt-create-xxx functions and other functions creating an
80   object like crypt-import-cert take no output parameter for the
81   created object but rather return the new object.
82
83-  All functions expecting a buffer of data and a size as input
84   arguments (like crypt-set-attribute-string) can take a string or
85   byte-vector as a single input argument in that place or any object
86   and a size as two input arguments.
87
88-  crypt-pop-data, which expects a buffer and a maximum size as an
89   output argument can take either a string or a byte-vector as a
90   single output argument in that place or a maximum size as a single
91   argument in that place or a maximum size and any object. They
92   return the list (buffer bytes-read) where buffer (if it was not
93   given) is a freshly allocated string of maximum size bytes.
94
95A list of all functions behaving slightly differently from the
96cryptlib documentation follows, sorted alphabetically:
97
98-  crypt-async-query returns #t if an asynchronous operation is
99   running, #f otherwise
100
101-  crypt-ca-cert-management gets one parameter less than the normal
102   cryptlib function call, but an additional optional parameter
103   indicates whether the first argument of the cryptlib call should
104   be used (and the retrieved value returned) or not.
105
106-  crypt-ca-get-item returns the result retrieved in the second
107   parameter to the cryptlib call
108
109-  crypt-check-signature-ex returns the result retrieved in the last
110   parameter to the cryptlib call if its optional argument is true
111
112-  crypt-create-cert returns the result retrieved in the first
113   parameter to the cryptlib call
114
115-  crypt-create-context returns the result retrieved in the first
116   parameter to the cryptlib call
117
118-  crypt-create-envelope returns the result retrieved in the first
119   parameter to the cryptlib call
120
121-  crypt-create-session returns the result retrieved in the first
122   parameter to the cryptlib call
123
124-  crypt-create-signature returns the result retrieved in the first
125   two parameters to the cryptlib call as a string
126
127-  crypt-create-signature-ex returns the result retrieved in the first
128   parameter to the cryptlib call as a string
129
130-  crypt-device-create-context returns the result retrieved in the
131   second parameter to the cryptlib call
132
133-  crypt-device-open returns the result retrieved in the first
134   parameter to the cryptlib call
135
136-  crypt-device-query-capability returns the following values
137   * name of the algorithm
138   * block size
139   * minimum key size
140   * standard key size
141   * maximum key size
142
143-  crypt-export-cert returns the result retrieved in the first two
144   parameters to the cryptlib call as a string
145
146-  crypt-export-key returns the result retrieved in the first two
147   parameters to the cryptlib call as a string
148
149-  crypt-export-key-ex returns the result retrieved in the first two
150   parameters to the cryptlib call as a string
151
152-  crypt-get-attribute returns the result retrieved in the last
153   parameter to the cryptlib call
154
155-  crypt-get-attribute-string returns the result retrieved in the
156   last two parameters to the cryptlib call as a string
157
158-  crypt-get-cert-extension returns the data retrieved in the last
159   two parameters to the cryptlib call as a string and the
160   critical flag as a boolean
161
162-  crypt-get-private-key returns the data retrieved in the 3rd
163   parameter to the cryptlib call
164
165-  crypt-get-publib-key returns the data retrieved in the second
166   parameter to the cryptlib call
167
168-  crypt-import-cert returns the data retrieved in the last parameter
169   to the cryptlib call. Also note that the parameters have been
170   reordered (user is the first now) to let the length parameter be
171   optional
172
173-  crypt-keyset-open returns the data retrieved in the first
174   parameter to the cryptlib call.
175
176-  crypt-pop-data returns the buffer and the number of bytes read
177   into it. also note that the sequence (and number) of parameters is
178   different from the original cryptlib version
179
180-  crypt-push-data returns the number of bytes copied from the buffer
181
182-  crypt-query-capability returns the following values
183   * name of the algorithm
184   * block size
185   * minimum key size
186   * standard key size
187   * maximum key size
188
189-  crypt-query-object returns the following values
190   * the object type
191   * the encryption algorithm
192   * the encryption mode
193   * the hash algorithm
194   * the salt for derived keys
195   * the size of the salt
196
197In addition two wrappers for crypt-pop-data and crypt-push-data are
198provided:
199
200-  crypt-input-port is given a cryplib session or envelope object and
201   returns an input port which wraps calls to crypt-pop-data. closing
202   the port does NOT destroy the underlying cryptlib object.
203
204-  crypt-output-port is given a cryptlib session or envelope object
205   and returns an output port which wraps calls to
206   crypt-push-data. closing the port does NOT destroy the underlying
207   cryptlib object.
208</pre>
209
210<h3>License:</h3>
211<pre>
212crypt.scm -- bindings to cryptlib
213Copyright (c) 2004 by Thomas Christian Chust <chust@web.de>.
214All rights reserved.
215
216Redistribution and use in source and binary forms, with or
217without modification, are permitted provided that the following
218conditions are met:
219
220* Redistributions of source code must retain the above copyright
221  notice, this list of conditions and the following disclaimer.
222* Redistributions in binary form must reproduce the above
223  copyright notice, this list of conditions and the following
224  disclaimer in the documentation and/or other materials provided
225  with the distribution.
226* Neither the name of the author nor the names of its
227  contributors may be used to endorse or promote products derived
228  from this software without specific prior written permission.
229
230THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
231CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
232INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
233MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
234DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
235CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
236SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
237LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
238USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
239AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
240LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
241ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
242POSSIBILITY OF SUCH DAMAGE.
243</pre>
244
245<hr><a href="index.html">back</a>
246
247
248</body></html>
Note: See TracBrowser for help on using the repository browser.