Add manual page for nsp(4), the driver for NSP2000 cryptographic accellerators. Adjust mdoc.local so it knows about .Fx 4.11, present in nsp manual page.diff -r1.1109 -r1.1110 src/distrib/sets/lists/man/mi
(tls)
--- src/distrib/sets/lists/man/mi 2008/10/29 17:26:57 1.1109
+++ src/distrib/sets/lists/man/mi 2008/11/02 22:11:36 1.1110
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: mi,v 1.1109 2008/10/29 17:26:57 jkunz Exp $ | 1 | # $NetBSD: mi,v 1.1110 2008/11/02 22:11:36 tls Exp $ | |
2 | # | 2 | # | |
3 | # Note: don't delete entries from here - mark them as "obsolete" instead. | 3 | # Note: don't delete entries from here - mark them as "obsolete" instead. | |
4 | # | 4 | # | |
5 | ./etc/mtree/set.man man-sys-root | 5 | ./etc/mtree/set.man man-sys-root | |
6 | ./usr/share/info/am-utils.info man-amd-info info | 6 | ./usr/share/info/am-utils.info man-amd-info info | |
7 | ./usr/share/info/as.info man-computil-info bfd,info | 7 | ./usr/share/info/as.info man-computil-info bfd,info | |
8 | ./usr/share/info/awk.info man-util-info info | 8 | ./usr/share/info/awk.info man-util-info info | |
9 | ./usr/share/info/bfd.info man-computil-info bfd,info | 9 | ./usr/share/info/bfd.info man-computil-info bfd,info | |
10 | ./usr/share/info/binutils.info man-computil-info bfd,info | 10 | ./usr/share/info/binutils.info man-computil-info bfd,info | |
11 | ./usr/share/info/bzip2.info man-obsolete obsolete | 11 | ./usr/share/info/bzip2.info man-obsolete obsolete | |
12 | ./usr/share/info/cpp.info man-util-info gcccmds,info | 12 | ./usr/share/info/cpp.info man-util-info gcccmds,info | |
13 | ./usr/share/info/cvs.info man-cvs-info cvs,info | 13 | ./usr/share/info/cvs.info man-cvs-info cvs,info | |
14 | ./usr/share/info/cvsclient.info man-cvs-info cvs,info | 14 | ./usr/share/info/cvsclient.info man-cvs-info cvs,info | |
@@ -1207,26 +1207,27 @@ | @@ -1207,26 +1207,27 @@ | |||
1207 | ./usr/share/man/cat4/neo.0 man-sys-catman .cat | 1207 | ./usr/share/man/cat4/neo.0 man-sys-catman .cat | |
1208 | ./usr/share/man/cat4/netintro.0 man-sys-catman .cat | 1208 | ./usr/share/man/cat4/netintro.0 man-sys-catman .cat | |
1209 | ./usr/share/man/cat4/netsmb.0 man-sys-catman .cat | 1209 | ./usr/share/man/cat4/netsmb.0 man-sys-catman .cat | |
1210 | ./usr/share/man/cat4/networking.0 man-sys-catman .cat | 1210 | ./usr/share/man/cat4/networking.0 man-sys-catman .cat | |
1211 | ./usr/share/man/cat4/nfe.0 man-sys-catman .cat | 1211 | ./usr/share/man/cat4/nfe.0 man-sys-catman .cat | |
1212 | ./usr/share/man/cat4/nfsmb.0 man-sys-catman .cat | 1212 | ./usr/share/man/cat4/nfsmb.0 man-sys-catman .cat | |
1213 | ./usr/share/man/cat4/nfsmbc.0 man-sys-catman .cat | 1213 | ./usr/share/man/cat4/nfsmbc.0 man-sys-catman .cat | |
1214 | ./usr/share/man/cat4/njata.0 man-sys-catman .cat | 1214 | ./usr/share/man/cat4/njata.0 man-sys-catman .cat | |
1215 | ./usr/share/man/cat4/njs.0 man-sys-catman .cat | 1215 | ./usr/share/man/cat4/njs.0 man-sys-catman .cat | |
1216 | ./usr/share/man/cat4/ns.0 man-obsolete obsolete | 1216 | ./usr/share/man/cat4/ns.0 man-obsolete obsolete | |
1217 | ./usr/share/man/cat4/nsclpcsio.0 man-sys-catman .cat | 1217 | ./usr/share/man/cat4/nsclpcsio.0 man-sys-catman .cat | |
1218 | ./usr/share/man/cat4/nsip.0 man-obsolete obsolete | 1218 | ./usr/share/man/cat4/nsip.0 man-obsolete obsolete | |
1219 | ./usr/share/man/cat4/nsmb.0 man-sys-catman .cat | 1219 | ./usr/share/man/cat4/nsmb.0 man-sys-catman .cat | |
1220 | ./usr/share/man/cat4/nsp.0 man-sys-catman .cat | |||
1220 | ./usr/share/man/cat4/nsphy.0 man-sys-catman .cat | 1221 | ./usr/share/man/cat4/nsphy.0 man-sys-catman .cat | |
1221 | ./usr/share/man/cat4/nsphyter.0 man-sys-catman .cat | 1222 | ./usr/share/man/cat4/nsphyter.0 man-sys-catman .cat | |
1222 | ./usr/share/man/cat4/ntwo.0 man-sys-catman .cat | 1223 | ./usr/share/man/cat4/ntwo.0 man-sys-catman .cat | |
1223 | ./usr/share/man/cat4/ntwoc.0 man-sys-catman .cat | 1224 | ./usr/share/man/cat4/ntwoc.0 man-sys-catman .cat | |
1224 | ./usr/share/man/cat4/null.0 man-sys-catman .cat | 1225 | ./usr/share/man/cat4/null.0 man-sys-catman .cat | |
1225 | ./usr/share/man/cat4/oak.0 man-sys-catman .cat | 1226 | ./usr/share/man/cat4/oak.0 man-sys-catman .cat | |
1226 | ./usr/share/man/cat4/oboe.0 man-sys-catman .cat | 1227 | ./usr/share/man/cat4/oboe.0 man-sys-catman .cat | |
1227 | ./usr/share/man/cat4/ofisa.0 man-sys-catman .cat | 1228 | ./usr/share/man/cat4/ofisa.0 man-sys-catman .cat | |
1228 | ./usr/share/man/cat4/ohci.0 man-sys-catman .cat | 1229 | ./usr/share/man/cat4/ohci.0 man-sys-catman .cat | |
1229 | ./usr/share/man/cat4/onewire.0 man-sys-catman .cat | 1230 | ./usr/share/man/cat4/onewire.0 man-sys-catman .cat | |
1230 | ./usr/share/man/cat4/oosiop.0 man-sys-catman .cat | 1231 | ./usr/share/man/cat4/oosiop.0 man-sys-catman .cat | |
1231 | ./usr/share/man/cat4/opl.0 man-sys-catman .cat | 1232 | ./usr/share/man/cat4/opl.0 man-sys-catman .cat | |
1232 | ./usr/share/man/cat4/opms.0 man-obsolete obsolete | 1233 | ./usr/share/man/cat4/opms.0 man-obsolete obsolete | |
@@ -6043,26 +6044,27 @@ | @@ -6043,26 +6044,27 @@ | |||
6043 | ./usr/share/man/man4/neo.4 man-sys-man .man | 6044 | ./usr/share/man/man4/neo.4 man-sys-man .man | |
6044 | ./usr/share/man/man4/netintro.4 man-sys-man .man | 6045 | ./usr/share/man/man4/netintro.4 man-sys-man .man | |
6045 | ./usr/share/man/man4/netsmb.4 man-sys-man .man | 6046 | ./usr/share/man/man4/netsmb.4 man-sys-man .man | |
6046 | ./usr/share/man/man4/networking.4 man-sys-man .man | 6047 | ./usr/share/man/man4/networking.4 man-sys-man .man | |
6047 | ./usr/share/man/man4/nfe.4 man-sys-man .man | 6048 | ./usr/share/man/man4/nfe.4 man-sys-man .man | |
6048 | ./usr/share/man/man4/nfsmb.4 man-sys-man .man | 6049 | ./usr/share/man/man4/nfsmb.4 man-sys-man .man | |
6049 | ./usr/share/man/man4/nfsmbc.4 man-sys-man .man | 6050 | ./usr/share/man/man4/nfsmbc.4 man-sys-man .man | |
6050 | ./usr/share/man/man4/njata.4 man-sys-man .man | 6051 | ./usr/share/man/man4/njata.4 man-sys-man .man | |
6051 | ./usr/share/man/man4/njs.4 man-sys-man .man | 6052 | ./usr/share/man/man4/njs.4 man-sys-man .man | |
6052 | ./usr/share/man/man4/ns.4 man-obsolete obsolete | 6053 | ./usr/share/man/man4/ns.4 man-obsolete obsolete | |
6053 | ./usr/share/man/man4/nsclpcsio.4 man-sys-man .man | 6054 | ./usr/share/man/man4/nsclpcsio.4 man-sys-man .man | |
6054 | ./usr/share/man/man4/nsip.4 man-obsolete obsolete | 6055 | ./usr/share/man/man4/nsip.4 man-obsolete obsolete | |
6055 | ./usr/share/man/man4/nsmb.4 man-sys-man .man | 6056 | ./usr/share/man/man4/nsmb.4 man-sys-man .man | |
6057 | ./usr/share/man/man4/nsp.4 man-sys-man .man | |||
6056 | ./usr/share/man/man4/nsphy.4 man-sys-man .man | 6058 | ./usr/share/man/man4/nsphy.4 man-sys-man .man | |
6057 | ./usr/share/man/man4/nsphyter.4 man-sys-man .man | 6059 | ./usr/share/man/man4/nsphyter.4 man-sys-man .man | |
6058 | ./usr/share/man/man4/ntwo.4 man-sys-man .man | 6060 | ./usr/share/man/man4/ntwo.4 man-sys-man .man | |
6059 | ./usr/share/man/man4/ntwoc.4 man-sys-man .man | 6061 | ./usr/share/man/man4/ntwoc.4 man-sys-man .man | |
6060 | ./usr/share/man/man4/null.4 man-sys-man .man | 6062 | ./usr/share/man/man4/null.4 man-sys-man .man | |
6061 | ./usr/share/man/man4/oak.4 man-sys-man .man | 6063 | ./usr/share/man/man4/oak.4 man-sys-man .man | |
6062 | ./usr/share/man/man4/oboe.4 man-sys-man .man | 6064 | ./usr/share/man/man4/oboe.4 man-sys-man .man | |
6063 | ./usr/share/man/man4/ofisa.4 man-sys-man .man | 6065 | ./usr/share/man/man4/ofisa.4 man-sys-man .man | |
6064 | ./usr/share/man/man4/ohci.4 man-sys-man .man | 6066 | ./usr/share/man/man4/ohci.4 man-sys-man .man | |
6065 | ./usr/share/man/man4/onewire.4 man-sys-man .man | 6067 | ./usr/share/man/man4/onewire.4 man-sys-man .man | |
6066 | ./usr/share/man/man4/oosiop.4 man-sys-man .man | 6068 | ./usr/share/man/man4/oosiop.4 man-sys-man .man | |
6067 | ./usr/share/man/man4/opl.4 man-sys-man .man | 6069 | ./usr/share/man/man4/opl.4 man-sys-man .man | |
6068 | ./usr/share/man/man4/opms.4 man-obsolete obsolete | 6070 | ./usr/share/man/man4/opms.4 man-obsolete obsolete |
--- src/gnu/usr.bin/groff/tmac/Attic/mdoc.local 2008/10/31 04:32:54 1.45
+++ src/gnu/usr.bin/groff/tmac/Attic/mdoc.local 2008/11/02 22:11:36 1.46
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: mdoc.local,v 1.45 2008/10/31 04:32:54 agc Exp $ | 1 | .\" $NetBSD: mdoc.local,v 1.46 2008/11/02 22:11:36 tls Exp $ | |
2 | .\" | 2 | .\" | |
3 | .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. | 3 | .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. | |
4 | .\" All rights reserved. | 4 | .\" All rights reserved. | |
5 | .\" | 5 | .\" | |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | 6 | .\" This code is derived from software contributed to The NetBSD Foundation | |
7 | .\" by Thomas Klausner. | 7 | .\" by Thomas Klausner. | |
8 | .\" | 8 | .\" | |
9 | .\" Redistribution and use in source and binary forms, with or without | 9 | .\" Redistribution and use in source and binary forms, with or without | |
10 | .\" modification, are permitted provided that the following conditions | 10 | .\" modification, are permitted provided that the following conditions | |
11 | .\" are met: | 11 | .\" are met: | |
12 | .\" 1. Redistributions of source code must retain the above copyright | 12 | .\" 1. Redistributions of source code must retain the above copyright | |
13 | .\" notice, this list of conditions and the following disclaimer. | 13 | .\" notice, this list of conditions and the following disclaimer. | |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
@@ -48,26 +48,27 @@ | @@ -48,26 +48,27 @@ | |||
48 | .\" Default footer operating system value | 48 | .\" Default footer operating system value | |
49 | .ds doc-default-operating-system NetBSD\~5.0 | 49 | .ds doc-default-operating-system NetBSD\~5.0 | |
50 | .\" Other known versions, not yet in groff distribution | 50 | .\" Other known versions, not yet in groff distribution | |
51 | .ds doc-operating-system-NetBSD-1.3.3 1.3.3 | 51 | .ds doc-operating-system-NetBSD-1.3.3 1.3.3 | |
52 | .ds doc-operating-system-NetBSD-1.6.3 1.6.3 | 52 | .ds doc-operating-system-NetBSD-1.6.3 1.6.3 | |
53 | .ds doc-operating-system-NetBSD-2.0.1 2.0.1 | 53 | .ds doc-operating-system-NetBSD-2.0.1 2.0.1 | |
54 | .ds doc-operating-system-NetBSD-2.0.2 2.0.2 | 54 | .ds doc-operating-system-NetBSD-2.0.2 2.0.2 | |
55 | .ds doc-operating-system-NetBSD-3.0 3.0 | 55 | .ds doc-operating-system-NetBSD-3.0 3.0 | |
56 | .ds doc-operating-system-NetBSD-3.0.1 3.0.1 | 56 | .ds doc-operating-system-NetBSD-3.0.1 3.0.1 | |
57 | .ds doc-operating-system-NetBSD-3.1 3.1 | 57 | .ds doc-operating-system-NetBSD-3.1 3.1 | |
58 | .ds doc-operating-system-NetBSD-4.0 4.0 | 58 | .ds doc-operating-system-NetBSD-4.0 4.0 | |
59 | .ds doc-operating-system-NetBSD-5.0 5.0 | 59 | .ds doc-operating-system-NetBSD-5.0 5.0 | |
60 | .ds doc-operating-system-NetBSD-6.0 6.0 | 60 | .ds doc-operating-system-NetBSD-6.0 6.0 | |
61 | .ds doc-operating-system-FreeBSD-4.11 4.11 | |||
61 | .ds doc-operating-system-FreeBSD-6.1 6.1 | 62 | .ds doc-operating-system-FreeBSD-6.1 6.1 | |
62 | .ds doc-operating-system-FreeBSD-6.3 6.3 | 63 | .ds doc-operating-system-FreeBSD-6.3 6.3 | |
63 | .ds doc-operating-system-FreeBSD-7.0 7.0 | 64 | .ds doc-operating-system-FreeBSD-7.0 7.0 | |
64 | .\" Platforms not yet in groff distribution | 65 | .\" Platforms not yet in groff distribution | |
65 | .ds doc-volume-as-amigappc amigappc | 66 | .ds doc-volume-as-amigappc amigappc | |
66 | .ds doc-volume-as-evbsh5 evbsh5 | 67 | .ds doc-volume-as-evbsh5 evbsh5 | |
67 | .ds doc-volume-as-ews4800mips ews4800mips | 68 | .ds doc-volume-as-ews4800mips ews4800mips | |
68 | .ds doc-volume-as-ibmnws ibmnws | 69 | .ds doc-volume-as-ibmnws ibmnws | |
69 | .ds doc-volume-as-iyonix iyonix | 70 | .ds doc-volume-as-iyonix iyonix | |
70 | .ds doc-volume-as-landisk landisk | 71 | .ds doc-volume-as-landisk landisk | |
71 | . | 72 | . | |
72 | .\" Bluetooth libraries | 73 | .\" Bluetooth libraries | |
73 | .ds doc-str-Lb-libarchive Reading and Writing Streaming Archives Library (libarchive, \-larchive) | 74 | .ds doc-str-Lb-libarchive Reading and Writing Streaming Archives Library (libarchive, \-larchive) |
.\" $NetBSD: nsp.4,v 1.1 2008/11/02 22:11:36 tls Exp $
.\"
.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Coyote Point Systems, Inc.
.\"
.\" 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 ``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 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.
.\"
.Dd November 2, 2008
.Dt NSP 4
.Os
.Sh NAME
.Nm nsp
.Nd NBMK/CyberGuard/NetOctave NSP2000 crypto accellerator
.Sh SYNOPSIS
.Cd "nsp* at pci? dev ? function ?"
.Sh DESCRIPTION
The
.Nm
driver supports cards using the NSP2000 cryptographic processor,
originally manufactured and sold by NetOctave, then CyberGuard, and
presently (late 2008) by NBMK Encryption Technologies.
.Pp
The NSP2000 is
a cryptographic "packet processor" or "macro processor" featuring extensive
support for protocol handshake acceleration and protocol record operations
(e.g. single-pass pad-encrypt-and-hash for SSL or ESP messages). It
also provides various cryptographic and mathematical primitives
such as random number generation, encryption/decryption (DES, 3DES, and RC4),
hash computation (MD5, SHA1, and HMAC), and an extensive set of operations
for arbitrary precision arithmetic. It contains a tamper-resistant write-
only memory region for storage of cryptographic keys.
.Pp
The
.Nm
driver registers support for the following operations with
.Xr opencrypto 9 :
.Bl -tag -width "CRK_DH_COMPUTE_KEY" -offset indent
.It CRYPTO_DES_CBC
DES in CBC mode.
.It CRYPTO_3DES_CBC
Triple-DES in CBC mode.
.It CRYPTO_MD5
The MD5 hash algorithm.
.It CRYPTO_SHA1
The SHA-1 hash algorithm.
.It CRYPTO_SHA1_HMAC
The HMAC message authentication code using SHA-1 as the hash function.
.It CRYPTO_MD5_HMAC
The HMAC message authentication code using MD5 as the hash function.
.It CRK_MOD
Compute x modulo y.
.It CRK_MOD_ADD
Modular addition.
.It CRK_MOD_ADDINV
Modular additive inversion.
.It CRK_MOD_SUB
Modular subtraction.
.It CRK_MOD_MULT
Moduar multiplication.
.It CRK_MOD_MULTINV
Modular multiplicative inversion.
.It CRK_MOD_EXP
Modular exponentiation.
.It CRK_DSA_SIGN
DSA signature creation.
.It CRK_DSA_VERIFY
DSA signature verification.
.It CRK_DH_COMPUTE_KEY
Diffie-Hellman key computation.
.El
.Sh PERFORMANCE
.Pp
The
.Nm
driver can perform several hundred 1024-bit RSA operations per second,
and can encrypt and hash about 200Mbit/sec of data with symmetric
operations. Each figure is approximately 1/3 the rated throughput for
the device.
.Pp
Several restrictions limit the performance of this driver:
.Bl -enum -compact
.It
The CRK_MOD_EXP_CRT operation (modular exponentiation with operands in
Chinese Remainder Theorem form) is unfortunately not supported because
the
.Xr opencrypto 9 :
interface specifies this operation in a way which may only be compatible
with the
.Xr ubsec 4
accellerator.
.It
The handshake operations and record transforms are not supported as they
are a poor fit for the current
.Xr opencrypto 9
API. Support for either would require a method of passing record-transform
contexts between layers of the framework, likely in both directions across
the user-kernel boundary.
Without record operations, the host CPU will almost always
perform RC4 faster than the NSP2000, so RC4 support is disabled in the
.Nm
driver.
.It
The onboard key memory is not supported. It would be relatively easy to
add support for this feature to
.Xr opencrypto 9 ,
but the interface for supporting this functionality in OpenSSL
in OpenSSL is complex and poorly documented, which makes kernel support
unuseful.
.It
The OpenSSL "engine" for
.Xr crypto 4
does not yet support the HMAC forms of the hash operations, which roughly
halves performance for many workloads.
.El
.Pp
On a more positive note, the NSP2000 and
.Nm
driver offer excellent performance for small modular arithmetic operations,
achieving 75,000 or more such operations per second.
.Sh SEE ALSO
.Xr crypto 4 ,
.Xr fast_ipsec 4 ,
.Xr intro 4 ,
.Xr rnd 4 ,
.Xr opencrypto 9
.Sh HISTORY
The
.Nm
device driver is descended from the NetOctave SDK for
.Fx 4.11 ,
where it was called "noct". It is unrelated to the driver of that
name which appeared in
.Ox 3.2 ,
which does not support the public-key (or other bignum) functions of the
device. The
.Nm
driver was ported to
.Nx 5.0
by Coyote Point Systems, Inc and generously made available under a BSD-style
license by NBMK Encryption Technologies, Inc, the corporate successor of
NetOctave.
.Pp
The
.Nm
device driver does not currently support the device node interface provided
by the original NetOctave "noct" driver (which offers handshake accelleration,
record operations, memory-mapped handling of packet payloads, and several
other useful features) but most of the code to do so is still present, albeit
in untested form.
.Sh BUGS
Support for limitations of the NSP2000 PCI interface (broken burst-mode
operation, lack of scatter-gather support) is present but tested only on
a fairly small range of host systems.
.Pp
It appears that most if not all NSP2000 cards ever manufactured were
designed to carry either one or two accellerator chips, which suggests
that cards exist with both chips populated. The
.Nm
driver has never been tested with more than one instance present at a time.