opnsense-src/sys/opencrypto
Conrad Meyer 1b0909d51a OpenCrypto: Convert sessions to opaque handles instead of integers
Track session objects in the framework, and pass handles between the
framework (OCF), consumers, and drivers.  Avoid redundancy and complexity in
individual drivers by allocating session memory in the framework and
providing it to drivers in ::newsession().

Session handles are no longer integers with information encoded in various
high bits.  Use of the CRYPTO_SESID2FOO() macros should be replaced with the
appropriate crypto_ses2foo() function on the opaque session handle.

Convert OCF drivers (in particular, cryptosoft, as well as myriad others) to
the opaque handle interface.  Discard existing session tracking as much as
possible (quick pass).  There may be additional code ripe for deletion.

Convert OCF consumers (ipsec, geom_eli, krb5, cryptodev) to handle-style
interface.  The conversion is largely mechnical.

The change is documented in crypto.9.

Inspired by
https://lists.freebsd.org/pipermail/freebsd-arch/2018-January/018835.html .

No objection from:	ae (ipsec portion)
Reported by:	jhb
2018-07-18 00:56:25 +00:00
..
_cryptodev.h OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
cast.c sys/opencrypto: minor spelling fixes. 2016-05-06 23:37:19 +00:00
cast.h
castsb.h
criov.c Use const with some read-only buffers in opencrypto APIs. 2017-05-09 18:28:42 +00:00
crypto.c OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
cryptodeflate.c Use the correct number of arguments for the 2015-05-25 01:31:39 +00:00
cryptodev.c OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
cryptodev.h OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
cryptodev_if.m OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
cryptosoft.c OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
cryptosoft.h
deflate.h Move zlib.c from net to libkern. 2015-04-22 14:38:58 +00:00
gfmult.c sys/opencrypto: minor spelling fixes. 2016-05-06 23:37:19 +00:00
gfmult.h Add some new modes to OpenCrypto. These modes are AES-ICM (can be used 2014-12-12 19:56:36 +00:00
gmac.c Add some new modes to OpenCrypto. These modes are AES-ICM (can be used 2014-12-12 19:56:36 +00:00
gmac.h add the define to properly guard this header.. 2015-04-07 09:00:03 +00:00
rmd160.c
rmd160.h
skipjack.c
skipjack.h Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform.h Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_aes_icm.c opencrypto AES-ICM: Fix heap corruption typo 2016-08-01 22:57:03 +00:00
xform_aes_xts.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_auth.h OCF: Add plain hash modes 2018-07-09 07:28:13 +00:00
xform_blf.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_cast5.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_cml.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_comp.h Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_deflate.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_des1.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_des3.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_enc.h opencrypto: Integrate Chacha20 algorithm into OCF 2018-03-29 04:02:50 +00:00
xform_gmac.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_md5.c Remove "HMAC" from <HASH>_HMAC_BLOCK_LEN macro names 2018-07-09 07:21:37 +00:00
xform_null.c opencrypto: Use C99 initializers for auth_hash instances 2017-09-26 17:52:52 +00:00
xform_rijndael.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_rmd160.c Remove "HMAC" from <HASH>_HMAC_BLOCK_LEN macro names 2018-07-09 07:21:37 +00:00
xform_sha1.c OCF: Add plain hash modes 2018-07-09 07:28:13 +00:00
xform_sha2.c OCF: Add plain hash modes 2018-07-09 07:28:13 +00:00
xform_skipjack.c Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
xform_userland.h We don't need both _STAND and _STANDALONE. There's more places that 2017-12-02 00:07:09 +00:00