From 3e33542b3e676281a92a70e0e3673d1d6b34376c Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 3 Oct 2009 22:22:30 +0200 Subject: [PATCH] Bring in a padlock(4) manual page and also sync crypto.4. Taken-from: FreeBSD --- share/man/man4/Makefile | 2 + share/man/man4/crypto.4 | 71 +++++++++++++++------------ share/man/man4/padlock.4 | 100 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+), 30 deletions(-) create mode 100644 share/man/man4/padlock.4 diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 6b1160a936..880e3be3f8 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -182,6 +182,7 @@ MAN= aac.4 \ null.4 \ ohci.4 \ orm.4 \ + padlock.4 \ pass.4 \ pccard.4 \ pccbb.4 \ @@ -339,6 +340,7 @@ MAN= aac.4 \ MLINKS= agp.4 agpgart.4 MLINKS+=bktr.4 brooktree.4 +MLINKS+=crypto.4 cryptodev.4 MLINKS+=drm.4 i915drm.4 \ drm.4 mach64drm.4 \ drm.4 mgadrm.4 \ diff --git a/share/man/man4/crypto.4 b/share/man/man4/crypto.4 index 1d55dfc93e..2e46dc3ef3 100644 --- a/share/man/man4/crypto.4 +++ b/share/man/man4/crypto.4 @@ -1,6 +1,4 @@ .\" $OpenBSD: crypto.4,v 1.4 2002/09/12 07:15:03 deraadt Exp $ -.\" $FreeBSD: src/share/man/man4/crypto.4,v 1.1.2.2 2002/12/29 16:35:38 schweikh Exp $ -.\" $DragonFly: src/share/man/man4/crypto.4,v 1.7 2007/11/04 19:04:42 swildner Exp $ .\" .\" Copyright (c) 2001 Theo de Raadt .\" All rights reserved. @@ -28,22 +26,30 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 21, 2002 +.\" $FreeBSD: src/share/man/man4/crypto.4,v 1.9 2009/03/03 07:58:01 brueffer Exp $ +.\" +.Dd October 3, 2009 .Dt CRYPTO 4 .Os .Sh NAME -.Nm crypto +.Nm crypto , +.Nm cryptodev .Nd hardware crypto access driver .Sh SYNOPSIS .Cd device crypto +.Cd device cryptodev .Sh DESCRIPTION The .Nm -driver provides userland applications access to hardware crypto support -via the kernel. +driver provides a device-independent framework to support +cryptographic operations in the kernel. The +.Nm cryptodev +driver provides userland applications access to this support +through the .Pa /dev/crypto -device node primarily operates in an +device. +This node primarily operates in an .Xr ioctl 2 based model, permitting a variety of applications to query device capabilities, submit transactions, and get results. @@ -72,35 +78,41 @@ Depending on hardware being present, the following symmetric and asymmetric cryptographic features are potentially available from .Pa /dev/crypto : .Pp -.Bl -tag -compact -width CRYPTO_RIPEMD160_HMAC -offset indent -.It CRYPTO_DES_CBC -.It CRYPTO_3DES_CBC -.It CRYPTO_BLF_CBC -.It CRYPTO_CAST_CBC -.It CRYPTO_SKIPJACK_CBC -.It CRYPTO_MD5_HMAC -.It CRYPTO_SHA1_HMAC -.It CRYPTO_RIPEMD160_HMAC -.It CRYPTO_MD5_KPDK -.It CRYPTO_SHA1_KPDK -.It CRYPTO_AES_CBC -.It CRYPTO_ARC4 -.It CRYPTO_MD5 -.It CRYPTO_SHA1 -.It CRK_MOD_EXP -.It CRK_MOD_EXP_CRT -.It CRK_DSA_SIGN -.It CRK_DSA_VERIFY -.It CRK_DH_COMPUTE_KEY +.Bl -tag -width ".Dv CRYPTO_RIPEMD160_HMAC" -offset indent -compact +.It Dv CRYPTO_DES_CBC +.It Dv CRYPTO_3DES_CBC +.It Dv CRYPTO_BLF_CBC +.It Dv CRYPTO_CAMELLIA_CBC +.It Dv CRYPTO_CAST_CBC +.It Dv CRYPTO_SKIPJACK_CBC +.It Dv CRYPTO_MD5_HMAC +.It Dv CRYPTO_SHA1_HMAC +.It Dv CRYPTO_RIPEMD160_HMAC +.It Dv CRYPTO_MD5_KPDK +.It Dv CRYPTO_SHA1_KPDK +.It Dv CRYPTO_AES_CBC +.It Dv CRYPTO_ARC4 +.It Dv CRYPTO_MD5 +.It Dv CRYPTO_SHA1 +.It Dv CRK_MOD_EXP +.It Dv CRK_MOD_EXP_CRT +.It Dv CRK_DSA_SIGN +.It Dv CRK_DSA_VERIFY +.It Dv CRK_DH_COMPUTE_KEY .El .Sh FILES -.Bl -tag -width /dev/crypto -compact +.Bl -tag -width ".Pa /dev/crypto" -compact .It Pa /dev/crypto crypto access device .El .Sh SEE ALSO +.\".Xr glxsb 4 , .Xr hifn 4 , +.Xr ipsec 4 , +.Xr padlock 4 , +.\".Xr safe 4 , .Xr ubsec 4 , +.\".Xr geli 8 , .Xr crypto 9 .Sh HISTORY The @@ -110,5 +122,4 @@ driver first appeared in The .Nm driver was imported to -.Fx -in 5.0. +.Fx 5.0 . diff --git a/share/man/man4/padlock.4 b/share/man/man4/padlock.4 new file mode 100644 index 0000000000..f71f52e4e2 --- /dev/null +++ b/share/man/man4/padlock.4 @@ -0,0 +1,100 @@ +.\" Copyright (c) 2005 Christian Brueffer +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD: src/share/man/man4/man4.i386/padlock.4,v 1.8 2007/08/02 08:04:48 bz Exp $ +.\" +.Dd October 3, 2009 +.Dt PADLOCK 4 +.Os +.Sh NAME +.Nm padlock +.Nd "driver for the cryptographic functions and RNG in VIA C3, C7 and Eden processors" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device crypto" +.Cd "device padlock" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +padlock_load="YES" +.Ed +.Sh DESCRIPTION +The C3 and Eden processor series from VIA include hardware acceleration for +AES. +The C7 series includes hardware acceleration for AES, SHA1, SHA256 and RSA. +All of the above processor series include a hardware random number generator. +.Pp +The +.Nm +driver registers itself to accelerate AES operations and, if available, HMAC/SHA1 +and HMAC/SHA256 for +.Xr crypto 4 . +It also registers itself to accelerate other HMAC algorithms, although +there is no hardware acceleration for those algorithms. +This is only needed so +.Nm +can work with +.Xr ipsec 4 . +.Pp +The hardware random number generator supplies data for the kernel +.Xr random 4 +subsystem. +.Sh SEE ALSO +.Xr crypt 3 , +.Xr crypto 4 , +.Xr intro 4 , +.Xr ipsec 4 , +.Xr random 4 , +.Xr crypto 9 +.Sh HISTORY +The +.Nm +driver first appeared in +.Ox . +The first +.Fx +release to include it was +.Fx 6.0 . +.Pp +It was imported into +.Dx 2.5 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver with AES encryption support was written by +.An Jason Wright Aq jason@OpenBSD.org . +It was ported to +.Fx +and then extended to support SHA1 and SHA256 +by +.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org . +This manual page was written by +.An Christian Brueffer Aq brueffer@FreeBSD.org . -- 2.41.0