xref: /freebsd/share/man/man4/safe.4 (revision 7660b554bc59a07be0431c17e0e33815818baa69)
1.\\"-
2.\\" Copyright (c) 2003	Sam Leffler, Errno Consulting
3.\\" All rights reserved.
4.\\"
5.\\" Redistribution and use in source and binary forms, with or without
6.\\" modification, are permitted provided that the following conditions
7.\\" are met:
8.\\" 1. Redistributions of source code must retain the above copyright
9.\\"    notice, this list of conditions and the following disclaimer.
10.\\" 2. Redistributions in binary form must reproduce the above copyright
11.\\"    notice, this list of conditions and the following disclaimer in the
12.\\"    documentation and/or other materials provided with the distribution.
13.\\"
14.\\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\\" SUCH DAMAGE.
25.\\"
26.\\" $FreeBSD$
27.\\"/
28.Dd May 30, 2002
29.Dt SAFE 4
30.Os
31.Sh NAME
32.Nm safe
33.Nd SafeNet crypto accelerator
34.Sh SYNOPSIS
35.Nm device safe
36.sp
37.Cd sysctl hw.safe.debug
38.Cd sysctl hw.safe.rnginterval
39.Cd sysctl hw.safe.rngbufsize
40.Cd sysctl hw.safe.rngmaxalarm
41.Sh DESCRIPTION
42The
43.Nm
44driver supports cards containing any of the following chips:
45.Bl -tag -width "SafeNet 1141" -offset indent
46.It SafeNet 1141
47The original chipset.  Supports DES, Triple-DES, AES, MD5, and SHA-1
48symmetric crypto operations, RNG, public key operations, and full IPsec
49packet processing.
50.It SafeNet 1741
51A faster version of the 1141.
52.El
53.Pp
54The
55.Nm
56driver registers itself to accelerate DES, Triple-DES, AES, MD5-HMAC,
57SHA1-HMAC, and NULL operations for
58.Xr ipsec 4
59and
60.Xr crypto 4 .
61.Pp
62On all models, the driver registers itself to provide random data to the
63.Xr random 4
64subsystem.
65Periodically the driver will poll the hardware RNG and retrieve
66data to for use by the system.
67If the driver detects that the hardware RNG is resonating with any local
68signal it will reset the oscillators that generate random data.
69Three sysctl settings control this procedure:
70.Li hw.safe.rnginterval
71specifies the time, in seconds, between polling operations,
72.Li hw.safe.rngbufsize
73specifies the number of 32-bit words to retrieve on each poll,
74and
75.Li hw.safe.rngmaxalarm
76specifies the threshold for reseting the oscillators.
77.Pp
78When the driver is compiled with
79.Dv SAFE_DEBUG
80defined, two sysctl variables are provided for debugging purposes:
81.Li hw.safe.debug
82can be set to a non-zero value to enable debugging messages to be sent
83to the console for each cryptographic operation.
84.Li hw.safe.dump
85is a write-only variable that can be used to force driver state to be sent
86to the console.
87Set this variable to
88.Li ring
89to dump the current state of the descriptor ring,
90to
91.Li dma
92to dump the hardware DMA registers,
93or
94to
95.Li int
96to dump the hardware interrupt registers.
97.Sh SEE ALSO
98.Xr crypt 3 ,
99.Xr crypto 4 ,
100.Xr intro 4 ,
101.Xr ipsec 4 ,
102.Xr random 4 ,
103.Xr crypto 9
104.Sh BUGS
105Public key support is not implemented.
106