summaryrefslogtreecommitdiff
path: root/sys/opencrypto
AgeCommit message (Collapse)Author
2003-12-31Split opencrypto configuration into an attribute, usable by inkerneljonathan
clients, and a pseudo-device for userspace access. The attribute is named `opencrypto'. The pseudo-device is renamed to "crypto", which has a dependency on "opencrypto". The sys/conf/majors entry and pseudo-device attach entrypoint are updated to match the new pseudo-device name. Fast IPsec (sys/netipsec/files.ipsec) now lists a dependency on the "opencrypto" attribute. Drivers for crypto accelerators (ubsec, hifn775x) also pull in opencrypto, as providers of opencrypto transforms.
2003-11-19Wrap noisy pointless message about denied userspace requests withjonathan
`#ifdef CRYPTO_DEBUG', per Jason Thorpe's suggestion.
2003-11-19Fix typo.jonathan
2003-11-19Clean up userlevel access to software kernel transforms, in preparationjonathan
for using /dev/crypto for OpenSSL: 1. Add comments explaining crypto_devallowsoft, explaining the OpenBSD-style three-way logic actully implemented in crypto_newsession(). 2. Pass crypto_devallowsoft as the final argument to crypto_newsession(), instead of a constant 0 value. 3. Set the default value of crypto_devallowsoft to 1, to allow /dev/crypto access only for hardware-supported transforms. Items 1-3 may be revised to match the FreeBSD two-way logic, if the consensus is that there's no point to forcing software transforms. But as a first step, let the description match what the code actually does. GC unused variables usercrypto, userasmcrypto, cryptodevallowsoft from cryptodev.c, in favour of variables crypto_usercrypto, crypto_userasmcrypto, crypto_devallowsoft, which are used as well as defined in crypto.c.
2003-11-18Remove erroneous '2 *' from 'bzero(*sched, 2 * sizeof(rijndael_ctx));'jonathan
After using AES from sys/crypto, we only malloc sizeof(rijndael_ctx), and we were bzero()ing past the end of the aes ctx, leading to panics.
2003-11-16Move the Skipjack algorithm from sys/opencrypto to sys/crypto/skipjack.tls
There are now no cryptographic algorithms in sys/opencrypto, which, according to the comment formerly in files.opencrypto, was the original intent.
2003-11-16Remove '#ifdef notdef' around userspace ioctl() requests forjonathan
pure (non-HMAC) MD5 and SHA1.
2003-11-09Fix a genuine uninitialised variable.scw
2003-09-21Implement nanouptime as a function to avoid 'dereferencing type-punned pointer'.lha
No token after #endif
2003-09-06comment typocjep
2003-08-27Fix-up a few things missed in the rijndael_set_key() change.thorpej
2003-08-27simplify rijndael.c API - always schedule encrypt/decrypt key.itojun
reviewed by thorpej
2003-08-27Some const poisoning.thorpej
2003-08-27Tidy up the namespace of this a little.thorpej
2003-08-27Use the Blowfish in crypto/blowfish, which has hooks for using tunedthorpej
assembly for the transform.
2003-08-26In Blowfish_initstate(), make the initstate static, otherwise thethorpej
compiler will emit code to first copy it onto the stack before copying it into the destination context structure. With this change, it will only be copied once.
2003-08-26Move the opencrypto CAST-128 implementation to crypto/cast128, removingthorpej
the old one. Rename the functions/structures from cast_* to cast128_*. Adapt the KAME IPsec to use the new CAST-128 code, which has a simpler API and smaller footprint.
2003-08-26Remove a bunch of unnecessary includes.thorpej
2003-08-26G/C extra /.thorpej
2003-08-26G/C opencrypto's local copy of rijndael. Adapt the extant rijndaelthorpej
code for opencrypto's use by adding the simplified API that opencrypto expects.
2003-08-26Remove extra /.thorpej
2003-08-25It's bad form to use the <opencrypto/rmd160.h> header file whilethorpej
using the crypto/ripemd160/rmd160.c implementation. Remove the opencrypto-local copies of these files entirely.
2003-08-25These are unused; remove them.thorpej
2003-08-24crypto_mbuf.c is unused; remove it.thorpej
2003-08-24G/C some unused config definitions.thorpej
2003-08-24Make opencrypto depend on the "ripemd160" and "sha2" attributes, ratherthorpej
than polluting the crypto algorithm config info with opencrypto knowledge.
2003-08-24Move the opencrypto defpseudo into files.opencrypto.thorpej
2003-08-22on netbsd, major # for /dev/crypto depends on architojun
2003-08-21Pull in FreeBSD sys/opencrypto/cryptodev.h, revision 1.2.2.5 -> 1.2.2.6.jonathan
Sam Leffler's FreeBSD commit message was ``to eliminate context switch when returning results from the software crypto driver'' but the patch also contains the CRYPTO_SESID*() macros used in newer ubsec and hifn drivers.
2003-08-21Pull up `done' flag for crypto operations from FreeBSD. FreeBSD deltas:jonathan
cryptodev.c: 1.4.2.3 -> 1.4.2.4 cryptodev.h: 1.4.2.4 -> 1.4.2.5
2003-08-01keyed-{sha1,md5} should not be truncated to 96 bits. markus@openbsditojun
2003-07-31Remove bogus include which snuck into previous commit (from comparisonjonathan
to Quentin Garnier's suggested patch).
2003-07-30Move the initialization of the crypto framework from the userlandjonathan
pseudo-device to init_main(), so the framework is ready for registration requests at autoconfiguration time. Thanks to Quentin Garnier for confirming the change was required, and for testing a similar fix.
2003-07-30Add ``needs-flag'' to opencrypto/crypto.c, so that init_main() can dojonathan
a feature-test and if present, initialize the crypto framework before configuring hardware devices, so the crypto framework is ready to accept attachment requests when crypto hardware are auto-configured and try to register themselves with the framework. Thanks to Quentin Garnier who, given a heads-up about the problem, tested the same basic fix with a hardware device.
2003-07-30Garbage-collect references to OpenBSD-only <dev/rndvar.h>.jonathan
2003-07-30make the panic messages match realitylha
2003-07-28Clean up dependencies between opencrypto framework and sys/crypto,jonathan
by making the sys/crypto transforms depend on (per-transform-config-keyword|opencrypto) Thanks to Martin Husemann for double-checking the changes.
2003-07-28Remove vestiges of OpenBSD <sys/md5k.h> header.jonathan
2003-07-27Cleanup traces of previous standalone m_apply()/m_getptr().jonathan
2003-07-26Fix authentication hashes requested via /dev/crypto. The handler forjonathan
userland hashes case was partly omitted in the OpenBSD -> FreeBSD port.
2003-07-26Don't declare the sha2.c file twice, instead add opencrypto flag tohe
existing declaration, and leave behind a comment in files.opencrypto.
2003-07-25Install cryptodev.h into /usr/include/crypto/ for userspace applications.jonathan
2003-07-25Commit initial NetBSD port of the OpenCrypto Framework (OCF). Thisjonathan
code is derived from Sam Leffler's FreeBSD port of OCF, which is in turn a port of Angelos Keromytis's OpenBSD work. Credit to Sam and Angelos, any blame for the NetBSD port to me.