This document describes version 0.4d1 of Vicare/OpenSSL, a distribution of C and Scheme libraries for Vicare Scheme, an R6RS compliant Scheme implementation; it provides bindings for the OpenSSL C language library.
The package is distributed under the terms of the GNU General Public License (GPL) and can be downloaded from:
development takes place at:
and as backup at:
OpenSSL is available at:
Copyright © 2013, 2017 by Marco Maggi marco.maggi.ipsu@poste.it
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with Invariant Sections being “GNU Free Documentation License” and “GNU General Public License”, no Front–Cover Texts, and no Back–Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.
• overview: | Overview of the package. | |
• version: | OpenSSL version informations. | |
• init: | Global initialisation functions. | |
• hash: | Computing hash checksums. | |
• hmac: | Computing message authentication codes. | |
• crypto: | Low-level cryptographic algorithms. | |
• evp: | High-level cryptographic functions. | |
• buffers: | Simple character arrays structure. | |
Appendices | ||
---|---|---|
• Package License: | GNU General Public License. | |
• Documentation License: | GNU Free Documentation License. | |
• references: | Bibliography and references. | |
Indexes | ||
• concept index: | An entry for each concept. | |
• function index: | An entry for each function. | |
• variable index: | An entry for each variable. | |
• type index: | An entry for each type. |
Vicare Scheme is an R6RS compliant Scheme language implementation in the form of a native compiler for x86 architectures, officially supporting GNU+Linux systems. Vicare/OpenSSL is a distribution of C language and Scheme language libraries for Vicare Scheme; it provides bindings for the OpenSSL C language library.
The last time the author bothered to update this paragraph, he had tested OpenSSL version 1.0.2j. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/).
The package installs a C language library implementing wrapper C functions for the C language
OpenSSL library; on top of this, the Scheme libraries in the hierarchy
(vicare crypto openssl ---)
export bindings for some OpenSSL public
functions; additionally the library (vicare crypto openssl constants)
exports bindings for
some constant values defined in the C language header openssl/ssl.h and others.
Most of the Scheme function names are directly derived from the C function names by replacing upper
case with lower case and underscore characters ‘_’ with dash characters ‘-’; so
SSL_library_init()
becomes ssl-library-init
. In some rare case a dash is inserted to
make the name more readable, for example EVP_DigestInit()
becomes evp-digest-init
.
The following Scheme libraries are installed:
(vicare crypto openssl)
It exports bindings for some OpenSSL core public functions needed for library initialisation.
(vicare crypto openssl evp message-digests)
It exports bindings for some OpenSSL high–level functions implementing the EVP message digests API.
(vicare crypto openssl evp ciphers)
It exports bindings for some OpenSSL high–level functions implementing the EVP ciphers API.
(vicare crypto openssl message-digests)
It exports bindings for some OpenSSL low–level functions implementing message digests.
(vicare crypto openssl hmac)
It exports bindings for some OpenSSL low–level functions implementing HMAC.
(vicare crypto openssl aes)
It exports bindings for some OpenSSL low–level functions implementing the AES cipher.
(vicare crypto openssl unsafe-capi)
It exports syntax bindings for some OpenSSL public functions. These syntaxes expand to a direct call to the C language wrapper functions in the Vicare/OpenSSL library; they are not meant to be called in normal usage of the package.
(vicare crypto openssl constants)
It exports bindings for some constant values defined in the C language header openssl/ssl.h and others.
(vicare crypto openssl features)
It exports one identifier syntax binding for each HAVE_
constant defined by the
configure
script, expanding to #t
or #f
.
Scheme libraries are installed under the directory:
This document contains only a brief description of the functions: refer to the OpenSSL’s documentation for details.
The installed C library follows version numbering as established by the GNU Autotools. For an explanation of interface numbers as managed by GNU Libtool See Libtool’s versioning system in Shared library support for GNU.
The following bindings are exported by the library
(vicare crypto openssl)
.
Return a fixnum representing a version number.
Return a Scheme string representing the version number.
The following bindings are exported by the library (vicare
crypto openssl)
.
Initialise the library; return unspecified values. (*manpages*)SSL_library_init.
Perform some initialisation operations. (*manpages*)OPENSSL_add_all_algorithms_noconf.
Perform some initialisation operations. (*manpages*)OPENSSL_add_all_algorithms_conf.
Perform some initialisation operations. (*manpages*)OpenSSL_add_all_algorithms.
Perform some initialisation operations. (*manpages*)OpenSSL_add_all_ciphers.
Perform some initialisation operations. (*manpages*)OpenSSL_add_all_digests.
Perform some initialisation operations. (*manpages*)SSLeay_add_all_algorithms.
Perform some initialisation operations. (*manpages*)SSLeay_add_all_ciphers.
Perform some initialisation operations. (*manpages*)SSLeay_add_all_digests.
• hash md4: | Computing MD4 hash checksums. | |
• hash md5: | Computing MD5 hash checksums. | |
• hash mdc2: | Computing MDC2 hash checksums. | |
• hash sha1: | Computing SHA1 hash checksums. | |
• hash sha224: | Computing SHA224 hash checksums. | |
• hash sha256: | Computing SHA256 hash checksums. | |
• hash sha384: | Computing SHA384 hash checksums. | |
• hash sha512: | Computing SHA512 hash checksums. | |
• hash ripemd160: | Computing RIPEMD160 hash checksums. | |
• hash whirlpool: | Computing WHIRLPOOL hash checksums. |
The raw API to compute MD4 checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.md4-init))) (assert (ssl.md4-update ctx "ciao")) (ssl.md4-final ctx)) ⇒ #vu8(229 95 235 57 89 152 65 126 80 152 248 176 252 4 127 16) (ssl.md4 "ciao") ⇒ #vu8(229 95 235 57 89 152 65 126 80 152 248 176 252 4 127 16)
• hash md4 struct: | Hash checksum data structures. | |
• hash md4 api: | Context updating functions. | |
• hash md4 direct: | Directly computing hash checksums. |
Next: hash md4 api, Up: hash md4 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type MD4_CTX
; it represents an MD4 hash checksum
context.
When instances of this type are used as arguments to functions: this documentation identifies them as MD4.
There are two categories of md4-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
md4-ctx
instances returned by md4-init
do own the context.
When instances of this category are garbage collected or when
md4-final
is applied to them: the context is closed, all the
associated data is finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of md4-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of md4-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the MD4.
Whenever the MD4 is closed, either explicitly with
md4-final
or implicitly by the garbage collector, func is
applied to MD4 before the internal state of MD4 is
finalised.
Add a new property key with value to the property list of MD4. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
MD4; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of MD4. key must be a symbol.
Return a new association list representing the property list of MD4.
Next: hash md4 direct, Previous: hash md4 struct, Up: hash md4 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Allocate and initialise a new instance of md4-ctx
; if successful
return the struct, else return #f
. (*manpages*)MD4_Init
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. (*manpages*)MD4_Final. It is fine to apply this function multiple times to the
same MD4 argument.
Update the checksum context with the given input data. (*manpages*)MD4_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash md4 api, Up: hash md4 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Perform a one–step checksum computing the checksum of the given input data; return a bytevector holding the result. (*manpages*)MD4.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
The raw API to compute MD5 checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.md5-init))) (assert (ssl.md5-update ctx "ciao")) (ssl.md5-final ctx)) ⇒ #vu8(110 107 196 228 157 212 119 235 201 142 244 4 108 6 123 95) (ssl.md5 "ciao") ⇒ #vu8(110 107 196 228 157 212 119 235 201 142 244 4 108 6 123 95)
• hash md5 struct: | Hash checksum data structures. | |
• hash md5 api: | Context updating functions. | |
• hash md5 direct: | Directly computing hash checksums. |
Next: hash md5 api, Up: hash md5 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type MD5_CTX
; it represents an MD5 hash checksum
context.
When instances of this type are used as arguments to functions: this documentation identifies them as MD5.
There are two categories of md5-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
md5-ctx
instances returned by md5-init
do own the context.
When instances of this category are garbage collected or when
md5-final
is applied to them: the context is closed, all the
associated data is finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of md5-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of md5-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the MD5.
Whenever the MD5 is closed, either explicitly with
md5-final
or implicitly by the garbage collector, func is
applied to MD5 before the internal state of MD5 is
finalised.
Add a new property key with value to the property list of MD5. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
MD5; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of MD5. key must be a symbol.
Return a new association list representing the property list of MD5.
Next: hash md5 direct, Previous: hash md5 struct, Up: hash md5 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Allocate and initialise a new instance of md5-ctx
; if successful
return the struct, else return #f
. (*manpages*)MD5_Init
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. (*manpages*)MD5_Final. It is fine to apply this function multiple times to the
same MD5 argument.
Update the checksum context with the given input data. (*manpages*)MD5_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash md5 api, Up: hash md5 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Perform a one–step checksum computing the checksum of the given input data; return a bytevector holding the result. (*manpages*)MD5.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
The raw API to compute MDC2 checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.mdc2-init))) (assert (ssl.mdc2-update ctx "ciao")) (ssl.mdc2-final ctx)) ⇒ #vu8(7 135 111 85 63 136 98 189 26 91 47 77 36 135 251 237) (ssl.mdc2 "ciao") ⇒ #vu8(7 135 111 85 63 136 98 189 26 91 47 77 36 135 251 237)
• hash mdc2 struct: | Hash checksum data structures. | |
• hash mdc2 api: | Context updating functions. | |
• hash mdc2 direct: | Directly computing hash checksums. |
Next: hash mdc2 api, Up: hash mdc2 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type MDC2_CTX
; it represents an MDC2 hash checksum
context.
When instances of this type are used as arguments to functions: this documentation identifies them as MDC2.
There are two categories of mdc2-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
mdc2-ctx
instances returned by mdc2-init
do own the context.
When instances of this category are garbage collected or when
mdc2-final
is applied to them: the context is closed, all the
associated data is finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of mdc2-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of mdc2-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the MDC2.
Whenever the MDC2 is closed, either explicitly with
mdc2-final
or implicitly by the garbage collector, func is
applied to MDC2 before the internal state of MDC2 is
finalised.
Add a new property key with value to the property list of MDC2. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
MDC2; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of MDC2. key must be a symbol.
Return a new association list representing the property list of MDC2.
Next: hash mdc2 direct, Previous: hash mdc2 struct, Up: hash mdc2 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Allocate and initialise a new instance of mdc2-ctx
; if successful
return the struct, else return #f
. (*manpages*)MDC2_Init
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. (*manpages*)MDC2_Final. It is fine to apply this function multiple times to the
same MDC2 argument.
Update the checksum context with the given input data. (*manpages*)MDC2_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash mdc2 api, Up: hash mdc2 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Perform a one–step checksum computing the checksum of the given input data; return a bytevector holding the result. (*manpages*)MDC2.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Next: hash sha224, Previous: hash mdc2, Up: hash [Contents][Index]
The raw API to compute SHA1 checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.sha1-init))) (assert (ssl.sha1-update ctx "ciao")) (ssl.sha1-final ctx)) ⇒ #vu8(30 78 136 138 198 111 141 212 30 0 197 167 172 54 163 42 153 80 210 113) (ssl.sha1 "ciao") ⇒ #vu8(30 78 136 138 198 111 141 212 30 0 197 167 172 54 163 42 153 80 210 113)
• hash sha1 struct: | Hash checksum data structures. | |
• hash sha1 api: | Context updating functions. | |
• hash sha1 direct: | Directly computing hash checksums. |
Next: hash sha1 api, Up: hash sha1 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type SHA1_CTX
; it represents a SHA1 hash checksum
context.
When instances of this type are used as arguments to functions: this documentation identifies them as SHA1.
There are two categories of sha1-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
sha1-ctx
instances returned by sha1-init
do own the
context. When instances of this category are garbage collected or when
sha1-final
is applied to them: the context is closed, all the
associated data is finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of sha1-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of sha1-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the SHA1.
Whenever the SHA1 is closed, either explicitly with
sha1-final
or implicitly by the garbage collector, func is
applied to SHA1 before the internal state of SHA1 is
finalised.
Add a new property key with value to the property list of SHA1. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
SHA1; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of SHA1. key must be a symbol.
Return a new association list representing the property list of SHA1.
Next: hash sha1 direct, Previous: hash sha1 struct, Up: hash sha1 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Allocate and initialise a new instance of sha1-ctx
; if successful
return the struct, else return #f
. (*manpages*)SHA1_Init
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. (*manpages*)SHA1_Final. It is fine to apply this function multiple times to the
same SHA1 argument.
Update the checksum context with the given input data. (*manpages*)SHA1_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash sha1 api, Up: hash sha1 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Perform a one–step checksum computing the checksum of the given input data; return a bytevector holding the result. (*manpages*)SHA1.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Next: hash sha256, Previous: hash sha1, Up: hash [Contents][Index]
The raw API to compute SHA224 checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.sha224-init))) (assert (ssl.sha224-update ctx "ciao")) (ssl.sha224-final ctx)) ⇒ #vu8(241 177 161 48 51 237 220 63 222 236 192 237 3 189 192 25 194 88 144 186 144 102 88 173 218 217 254 254) (ssl.sha224 "ciao") ⇒ #vu8(241 177 161 48 51 237 220 63 222 236 192 237 3 189 192 25 194 88 144 186 144 102 88 173 218 217 254 254)
• hash sha224 struct: | Hash checksum data structures. | |
• hash sha224 api: | Context updating functions. | |
• hash sha224 direct: | Directly computing hash checksums. |
Next: hash sha224 api, Up: hash sha224 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type SHA224_CTX
; it represents a SHA224 hash checksum
context.
When instances of this type are used as arguments to functions: this documentation identifies them as SHA224.
There are two categories of sha224-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
sha224-ctx
instances returned by sha224-init
do own the
context. When instances of this category are garbage collected or when
sha224-final
is applied to them: the context is closed, all the
associated data is finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of sha224-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of sha224-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the SHA224.
Whenever the SHA224 is closed, either explicitly with
sha224-final
or implicitly by the garbage collector, func is
applied to SHA224 before the internal state of SHA224 is
finalised.
Add a new property key with value to the property list of SHA224. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
SHA224; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of SHA224. key must be a symbol.
Return a new association list representing the property list of SHA224.
Next: hash sha224 direct, Previous: hash sha224 struct, Up: hash sha224 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Allocate and initialise a new instance of sha224-ctx
; if successful
return the struct, else return #f
. (*manpages*)SHA224_Init
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. (*manpages*)SHA224_Final. It is fine to apply this function multiple times to the
same SHA224 argument.
Update the checksum context with the given input data. (*manpages*)SHA224_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash sha224 api, Up: hash sha224 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Perform a one–step checksum computing the checksum of the given input data; return a bytevector holding the result. (*manpages*)SHA224.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Next: hash sha384, Previous: hash sha224, Up: hash [Contents][Index]
The raw API to compute SHA256 checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.sha256-init))) (assert (ssl.sha256-update ctx "ciao")) (ssl.sha256-final ctx)) ⇒ #vu8(177 51 160 192 233 190 227 190 32 22 61 42 211 29 98 72 219 41 42 166 220 177 238 8 122 42 165 14 15 199 90 226) (ssl.sha256 "ciao") ⇒ #vu8(177 51 160 192 233 190 227 190 32 22 61 42 211 29 98 72 219 41 42 166 220 177 238 8 122 42 165 14 15 199 90 226)
• hash sha256 struct: | Hash checksum data structures. | |
• hash sha256 api: | Context updating functions. | |
• hash sha256 direct: | Directly computing hash checksums. |
Next: hash sha256 api, Up: hash sha256 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type SHA256_CTX
; it represents a SHA256 hash checksum
context.
When instances of this type are used as arguments to functions: this documentation identifies them as SHA256.
There are two categories of sha256-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
sha256-ctx
instances returned by sha256-init
do own the
context. When instances of this category are garbage collected or when
sha256-final
is applied to them: the context is closed, all the
associated data is finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of sha256-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of sha256-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the SHA256.
Whenever the SHA256 is closed, either explicitly with
sha256-final
or implicitly by the garbage collector, func is
applied to SHA256 before the internal state of SHA256 is
finalised.
Add a new property key with value to the property list of SHA256. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
SHA256; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of SHA256. key must be a symbol.
Return a new association list representing the property list of SHA256.
Next: hash sha256 direct, Previous: hash sha256 struct, Up: hash sha256 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Allocate and initialise a new instance of sha256-ctx
; if successful
return the struct, else return #f
. (*manpages*)SHA256_Init
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. (*manpages*)SHA256_Final. It is fine to apply this function multiple times to the
same SHA256 argument.
Update the checksum context with the given input data. (*manpages*)SHA256_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash sha256 api, Up: hash sha256 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Perform a one–step checksum computing the checksum of the given input data; return a bytevector holding the result. (*manpages*)SHA256.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Next: hash sha512, Previous: hash sha256, Up: hash [Contents][Index]
The raw API to compute SHA384 checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.sha384-init))) (assert (ssl.sha384-update ctx "ciao")) (ssl.sha384-final ctx)) ⇒ #vu8(110 218 79 204 118 133 171 186 67 69 181 195 13 193 56 133 175 247 53 154 81 209 135 124 124 85 207 48 93 213 47 198 34 188 209 168 24 58 194 231 199 253 193 252 20 195 246 133) (ssl.sha384 "ciao") ⇒ #vu8(110 218 79 204 118 133 171 186 67 69 181 195 13 193 56 133 175 247 53 154 81 209 135 124 124 85 207 48 93 213 47 198 34 188 209 168 24 58 194 231 199 253 193 252 20 195 246 133)
• hash sha384 struct: | Hash checksum data structures. | |
• hash sha384 api: | Context updating functions. | |
• hash sha384 direct: | Directly computing hash checksums. |
Next: hash sha384 api, Up: hash sha384 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type SHA384_CTX
; it represents a SHA384 hash checksum
context.
When instances of this type are used as arguments to functions: this documentation identifies them as SHA384.
There are two categories of sha384-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
sha384-ctx
instances returned by sha384-init
do own the
context. When instances of this category are garbage collected or when
sha384-final
is applied to them: the context is closed, all the
associated data is finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of sha384-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of sha384-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the SHA384.
Whenever the SHA384 is closed, either explicitly with
sha384-final
or implicitly by the garbage collector, func is
applied to SHA384 before the internal state of SHA384 is
finalised.
Add a new property key with value to the property list of SHA384. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
SHA384; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of SHA384. key must be a symbol.
Return a new association list representing the property list of SHA384.
Next: hash sha384 direct, Previous: hash sha384 struct, Up: hash sha384 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Allocate and initialise a new instance of sha384-ctx
; if successful
return the struct, else return #f
. (*manpages*)SHA384_Init
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. (*manpages*)SHA384_Final. It is fine to apply this function multiple times to the
same SHA384 argument.
Update the checksum context with the given input data. (*manpages*)SHA384_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash sha384 api, Up: hash sha384 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Perform a one–step checksum computing the checksum of the given input data; return a bytevector holding the result. (*manpages*)SHA384.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Next: hash ripemd160, Previous: hash sha384, Up: hash [Contents][Index]
The raw API to compute SHA512 checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.sha512-init))) (assert (ssl.sha512-update ctx "ciao")) (ssl.sha512-final ctx)) ⇒ #vu8(160 194 153 183 26 158 89 213 235 176 121 23 231 6 1 163 87 10 161 3 233 154 123 182 90 88 231 128 236 144 119 177 144 45 29 237 179 27 20 87 190 218 89 95 228 215 29 119 155 108 169 202 212 118 38 108 192 117 144 227 29 132 178 6) (ssl.sha512 "ciao") ⇒ #vu8(160 194 153 183 26 158 89 213 235 176 121 23 231 6 1 163 87 10 161 3 233 154 123 182 90 88 231 128 236 144 119 177 144 45 29 237 179 27 20 87 190 218 89 95 228 215 29 119 155 108 169 202 212 118 38 108 192 117 144 227 29 132 178 6)
• hash sha512 struct: | Hash checksum data structures. | |
• hash sha512 api: | Context updating functions. | |
• hash sha512 direct: | Directly computing hash checksums. |
Next: hash sha512 api, Up: hash sha512 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type SHA512_CTX
; it represents a SHA512 hash checksum
context.
When instances of this type are used as arguments to functions: this documentation identifies them as SHA512.
There are two categories of sha512-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
sha512-ctx
instances returned by sha512-init
do own the
context. When instances of this category are garbage collected or when
sha512-final
is applied to them: the context is closed, all the
associated data is finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of sha512-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of sha512-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the SHA512.
Whenever the SHA512 is closed, either explicitly with
sha512-final
or implicitly by the garbage collector, func is
applied to SHA512 before the internal state of SHA512 is
finalised.
Add a new property key with value to the property list of SHA512. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
SHA512; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of SHA512. key must be a symbol.
Return a new association list representing the property list of SHA512.
Next: hash sha512 direct, Previous: hash sha512 struct, Up: hash sha512 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Allocate and initialise a new instance of sha512-ctx
; if successful
return the struct, else return #f
. (*manpages*)SHA512_Init
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. (*manpages*)SHA512_Final. It is fine to apply this function multiple times to the
same SHA512 argument.
Update the checksum context with the given input data. (*manpages*)SHA512_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash sha512 api, Up: hash sha512 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Perform a one–step checksum computing the checksum of the given input data; return a bytevector holding the result. (*manpages*)SHA512.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Next: hash whirlpool, Previous: hash sha512, Up: hash [Contents][Index]
The raw API to compute RIPEMD160 checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.ripemd160-init))) (assert (ssl.ripemd160-update ctx "ciao")) (ssl.ripemd160-final ctx)) ⇒ #vu8(73 78 219 37 115 168 139 92 233 100 122 73 155 77 18 242 144 169 250 190) (ssl.ripemd160 "ciao") ⇒ #vu8(73 78 219 37 115 168 139 92 233 100 122 73 155 77 18 242 144 169 250 190)
• hash ripemd160 struct: | Hash checksum data structures. | |
• hash ripemd160 api: | Context updating functions. | |
• hash ripemd160 direct: | Directly computing hash checksums. |
Next: hash ripemd160 api, Up: hash ripemd160 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type RIPEMD160_CTX
; it represents a RIPEMD160 hash
checksum context.
When instances of this type are used as arguments to functions: this documentation identifies them as RIPEMD160.
There are two categories of ripemd160-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
ripemd160-ctx
instances returned by ripemd160-init
do own
the context. When instances of this category are garbage collected or
when ripemd160-final
is applied to them: the context is closed,
all the associated data is finalised; any error is ignored in this
procedure.
Return #t
if obj is an instance of ripemd160-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of ripemd160-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the RIPEMD160.
Whenever the RIPEMD160 is closed, either explicitly with
ripemd160-final
or implicitly by the garbage collector, func is
applied to RIPEMD160 before the internal state of RIPEMD160 is
finalised.
Add a new property key with value to the property list of RIPEMD160. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
RIPEMD160; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of RIPEMD160. key must be a symbol.
Return a new association list representing the property list of RIPEMD160.
Next: hash ripemd160 direct, Previous: hash ripemd160 struct, Up: hash ripemd160 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Allocate and initialise a new instance of ripemd160-ctx
; if successful
return the struct, else return #f
. (*manpages*)RIPEMD160_Init
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. (*manpages*)RIPEMD160_Final. It is fine to apply this function multiple times to the
same RIPEMD160 argument.
Update the checksum context with the given input data. (*manpages*)RIPEMD160_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash ripemd160 api, Up: hash ripemd160 [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Perform a one–step checksum computing the checksum of the given input data; return a bytevector holding the result. (*manpages*)RIPEMD160.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash ripemd160, Up: hash [Contents][Index]
The raw API to compute WHIRLPOOL checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.whirlpool-init))) (assert (ssl.whirlpool-update ctx "ciao")) (ssl.whirlpool-final ctx)) ⇒ #vu8(152 106 126 88 185 42 0 166 63 74 143 200 89 163 3 73 252 24 173 157 214 90 15 140 193 41 96 233 221 94 42 180 241 235 84 108 60 85 85 110 6 1 84 141 34 68 60 230 208 104 203 49 17 139 135 81 125 206 42 25 173 36 243 237) (ssl.whirlpool "ciao") ⇒ #vu8(152 106 126 88 185 42 0 166 63 74 143 200 89 163 3 73 252 24 173 157 214 90 15 140 193 41 96 233 221 94 42 180 241 235 84 108 60 85 85 110 6 1 84 141 34 68 60 230 208 104 203 49 17 139 135 81 125 206 42 25 173 36 243 237)
• hash whirlpool struct: | Hash checksum data structures. | |
• hash whirlpool api: | Context updating functions. | |
• hash whirlpool direct: | Directly computing hash checksums. |
Next: hash whirlpool api, Up: hash whirlpool [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type WHIRLPOOL_CTX
; it represents a WHIRLPOOL hash
checksum context.
When instances of this type are used as arguments to functions: this documentation identifies them as WHIRLPOOL.
There are two categories of whirlpool-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
whirlpool-ctx
instances returned by whirlpool-init
do own
the context. When instances of this category are garbage collected or
when whirlpool-final
is applied to them: the context is closed,
all the associated data is finalised; any error is ignored in this
procedure.
Return #t
if obj is an instance of whirlpool-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of whirlpool-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the WHIRLPOOL.
Whenever the WHIRLPOOL is closed, either explicitly with
whirlpool-final
or implicitly by the garbage collector, func is
applied to WHIRLPOOL before the internal state of WHIRLPOOL is
finalised.
Add a new property key with value to the property list of WHIRLPOOL. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
WHIRLPOOL; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of WHIRLPOOL. key must be a symbol.
Return a new association list representing the property list of WHIRLPOOL.
Next: hash whirlpool direct, Previous: hash whirlpool struct, Up: hash whirlpool [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Allocate and initialise a new instance of whirlpool-ctx
; if successful
return the struct, else return #f
. (*manpages*)WHIRLPOOL_Init
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. (*manpages*)WHIRLPOOL_Final. It is fine to apply this function multiple times to the
same WHIRLPOOL argument.
Update the checksum context with the given input data. (*manpages*)WHIRLPOOL_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Previous: hash whirlpool api, Up: hash whirlpool [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl message-digests)
.
Perform a one–step checksum computing the checksum of the given input data; return a bytevector holding the result. (*manpages*)WHIRLPOOL.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
The raw API to compute HMAC checksums is used as follows:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl hmac) ssl.) (prefix (vicare crypto openssl message-digests) ssl.)) (ssl.openssl-add-all-digests) (let ((ctx (ssl.hmac-init "key" #f 'md5))) (assert (ssl.hmac-update ctx "ciao" #f)) (ssl.hmac-final ctx)) ⇒ #vu8(104 95 146 126 133 66 104 215 19 225 230 101 126 75 39 188) (let ((ctx (ssl.hmac-init "key" #f (ssl.evp-md5)))) (assert (ssl.hmac-update ctx "ciao" #f)) (ssl.hmac-final ctx)) ⇒ #vu8(104 95 146 126 133 66 104 215 19 225 230 101 126 75 39 188) (ssl.hmac 'md5 "key" #f "ciao" #f) ⇒ #vu8(104 95 146 126 133 66 104 215 19 225 230 101 126 75 39 188)
• hmac struct: | HMAC data structures. | |
• hmac api: | Context updating functions. | |
• hmac direct: | Directly computing HMACs. |
The following bindings are exported by the library (vicare
crypto openssl hmac)
.
An opaque Scheme structure holding a pointer object referencing the C
language type HMAC_CTX
; it represents a HMAC hash checksum
context.
When instances of this type are used as arguments to functions: this documentation identifies them as HMAC.
There are two categories of hmac-ctx
instances: those who own the
underlying checksum context and those who merely reference it.
hmac-ctx
instances returned by hmac-init
do own the
context. When instances of this category are garbage collected or when
hmac-final
is applied to them: the context is closed, all the
associated data is finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of hmac-ctx
; otherwise
return #f
.
Return #t
if obj is an instance of hmac-ctx
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the HMAC.
Whenever the HMAC is closed, either explicitly with
hmac-final
or implicitly by the garbage collector, func is
applied to HMAC before the internal state of HMAC is
finalised.
Add a new property key with value to the property list of HMAC. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
HMAC; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of HMAC. key must be a symbol.
Return a new association list representing the property list of HMAC.
Next: hmac direct, Previous: hmac struct, Up: hmac [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl hmac)
.
Allocate and initialise a new instance of hmac-ctx
; if successful
return the struct, else return #f
. Notice that this Scheme
function performs the work of both HMAC_CTX_init()
and
HMAC_Init()
. (*manpages*)HMAC_Init.
key and key.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
md must be either a symbol among:
md4 md5 mdc2 sha1 sha224 sha256 sha384 sha512 ripemd160 whirlpool dss dss1
or an instance of evp-md
(see Algorithm reference makers)
Finalise a checksum context; if successful return a bytevector holding
the computed checksum, else return #f
. Notice that this Scheme
function performs the work of both HMAC_CTX_cleanup()
and
HMAC_Final()
. (*manpages*)HMAC_Final. It is fine to
apply this function multiple times to the same HMAC argument.
Update the checksum context with the given input data. (*manpages*)HMAC_Update
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
Duplicate an HMAC context from SRC-HMAC to DST-HMAC; if
successful return true, else return #f
. (*manpages*)HMAC_CTX_copy.
Set flags in an HMAC context; return unspecified values. (*manpages*)HMAC_CTX_copy.
The following bindings are exported by the library (vicare
crypto openssl hmac)
.
Perform a one–step HMAC computing; return a bytevector holding the
result, or #f
if an error occurs. (*manpages*)HMAC.
md must be either a symbol among:
md4 md5 mdc2 sha1 sha224 sha256 sha384 sha512 ripemd160 whirlpool dss dss1
or an instance of evp-md
(see Algorithm reference makers)
key and key.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When key is a string: it is converted to a
bytevector with string->utf8
.
input and input.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When input is a string: it is converted to a
bytevector with string->utf8
.
• crypto aes: | The AES algorithm. |
The cryptographic algorithm AES operates on blocks of size 16.
• crypto aes struct: | Context data structure. | |
• crypto aes key: | Selecting the key. | |
• crypto aes crypt: | Encryption and decryption. | |
• crypto aes misc: | Miscellaneous functions and syntaxes. |
Next: crypto aes key, Up: crypto aes [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl aes)
.
An opaque Scheme structure holding a pointer object referencing the C
language type AES_KEY
; it references an AES encryption or
decryption key.
When instances of this type are used as arguments to functions: this documentation identifies them as AES.
There are two categories of aes-key
instances: those who own the
underlying checksum context and those who merely reference it.
aes-key
instances returned by aes-set-encrypt-key
and
aes-set-decrypt-key
do own the context. When instances of this
category are garbage collected: the context is closed, all the
associated data is finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of aes-key
; otherwise
return #f
.
Return #t
if obj is an instance of aes-key
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the AES.
Whenever the AES is closed: func is applied to AES before the internal state of AES is finalised.
Add a new property key with value to the property list of AES. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
AES; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of AES. key must be a symbol.
Return a new association list representing the property list of AES.
Next: crypto aes crypt, Previous: crypto aes struct, Up: crypto aes [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl aes)
.
Build an instance of aes-ctx
initialised with the encryption
key; if successful return the struct, else return #f
.
key and key.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When key is a string: it is converted to a
bytevector with string->ascii
. The key length, measured in
bytes, must be: 16, 24 or 32; corresponding to a
length measured in bits of: 128, 192, 256.
Build an instance of aes-ctx
initialised with the decryption
key; if successful return the struct, else return #f
.
key and key.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When key is a string: it is converted to a
bytevector with string->ascii
. The key length, measured in
bytes, must be: 16, 24 or 32; corresponding to a
length measured in bits of: 128, 192, 256.
Next: crypto aes misc, Previous: crypto aes key, Up: crypto aes [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl aes)
.
Encrypt or decrypt the single data block in and store the result in ou; return unspecified values.
in, in.len and ou, ou.len must represent
generalised C buffers, (vicare-scheme)Introduction to generalised C buffers. Their length must be equal to
AES_BLOCK_SIZE
(16). in and ou can overlap
and also be the same argument.
#!r6rs (import (vicare) (prefix (vicare crypto openssl aes) ssl.) (prefix (vicare crypto openssl constants) ssl.) (define key.en (ssl.aes-set-encrypt-key "0123456789012345")) (define key.de (ssl.aes-set-decrypt-key "0123456789012345")) (define data.in (make-bytevector ssl.AES_BLOCK_SIZE 123)) (define data.en (make-bytevector ssl.AES_BLOCK_SIZE 0)) (define data.de (make-bytevector ssl.AES_BLOCK_SIZE 0)) (ssl.aes-encrypt data.in #f data.en #f key.en) (ssl.aes-decrypt data.en #f data.de #f key.de) data.in ⇒ #vu8(123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123) data.en ⇒ #vu8(204 84 141 21 154 178 104 243 186 57 101 209 29 113 127 2) data.de ⇒ #vu8(123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123)
Encrypt or decrypt the single data block in, using the ECB scheme, and store the result in ou; return unspecified values.
in, in.len and ou, ou.len must represent
generalised C buffers, (vicare-scheme)Introduction to generalised C buffers. Their length must be equal to
AES_BLOCK_SIZE
(16). in and ou can overlap
and also be the same argument.
#!r6rs (import (vicare) (prefix (vicare crypto openssl aes) ssl.) (prefix (vicare crypto openssl constants) ssl.) (define key.en (ssl.aes-set-encrypt-key "0123456789012345")) (define key.de (ssl.aes-set-decrypt-key "0123456789012345")) (define data.in (make-bytevector ssl.AES_BLOCK_SIZE 123)) (define data.en (make-bytevector ssl.AES_BLOCK_SIZE 0)) (define data.de (make-bytevector ssl.AES_BLOCK_SIZE 0)) (ssl.aes-ecb-encrypt data.in #f data.en #f key.en) (ssl.aes-ecb-decrypt data.en #f data.de #f key.de)
Encrypt or decrypt multiple data blocks in, using the CBC scheme, and store the result in ou; return unspecified values.
in, in.len and ou, ou.len must represent
generalised C buffers, (vicare-scheme)Introduction to generalised C buffers. Their length must be an exact
multiple of AES_BLOCK_SIZE
(16). in and ou
can overlap and also be the same argument.
iv and iv.len must represent a generalised C buffer holding
the initialisation vector, (vicare-scheme)Introduction to generalised C buffers. Its length must be equal to
AES_BLOCK_SIZE
.
#!r6rs (import (vicare) (prefix (vicare crypto openssl aes) ssl.) (prefix (vicare crypto openssl constants) ssl.) (define key.en (ssl.aes-set-encrypt-key "0123456789012345")) (define key.de (ssl.aes-set-decrypt-key "0123456789012345")) (define iv (make-bytevector ssl.AES_BLOCK_SIZE 99)) (define data.len (* 5 ssl.AES_BLOCK_SIZE)) (define data.in (make-bytevector data.len 123)) (define data.en (make-bytevector data.len 0)) (define data.de (make-bytevector data.len 0)) (ssl.aes-cbc-encrypt data.in #f data.en #f key.en iv #f) (ssl.aes-cbc-decrypt data.en #f data.de #f key.de iv #f)
Previous: crypto aes crypt, Up: crypto aes [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl aes)
.
If successful return a string representing some kind of options,
otherwise raise an &error
condition.
Return #t
if obj is a fixnum equal to the AES block size;
otherwise return #f
.
Return #t
if obj is a fixnum equal to an exact multiple of
the AES block size; otherwise return #f
.
Return #t
if obj is a fixnum representing a valid AES key
length; valid values are: 16, 24, 32. Otherwise
return #f
.
• evp md algo: | Message digest algorithms. | |
• evp md ctx: | Message digest generation. | |
• evp cipher algo: | Cipher algorithms. | |
• evp cipher ctx: | Encryption and decription contexts. | |
• evp symbols: | Constants to symbols. |
Next: evp md ctx, Up: evp [Contents][Index]
• evp md algo struct: | Algorithm data structure. | |
• evp md algo makers: | Algorithm reference makers. | |
• evp md algo inspect: | Algorithm inspection. | |
• evp md algo step: | Single-step message digest. |
Next: evp md algo makers, Up: evp md algo [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type EVP_MD
; it represents a message digest algorithm.
When instances of this type are used as arguments to functions: this documentation identifies them as EVP-MD.
evp-md
instances are just references to algorithm
implementations, they do not have associated dynamic data; their
finalisation can be left to the garbage collector.
Return #t
if obj is an instance of evp-md
; otherwise
return #f
.
Next: evp md algo inspect, Previous: evp md algo struct, Up: evp md algo [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp message-digests)
.
Return a struct of type evp-md
representing a null message digest
algorithm. The generated message digest has zero length.
(*manpages*)EVP_md_null.
Return a struct of type evp-md
representing the MD2 message
digest algorithm. (*manpages*)EVP_md2.
Return a struct of type evp-md
representing the MD4 message
digest algorithm. (*manpages*)EVP_md4.
Return a struct of type evp-md
representing the MD5 message
digest algorithm. (*manpages*)EVP_md5.
Return a struct of type evp-md
representing the SHA message
digest algorithm. (*manpages*)EVP_sha.
Return a struct of type evp-md
representing the SHA1 message
digest algorithm. (*manpages*)EVP_sha1.
Return a struct of type evp-md
representing the DSS message
digest algorithm. (*manpages*)EVP_dss.
Return a struct of type evp-md
representing the DSS1 message
digest algorithm. (*manpages*)EVP_dss1.
Return a struct of type evp-md
representing the ECDSA message
digest algorithm. (*manpages*)EVP_ecdsa.
Return a struct of type evp-md
representing the SHA224 message
digest algorithm. (*manpages*)EVP_sha224.
Return a struct of type evp-md
representing the SHA256 message
digest algorithm. (*manpages*)EVP_sha256.
Return a struct of type evp-md
representing the SHA384 message
digest algorithm. (*manpages*)EVP_sha384.
Return a struct of type evp-md
representing the SHA512 message
digest algorithm. (*manpages*)EVP_sha512.
Return a struct of type evp-md
representing the MDC2 message
digest algorithm. (*manpages*)EVP_mdc2.
Return a struct of type evp-md
representing the RIPEMD160 message
digest algorithm. (*manpages*)EVP_ripemd160.
Return a struct of type evp-md
representing the WHIRLPOOL message
digest algorithm. (*manpages*)EVP_whirlpool.
If successful return a struct of type evp-md
representing the
specified message digest algorithm; otherwise return #f
.
(*manpages*)EVP_get_digestbyname.
str must represent a generalised C string holding an ASCIIZ
string, (vicare-scheme)Introduction to generalised C strings. When str is a string: it is converted to
a bytevector with string->ascii
.
Examples of valid names: ‘MD5’, ‘SHA1’, ‘SHA224’, ‘SHA256’, ‘SHA384’, ‘SHA512’.
Next: evp md algo step, Previous: evp md algo makers, Up: evp md algo [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp message-digests)
.
Return a string representing the name of the message digest algorithm. (*manpages*)EVP_MD_name.
Return an exact integer representing the message digest size produced by
the algorithm specfied by the EVP_MD
structure referenced by the
pointer object EVP-MD-PTR. (*manpages*)EVP_MD_size.
Return an exact integer representing the block size produced by the
algorithm specfied by the EVP_MD
structure referenced by the
pointer object EVP-MD-PTR. (*manpages*)EVP_MD_block_size.
Return an exact integer representing the NID of the OBJECT IDENTIFIER representing the given message digest algorithm. (*manpages*)EVP_MD_type.
Return an exact integer representing the flags associated to the given message digest algorithm. (*manpages*)EVP_MD_flags.
Return an exact integer representing the pkey type (whatever it is) of the given message digest algorithm. (*manpages*)EVP_MD_pkey_type.
Previous: evp md algo inspect, Up: evp md algo [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp message-digests)
.
Compute a message digest in a single step; if successful return a
bytevector representing the digest, otherwise return #f
.
(*manpages*)EVP_Digest.
str and str.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When str is a string: it is converted to a
bytevector with string->utf8
.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp message-digests) ssl.)) (ssl.openssl-add-all-digests) (ssl.evp-digest "ciao" #f (ssl.evp-md5)) ⇒ #vu8(110 107 196 228 157 212 119 235 201 142 244 4 108 6 123 95) (ssl.evp-digest "ciao" (ssl.evp-md-null)) ⇒ #vu8()
Next: evp cipher algo, Previous: evp md algo, Up: evp [Contents][Index]
• evp md ctx examples: | Some message digest usage examples. | |
• evp md ctx struct: | Context data structures. | |
• evp md ctx create: | Context creation and destruction. | |
• evp md ctx init: | Context initialisation and finalisation. | |
• evp md ctx update: | Processing input data. | |
• evp md ctx inspect: | Context inspection. | |
• evp md ctx flags: | Context flags. |
Next: evp md ctx struct, Up: evp md ctx [Contents][Index]
Here is an example of MD5 checksum computation, notice that the destruction of the context data structure is left to the garbage collector:
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp message-digests) ssl.)) (ssl.openssl-add-all-digests) (define ctx (ssl.evp-md-ctx-create)) (ssl.evp-digest-init ctx 'md5) (ssl.evp-digest-update ctx "ciao" #f) (ssl.evp-digest-final ctx) ⇒ #vu8(110 107 196 228 157 212 119 235 201 142 244 4 108 6 123 95)
Next: evp md ctx create, Previous: evp md ctx examples, Up: evp md ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp message-digests)
.
An opaque Scheme structure holding a pointer object referencing the C
language type EVP_MD_CTX
; it references a message digest context.
When instances of this type are used as arguments to functions: this documentation identifies them as EVP-MD-CTX.
There are two categories of evp-md-ctx
instances: those who own
the underlying checksum context and those who merely reference it.
evp-md-ctx
instances returned by evp-md-ctx-create
do own
the context. When instances of this category are garbage collected: the
context is closed, all the associated data is finalised; any error is
ignored in this procedure.
Return #t
if obj is an instance of evp-md-ctx
;
otherwise return #f
.
Return #t
if obj is an instance of evp-md-ctx
and the
context it represents is open; otherwise return #f
.
Return #t
if obj is an instance of evp-md-ctx
and the
context it represents is open and initialised with
evp-digest-init
; otherwise return #f
.
Return #t
if obj is an instance of evp-md-ctx
and the
context it represents is open but not yet initialised with
evp-digest-init
; otherwise return #f
.
Retrieve or set a destructor function associated to the EVP-MD-CTX.
Whenever the EVP-MD-CTX is closed: func is applied to EVP-MD-CTX before the internal state of EVP-MD-CTX is finalised.
Add a new property key with value to the property list of EVP-MD-CTX. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
EVP-MD-CTX; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of EVP-MD-CTX. key must be a symbol.
Return a new association list representing the property list of EVP-MD-CTX.
Next: evp md ctx init, Previous: evp md ctx struct, Up: evp md ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp message-digests)
.
Build a new struct of type evp-md-ctx
; if successful return the
data struct, otherwise return #f
. Returned data structures are
not yet initialised with a message digest algorithm.
(*manpages*)EVP_MD_CTX_create.
Finalise a struct of type evp-md-ctx
, releasing all the
associated resources; return unspecified values. It is fine to apply
this function multiple times to the same instance of EVP-MD-CTX.
(*manpages*)EVP_MD_CTX_destroy.
Next: evp md ctx update, Previous: evp md ctx create, Up: evp md ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp message-digests)
.
Initialise an already built message digest context to produce a hash
checksum of type md; if successful return #t
, else return
#f
. (*manpages*)EVP_DigestInit_ex.
md must be an instance of evp-md
or a symbol among:
md4 md5 mdc2 sha1 sha224 sha256 sha384 sha512 ripemd160 whirlpool dss dss1
It is an error to apply this function to an already initialised EVP-MD-CTX.
Finalise the generation of a message digest checksum; if succesful
return a bytevector representing the sum, otherwise return #f
.
(*manpages*)EVP_DigestFinal_ex.
It is an error to apply this function to a non–initialised EVP-MD-CTX.
Copy a message digest state from SRC-EVP-MD to DST-EVP-MD;
if successful return #t
, otherwise return #f
.
(import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp message-digests) ssl.)) (ssl.openssl-add-all-digests) (define src (ssl.evp-md-ctx-create)) (ssl.evp-digest-init src 'md5) (ssl.evp-digest-update src "ciao") (define dst (ssl.evp-md-ctx-create)) (ssl.evp-md-ctx-copy dst src) (ssl.evp-digest-final dst) ⇒ #vu8(110 107 196 228 157 212 119 235 201 142 244 4 108 6 123 95)
Next: evp md ctx inspect, Previous: evp md ctx init, Up: evp md ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp message-digests)
.
Update a message digest context with input data; if successful return
#t
, otherwise return #f
. (*manpages*)EVP_DigestUpdate.
str and str.len must represent a generalised C string,
(vicare-scheme)Introduction to generalised C strings. When str is a string: it is converted to a
bytevector with string->utf8
.
It is an error to apply this function to a non–initialised EVP-MD-CTX.
Next: evp md ctx flags, Previous: evp md ctx update, Up: evp md ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp message-digests)
.
Return an exact integer representing the message digest size produced by EVP-MD-CTX. (*manpages*)EVP_MD_CTX_size.
Return an exact integer representing the block size produced by EVP-MD-CTX. (*manpages*)EVP_MD_CTX_block_size.
Return an exact integer representing the NID of the OBJECT IDENTIFIER representing the given message digest context. (*manpages*)EVP_MD_CTX_type.
If successful return an instance of evp-md
representing the
algorithm with which the context was initialised; otherwise return
#f
. (*manpages*)EVP_MD_CTX_md.
Previous: evp md ctx inspect, Up: evp md ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp message-digests)
.
Set the flags for a message digest context. (*manpages*)EVP_MD_CTX_set_flags. Return unspecified values.
flags must be an exact integer in the range of the C language type
signed int
.
Clear the flags for a message digest context. (*manpages*)EVP_MD_CTX_clear_flags. Return unspecified values.
flags must be an exact integer in the range of the C language type
signed int
.
Test the flags for a message digest context. (*manpages*)EVP_MD_CTX_test_flags. Return an exact integer.
flags must be an exact integer in the range of the C language type
signed int
.
Next: evp cipher ctx, Previous: evp md ctx, Up: evp [Contents][Index]
• evp cipher algo struct: | Cipher algorithms data structures. | |
• evp cipher algo makers: | Algorithm reference makers. | |
• evp cipher algo inspect: | Algorithm inspection. |
Next: evp cipher algo makers, Up: evp cipher algo [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
An opaque Scheme structure holding a pointer object referencing the C
language type EVP_CIPHER
; it describes an encryption and
decryption algorithm.
When instances of this type are used as arguments to functions: this documentation identifies them as EVP-CIPHER.
evp-cipher
instances are just references to algorithm
implementations, they do not have associted dynamic data; their
finalisation can be left to the garbage collector.
Return #t
if obj is an instance of evp-cipher
;
otherwise return #f
.
Next: evp cipher algo inspect, Previous: evp cipher algo struct, Up: evp cipher algo [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Notice that bf
stands for Blowfish.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
; if successful
return the struct, otherwise return #f
.
Build a new struct instance of type evp-cipher
selecting the
algorithm by its name; if successful return the struct, otherwise return
#f
. (*manpages*)EVP_get_cipherbyname.
name must represent a generalised C string, (vicare-scheme)Introduction to generalised C strings. When
str is a string: it is converted to a bytevector with
string->ascii
.
Build a new struct instance of type evp-cipher
selecting the
algorithm by its NID; if successful return the struct, otherwise return
#f
. (*manpages*)EVP_get_cipherbynid.
nid must be an exact integer, in the range of the C language type
signed int
, representing the NID of a cipher algorithm. NID
values can be extracted by an evp-cipher
struct using
evp-cipher-nid
.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-algorithms) (ssl.evp-get-cipherbynid 109) ⇒ #[evp-cipher ...]
Previous: evp cipher algo makers, Up: evp cipher algo [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Return a string representing the name of the cipher algorithm.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-algorithms) (ssl.evp-cipher-name (ssl.evp-enc-null)) ⇒ "UNDEF" (ssl.evp-cipher-name (ssl.evp-des-ecb)) ⇒ "DES-ECB" (ssl.evp-cipher-name (ssl.evp-rc4)) ⇒ "RC4" (ssl.evp-cipher-name (ssl.evp-rc2-ecb)) ⇒ "RC2-ECB" (ssl.evp-cipher-name (ssl.evp-cast5-ecb)) ⇒ "CAST5-ECB" (ssl.evp-cipher-name (ssl.evp-camellia-128-ecb)) ⇒ "CAMELLIA-128-ECB"
Return an exact integer, in the range of the C language type
signed int
, representing the NID of the cipher algorithm.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-algorithms) (ssl.evp-cipher-nid (ssl.evp-cast5-ecb)) ⇒ 109
Return an exact integer, in the range of the C language type
signed int
, representing the type of the cipher algorithm.
Return an exact integer, in the range of the C language type
signed int
, representing the block size of the cipher algorithm.
For stream algorithms: the block size is 1.
Return an exact integer, in the range of the C language type
signed int
, representing the key length of the cipher algorithm.
Return an exact integer, in the range of the C language type
signed int
, representing the initialisation vector of the cipher
algorithm. If the algorithm makes no use of initialisation vectors: the
returned value is 0.
Return an exact integer, in the range of the C language type
signed int
, representing the mode of the cipher algorithm. The
returned value is one of the EVP_CIPH_*_MODE
constants.
Return an exact integer, in the range of the C language type
signed int
, representing the flags of the cipher algorithm.
Next: evp symbols, Previous: evp cipher algo, Up: evp [Contents][Index]
• evp cipher ctx examples: | Encryption and decryption examples. | |
• evp cipher ctx struct: | Cipher context data structures. | |
• evp cipher ctx create: | Context creation and destruction. | |
• evp cipher ctx encrypt: | Encrypting data. | |
• evp cipher ctx decrypt: | Decrypting data. | |
• evp cipher ctx cipher: | Encrypting or decrypting data. | |
• evp cipher ctx inspect: | Context inspection. | |
• evp cipher ctx config: | Context configuration. | |
• evp cipher ctx flags: | Context flags. | |
• evp cipher ctx misc: | Miscellaneous functions. | |
• evp cipher ctx step: | Single-step encryption and decryption. |
Next: evp cipher ctx struct, Up: evp cipher ctx [Contents][Index]
Here is an example of how to organise encryption and decryption by reading from and writing to Scheme binary ports:
#!vicare (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) (define (make-chunked-bytevector-input-port bv) (let ((port (open-bytevector-input-port bv))) (values port (lambda () (get-bytevector-n port 4096))))) (define (make-chunked-bytevector-output-port) (receive (port getter) (open-bytevector-output-port) (values port getter (lambda (data) (put-bytevector port data))))) (define algo (ssl.evp-rc4)) (define key ;;A random key. (make-bytevector (ssl.evp-cipher-key-length algo))) (define iv '#vu8()) (define (encrypt input output) (define ctx (ssl.evp-cipher-ctx-new)) (ssl.evp-encrypt-init ctx algo key #f iv #f) (let loop ((in.data (input))) (if (eof-object? in.data) (cond ((ssl.evp-decrypt-final ctx) => output) (else (error #f "error finalising encryption"))) (let* ((ou.len (ssl.evp-minimum-output-length ctx in.data #f)) (ou.data (make-bytevector ou.len))) (cond ((ssl.evp-decrypt-update ctx ou.data #f in.data #f) => (lambda (ou.len) (output (subbytevector-u8 ou.data 0 ou.len)) (loop (input)))) (else (error #f "error encrypting data"))))))) (define (decrypt input output) (define ctx (ssl.evp-cipher-ctx-new)) (ssl.evp-decrypt-init ctx algo key #f iv #f) (let loop ((in.data (input))) (if (eof-object? in.data) (cond ((ssl.evp-decrypt-final ctx) => output) (else (error #f "error finalising decryption"))) (let* ((ou.len (ssl.evp-minimum-output-length ctx in.data #f)) (ou.data (make-bytevector ou.len))) (cond ((ssl.evp-decrypt-update ctx ou.data #f in.data #f) => (lambda (ou.len) (output (subbytevector-u8 ou.data 0 ou.len)) (loop (input)))) (else (error #f "error decrypting data"))))))) (define clear-text (make-bytevector 123456)) (define-values (clear-port clear-reader) (make-chunked-bytevector-input-port clear-text)) (define-values (encrypted-port encrypted-getter encrypted-writer) (make-chunked-bytevector-output-port)) (encrypt clear-reader encrypted-writer) (let ((encrypted-text (encrypted-getter))) (define-values (encrypted-port encrypted-reader) (make-chunked-bytevector-input-port encrypted-text)) (define-values (decrypted-port decrypted-getter decrypted-writer) (make-chunked-bytevector-output-port)) (decrypt encrypted-reader decrypted-writer) (bytevector=? clear-text (decrypted-getter))))
And here is the same using the generic cipher API:
#!vicare (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.) (prefix (vicare crypto openssl constants) ssl.)) (ssl.openssl-add-all-ciphers) (define (make-chunked-bytevector-input-port bv) (let ((port (open-bytevector-input-port bv))) (values port (lambda () (get-bytevector-n port 4096))))) (define (make-chunked-bytevector-output-port) (receive (port getter) (open-bytevector-output-port) (values port getter (lambda (data) (put-bytevector port data))))) (define algo (ssl.evp-rc4)) (define key ;;A random key. (make-bytevector (ssl.evp-cipher-key-length algo))) (define (cipher ctx input output) (let loop ((in.data (input))) (if (eof-object? in.data) (cond ((ssl.evp-decrypt-final ctx) => output) (else (error #f "error finalising cipher"))) (let* ((ou.len (ssl.evp-minimum-output-length ctx in.data #f)) (ou.data (make-bytevector ou.len))) (cond ((ssl.evp-decrypt-update ctx ou.data #f in.data #f) => (lambda (ou.len) (output (subbytevector-u8 ou.data 0 ou.len)) (loop (input)))) (else (error #f "error enciphering data"))))))) (define clear-text (make-bytevector 123456)) (define-values (clear-port clear-reader) (make-chunked-bytevector-input-port clear-text)) (define-values (encrypted-port encrypted-getter encrypted-writer) (make-chunked-bytevector-output-port)) (let ((ctx (ssl.evp-cipher-ctx-new))) (ssl.evp-cipher-init ctx algo key #f '#vu8() #f ssl.EVP_CIPHER_ENCRYPT) (cipher ctx clear-reader encrypted-writer)) (let ((encrypted-text (encrypted-getter))) (define-values (encrypted-port encrypted-reader) (make-chunked-bytevector-input-port encrypted-text)) (define-values (ciphered-port ciphered-getter ciphered-writer) (make-chunked-bytevector-output-port)) (let ((ctx (ssl.evp-cipher-ctx-new))) (ssl.evp-cipher-init ctx algo key #f '#vu8() #f ssl.EVP_CIPHER_DECRYPT) (cipher ctx encrypted-reader ciphered-writer)) (bytevector=? clear-text (ciphered-getter)))
Next: evp cipher ctx create, Previous: evp cipher ctx examples, Up: evp cipher ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
An opaque Scheme structure holding a pointer object referencing the C
language type EVP_CIPHER_CTX
; it describes an encryption or
decryption context.
When instances of this type are used as arguments to functions: this documentation identifies them as EVP-CIPHER-CTX.
There are two categories of evp-cipher-ctx
instances: those who
own the underlying checksum context and those who merely reference it.
evp-cipher-ctx
instances returned by evp-cipher-ctx-new
do
own the context. When instances of this category are garbage collected
or evp-cipher-ctx-free
is applied to them: the context is closed,
all the associated data is finalised; any error is ignored in this
procedure.
Return #t
if obj is an instance of evp-cipher-ctx
;
otherwise return #f
.
Return #t
if obj is an instance of evp-cipher-ctx
and
the context it represents is open; otherwise return #f
.
Return #t
if obj is an instance of evp-cipher-ctx
and
the context it represents is open and initialised with
evp-encrypt-init
or similar functions; otherwise return #f
.
Return #t
if obj is an instance of evp-cipher-ctx
and
the context it represents is open but not yet initialised with
evp-encrypt-init
or similar functions; otherwise return #f
.
Retrieve or set a destructor function associated to the EVP-CIPHER-CTX.
Whenever the EVP-CIPHER-CTX is closed: func is applied to EVP-CIPHER-CTX before the internal state of EVP-CIPHER-CTX is finalised.
Add a new property key with value to the property list of EVP-CIPHER-CTX. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
EVP-CIPHER-CTX; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of EVP-CIPHER-CTX. key must be a symbol.
Return a new association list representing the property list of EVP-CIPHER-CTX.
Next: evp cipher ctx encrypt, Previous: evp cipher ctx struct, Up: evp cipher ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Build a new instance of evp-cipher-ctx
; if successful return the
struct instance, else return #f
. Returned data structures are not
yet initialised with a cipher algorithm. (*manpages*)EVP_CIPHER_CTX_new.
Finalise a cipher context and release all the associated resources; return unspecified values. (*manpages*)EVP_CIPHER_CTX_free.
It is fine to apply this function multiple times to the same argument: the first time the context is finalised, subsequent times nothing happens.
Next: evp cipher ctx decrypt, Previous: evp cipher ctx create, Up: evp cipher ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Initialise an already built cipher context to encrypt data with the
algorithm selected by EVP-CIPHER; if successful return #t
,
else return #f
. (*manpages*)EVP_EncryptInit_ex.
key and key.len must represent a generalised C string
holding the encryption key, (vicare-scheme)Introduction to generalised C strings. When key is a string:
it is converted to a bytevector with string->utf8
.
iv and iv.len must represent a generalised C string holding
the initialisation vector, (vicare-scheme)Introduction to generalised C strings; the initialisation vector
cannot be NULL
even when the algorithm does not need it, so in those
case we must use ‘#vu8()’ as vector. When iv is a string: it
is converted to a bytevector with string->utf8
.
Finalise an encryption context; if successful return a bytevector
holding the last output data, else return #f
.
(*manpages*)EVP_EncryptFinal_ex.
Update an encryption context with clear text input data and produce
encrypted output data; if successful return the actual number of bytes
in the output, else return #f
. (*manpages*)EVP_EncryptUpdate.
in and in.len must represent a generalised C string holding
the clear text input data, (vicare-scheme)Introduction to generalised C strings. When in is a string:
it is converted to a bytevector with string->utf8
.
ou and ou.len must represent a generalised C buffer holding empty room for the encrypted output data, (vicare-scheme)Introduction to generalised C buffers. The length of the output buffer is the maximum number of output bytes that can be accepted; such length must be:
(greatest-fixnum)
.
INT_MAX
defined by the underlying
platform.
The minimum output length can be computed with
evp-minimum-output-length
.
Next: evp cipher ctx cipher, Previous: evp cipher ctx encrypt, Up: evp cipher ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Initialise an already built cipher context to decrypt data with the
algorithm selected by EVP-CIPHER; if successful return #t
,
else return #f
. (*manpages*)EVP_DecryptInit_ex.
key and key.len must represent a generalised C string
holding the decryption key, (vicare-scheme)Introduction to generalised C strings. When key is a string:
it is converted to a bytevector with string->utf8
.
iv and iv.len must represent a generalised C string holding
the initialisation vector, (vicare-scheme)Introduction to generalised C strings; the initialisation vector
cannot be NULL
even when the algorithm does not need it, so in those
case we must use ‘#vu8()’ as vector. When iv is a string: it
is converted to a bytevector with string->utf8
.
Finalise a decryption context; if successful return a bytevector holding
the last output data, else return #f
.
(*manpages*)EVP_DecryptFinal_ex.
Update a decryption context with encrypted text input data and produce
decrypted output data; if successful return the actual number of bytes
in the output, else return #f
. (*manpages*)EVP_DecryptUpdate.
in and in.len must represent a generalised C buffer holding the encrypted input data, (vicare-scheme)Introduction to generalised C buffers.
ou and ou.len must represent a generalised C buffer holding empty room for the decrypted output data, (vicare-scheme)Introduction to generalised C buffers. The length of the output buffer is the maximum number of output bytes that can be accepted; such length must be:
(greatest-fixnum)
.
INT_MAX
defined by the underlying
platform.
The minimum output length can be computed with
evp-minimum-output-length
.
Next: evp cipher ctx inspect, Previous: evp cipher ctx decrypt, Up: evp cipher ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Initialise an already built cipher context to encrypt or decrypt data
with the algorithm selected by EVP-CIPHER; if successful return
#t
, else return #f
. (*manpages*)EVP_CipherInit_ex.
key and key.len must represent a generalised C string
holding the encryption key, (vicare-scheme)Introduction to generalised C strings. When key is a string:
it is converted to a bytevector with string->utf8
.
iv and iv.len must represent a generalised C string holding
the initialisation vector, (vicare-scheme)Introduction to generalised C strings; the initialisation vector
cannot be NULL
even when the algorithm does not need it, so in those
case we must use ‘#vu8()’ as vector. When iv is a string: it
is converted to a bytevector with string->utf8
.
enc must be a fixnum: 1 for encryption, 0 for
decryption, -1 to leave unchanged a previously set value. The
library (vicare crypto openssl constants)
defines the constants:
EVP_CIPHER_ENCRYPT
, EVP_CIPHER_DECRYPT
,
EVP_CIPHER_DEFAULT
.
Finalise an encryption or decryption context; if successful return a
bytevector holding the last output data, else return #f
.
(*manpages*)EVP_CipherFinal_ex.
Update an encryption or decryption context with input data and produce
output data; if successful return the actual number of bytes in the
output, else return #f
. (*manpages*)EVP_CipherUpdate.
The arguments in and in.len must represent a generalised C
string holding the input data, (vicare-scheme)Introduction to generalised C strings. When in is a
string: it is converted to a bytevector with string->utf8
.
The arguments ou and ou.len must represent a generalised C buffer holding empty room for the output data, (vicare-scheme)Introduction to generalised C buffers. The length of the output buffer is the maximum number of output bytes that can be accepted; such length must be:
(greatest-fixnum)
.
INT_MAX
defined by the underlying
platform.
The minimum output length can be computed with
evp-minimum-output-length
.
Next: evp cipher ctx config, Previous: evp cipher ctx cipher, Up: evp cipher ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Retrieve the cipher algorithm used by the given context; if successful
return an instance of evp-cipher
, otherwise return #f
.
(*manpages*)EVP_CIPHER_CTX_cipher.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) (let* ((algo (ssl.evp-rc4)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv '#vu8())) (ssl.evp-encrypt-init ctx algo key #f iv #f) (let ((algo (ssl.evp-cipher-ctx-cipher ctx))) (and algo (ssl.evp-cipher-name algo)))) ⇒ "RC4"
Return an exact integer representing the NID of the cipher algorithm. (*manpages*)EVP_CIPHER_CTX_nid.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) (ssl.evp-cipher-nid (ssl.evp-cast5-ecb)) ⇒ 109
Return an exact integer representing the type of the cipher algorithm. (*manpages*)EVP_CIPHER_CTX_type.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) (let* ((algo (ssl.evp-cast5-ecb)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-type ctx)) ⇒ 0
Return an exact integer representing the block size of the cipher algorithm. (*manpages*)EVP_CIPHER_CTX_block_size.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) (let* ((algo (ssl.evp-cast5-ecb)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-block-size ctx)) ⇒ 8
Return an exact integer representing the key length of the cipher algorithm. (*manpages*)EVP_CIPHER_CTX_key_length.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) (let* ((algo (ssl.evp-cast5-ecb)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-key-length ctx)) ⇒ 16
Return an exact integer representing the initialisation vector length of the cipher algorithm. (*manpages*)EVP_CIPHER_CTX_iv_length.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) ;; ECB mode has no IV (let* ((algo (ssl.evp-cast5-ecb)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-iv-length ctx)) ⇒ 9 (let* ((algo (ssl.evp-cast5-cbc)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-iv-length ctx)) ⇒ 8
Return an exact integer representing the mode of the cipher algorithm,
one of the EVP_CIPH_*_MODE
constants.
(*manpages*)EVP_CIPHER_CTX_mode.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) (let* ((algo (ssl.evp-cast5-ecb)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-mode ctx)) ⇒ ssl.EVP_CIPH_ECB_MODE
Next: evp cipher ctx flags, Previous: evp cipher ctx inspect, Up: evp cipher ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Set the key length to use among the supported values; if successful
return #t
, otherwise return #f
. (*manpages*)EVP_CIPHER_CTX_set_key_length.
key.len must be an exact integer representing the key length.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) (let* ((algo (ssl.evp-cast5-ecb)) (ctx (ssl.evp-cipher-ctx-new)) (len (ssl.evp-cipher-key-length algo)) (key (make-bytevector len)) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-set-key-length ctx len)) ⇒ #t
Enable or disable padding; if successful return #t
, otherwise
return #f
. (*manpages*)EVP_CIPHER_CTX_set_padding.
If pad? is true: padding is enabled. If pad? is #f
:
padding is disabled.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) ;; disable (let* ((algo (ssl.evp-cast5-ecb)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-set-padding ctx #f)) ⇒ #t ;; enable (let* ((algo (ssl.evp-cast5-ecb)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-set-padding ctx 'fuck-yes)) ⇒ #t
Set or retrieve some context parameters. (*manpages*)EVP_CIPHER_CTX_set_key_ctrl.
When the argument arg is not used, type must be one of the following:
EVP_CTRL_GET_RC5_ROUNDS
Return an exact integer representing the number of rounds for the RC5 algorithm.
EVP_CTRL_GET_RC2_KEY_BITS
Return an exact integer representing the number of key bits for the RC2 algorithm.
When the argument arg is used, type must be one of the following:
EVP_CTRL_SET_RC5_ROUNDS
Set to arg the number of rounds for the RC5 algorithm; if
successful return #t
, else return #f
.
EVP_CTRL_SET_RC2_KEY_BITS
Set to arg the number of key bits for the RC2 algorithm; if
successful return #t
, else return #f
.
#!r6rs (import (vicare) (prefix (vicare crypto openssl) ssl.) (prefix (vicare crypto openssl evp ciphers) ssl.)) (ssl.openssl-add-all-ciphers) ;; get RC2 key bits (let* ((algo (ssl.evp-rc2-ecb)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-ctrl ctx ssl.EVP_CTRL_GET_RC2_KEY_BITS)) ⇒ 128 ;; set RC2 key bits (let* ((algo (ssl.evp-rc2-ecb)) (ctx (ssl.evp-cipher-ctx-new)) (key (make-bytevector (ssl.evp-cipher-key-length algo))) (iv (make-bytevector (ssl.evp-cipher-block-size algo)))) (ssl.evp-encrypt-init ctx algo key #f iv #f) (ssl.evp-cipher-ctx-ctrl ctx ssl.EVP_CTRL_SET_RC2_KEY_BITS 128)) ⇒ #t
Set a key for the cipher algorithm; if successful return #t
,
otherwise return #f
. (*manpages*)EVP_CIPHER_CTX_rand_key.
key must be a generalised C string holding an ASCIIZ string,
(vicare-scheme)Introduction to generalised C strings. When key is a string: it is converted to a
bytevector with string->utf8
.
Next: evp cipher ctx misc, Previous: evp cipher ctx config, Up: evp cipher ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Return an exact integer representing the context’s flags. (*manpages*)EVP_CIPHER_CTX_flags.
Set a context’s flags; return unspecified values. (*manpages*)EVP_CIPHER_CTX_set_flags.
Clear a context’s flags; return unspecified values. (*manpages*)EVP_CIPHER_CTX_clear_flags.
Tests a context’s flags; return an exact integer. (*manpages*)EVP_CIPHER_CTX_test_flags.
Next: evp cipher ctx step, Previous: evp cipher ctx flags, Up: evp cipher ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Compute a number of octets that will certainly be enough to hold the
result of encrypting or decrypting the given argument; if successful
return an exact integer representing the number of bytes, else return
#f
. (*manpages*)EVP_CIPHER_CTX_get_app_data.
in and in.len must represent a generalised C string holding
the clear text input data or the encrypted input data, (vicare-scheme)Introduction to generalised C strings.
When in is a string: it is converted to a bytevector with
string->utf8
.
Copy the context from EVP-CIPHER-CTX-SRC to
EVP-CIPHER-CTX-DST, which must be already initialised; if
successful return #t
, otherwise return #f
.
(*manpages*)EVP_CIPHER_CTX_copy.
Return #f
or a pointer previously registered as application data
associated to the given context. (*manpages*)EVP_CIPHER_CTX_get_app_data.
Register a pointer as application data associated to the given context. (*manpages*)EVP_CIPHER_CTX_set_app_data.
data must be a pointer object or #f
; when data is
#f
: the NULL
pointer is registered.
not implemented.
Not implemented.
Previous: evp cipher ctx misc, Up: evp cipher ctx [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Encrypt or decrypt input data and produce output data; if successful it
should return the actual number of bytes in the output, else return
#f
. (*manpages*)EVP_Cipher.
NOTE This is a low level function not documented by OpenSSL; we should use it only if we know what we are doing. For some cipher algorithms the return value is not the number of actual output bytes.
EVP-CIPHER-CTX must be a context already initialised for encryption or decryption.
The arguments in and in.len must represent a generalised C
string holding the input data, (vicare-scheme)Introduction to generalised C strings. When in is a
string: it is converted to a bytevector with string->utf8
.
The arguments ou and ou.len must represent a generalised C buffer holding empty room for the output data, (vicare-scheme)Introduction to generalised C buffers. The length of the output buffer is the maximum number of output bytes that can be accepted; such length must be:
(greatest-fixnum)
.
INT_MAX
defined by the underlying
platform.
The minimum output length can be computed with
evp-minimum-output-length
.
Previous: evp cipher ctx, Up: evp [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl evp ciphers)
.
Given a constant among EVP_CIPH_*_MODE
return a symbol
representing its public name.
Next: Package License, Previous: evp, Up: Top [Contents][Index]
• buffers structs: | Memory buffer data structures. | |
• buffers api: | Memory buffer programming interface. |
Next: buffers api, Up: buffers [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl buffers)
.
An opaque Scheme structure holding a pointer object referencing the C
language type BUF_MEM
; it describes a simple array of octets.
When instances of this type are used as arguments to functions: this documentation identifies them as BUF.
There are two categories of buf-mem
instances: those who own the
underlying structure and those who merely reference it.
buf-mem
instances returned by buf-mem-new
do own the
context. When instances of this category are garbage collected or
buf-mem-free
is applied to them: all the associated data is
finalised; any error is ignored in this procedure.
Return #t
if obj is an instance of buf-mem
; otherwise
return #f
.
Return #t
if obj is an instance of buf-mem
and the
context it represents is open; otherwise return #f
.
Retrieve or set a destructor function associated to the BUF.
Whenever the BUF is released: func is applied to BUF before the internal state of BUF is finalised.
Add a new property key with value to the property list of BUF. If key is already set: the old entry is mutated to reference value. key must be a symbol.
Return the value of the property key in the property list of
BUF; if key is not set return #f
. key must be a
symbol.
Remove the property key from the property list of BUF. key must be a symbol.
Return a new association list representing the property list of BUF.
Previous: buffers structs, Up: buffers [Contents][Index]
The following bindings are exported by the library (vicare
crypto openssl buffers)
.
If successful return a new instance of buf-mem
, else return
#f
. (*manpages*)BUF_MEM_new.
Finalise BUF releasing all the associated resources; return unspecified values. (*manpages*)BUF_MEM_free.
It is fine to apply this function multiple times to the same argument: the first time the context is finalised, subsequent times nothing happens.
Change the size of the buffer to len, which must be an exact
integer in the range of the C language type signed int
. If
successful return #t
, otherwise return #f
. (*manpages*)BUF_MEM_grow.
Change the size of the buffer to len, which must be an exact
integer in the range of the C language type signed int
; reset the
octets to zero. If successful return #t
, otherwise return
#f
. (*manpages*)BUF_MEM_grow_clean.
Next: Documentation License, Previous: buffers, Up: Top [Contents][Index]
Copyright © 2007 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program—to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers’ and authors’ protection, the GPL clearly explains that there is no warranty for this free software. For both users’ and authors’ sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based on the Program.
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work’s System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work’s users, your or third parties’ legal rights to forbid circumvention of technological measures.
You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor’s “contributor version”.
A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient’s use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
one line to give the program's name and a brief idea of what it does. Copyright (C) year name of author This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
program Copyright (C) year name of author This program comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’. This is free software, and you are welcome to redistribute it under certain conditions; type ‘show c’ for details.
The hypothetical commands ‘show w’ and ‘show c’ should show the appropriate parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see http://www.gnu.org/licenses/.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read http://www.gnu.org/philosophy/why-not-lgpl.html.
Next: references, Previous: Package License, Up: Top [Contents][Index]
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The purpose of this License is to make a manual, textbook, or other functional and useful document free in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.
This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.
We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.
This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.
A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.
A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.
The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.
The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.
A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”.
Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.
The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text.
The “publisher” means any person or entity that distributes copies of the Document to the public.
A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition.
The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.
You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and you may publicly display copies.
If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.
You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:
If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles.
You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties—for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.
You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements.”
You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.
A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.
Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.
If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.
You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it.
The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Document.
“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site.
“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.
“Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document.
An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.
To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:
Copyright (C) year your name. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''.
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with…Texts.” line with this:
with the Invariant Sections being list their titles, with the Front-Cover Texts being list, and with the Back-Cover Texts being list.
If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.
If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.
Next: concept index, Previous: Documentation License, Up: Top [Contents][Index]
The documentation of Vicare/OpenSSL is available online:
the latest version of this package can be downloaded from:
development takes place at:
and as backup at:
the home page of the Vicare project is at:
OpenSSL can be found here:
Next: function index, Previous: references, Up: Top [Contents][Index]
Jump to: | (
A B E F H L M P R S W |
---|
Jump to: | (
A B E F H L M P R S W |
---|
Next: variable index, Previous: concept index, Up: Top [Contents][Index]
Jump to: | A B E H M O R S V W |
---|
Jump to: | A B E H M O R S V W |
---|
Next: type index, Previous: function index, Up: Top [Contents][Index]
Previous: variable index, Up: Top [Contents][Index]
Jump to: | A B E H M R S W |
---|
Jump to: | A B E H M R S W |
---|