36ea3668b9
Extends the Opencrypto API to allow the destination buffer size to be specified when its not the same size as the input buffer (i.e. for operations like compress and decompress). The crypto_op and crypt_n_op structures gain a u_int dst_len field. The session_op structure gains a comp_alg field to specify a compression algorithm. Moved four ioctls to new ids; CIOCGSESSION, CIOCNGSESSION, CIOCCRYPT, and CIOCNCRYPTM. Added four backward compatible ioctls; OCIOCGSESSION, OCIOCNGSESSION, OCIOCCRYPT, and OCIOCNCRYPTM. Backward compatibility is maintained in ocryptodev.h and ocryptodev.c which implement the original ioctls and set dst_len and comp_alg to 0. Adds user-space access to compression features. Adds software gzip support (CRYPTO_GZIP_COMP). Adds the fast version of crc32 from zlib to libkern. This should be generally useful and provide a place to start normalizing the various crc32 routines in the kernel. The crc32 routine is used in this patch to support GZIP. With input and support from tls@NetBSD.org.
29 lines
912 B
Plaintext
29 lines
912 B
Plaintext
# $NetBSD: files.opencrypto,v 1.20 2009/03/25 01:26:13 darran Exp $
|
|
#
|
|
#
|
|
|
|
# Opencrypto framework.
|
|
# Devices that provide crypto transforms via opencrypto, or subsystems
|
|
# that use the opencrypto framework, should list opencrypto as a dependency
|
|
# to pull in the framework.
|
|
|
|
define opencrypto
|
|
file opencrypto/criov.c opencrypto
|
|
file opencrypto/xform.c opencrypto
|
|
file opencrypto/crypto.c opencrypto
|
|
|
|
# Pseudo-device that provides software implementations of various cryptographic
|
|
# algorithms.
|
|
defpseudo swcrypto: opencrypto,
|
|
blowfish, des, cast128, rijndael, skipjack
|
|
file opencrypto/cryptosoft.c swcrypto
|
|
file opencrypto/deflate.c swcrypto # wrapper around zlib
|
|
|
|
# Pseudo-device for userspace access to opencrypto
|
|
# (and thus crypto hardware accelerators).
|
|
defpseudo crypto: opencrypto
|
|
file opencrypto/cryptodev.c crypto
|
|
file opencrypto/ocryptodev.c crypto
|
|
|
|
defflag opt_ocf.h CRYPTO_DEBUG CRYPTO_TIMING
|