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 September 12, 2004 29.Dt SAFE 4 30.Os 31.Sh NAME 32.Nm safe 33.Nd SafeNet crypto accelerator 34.Sh SYNOPSIS 35.Cd "device safe" 36.Pp 37.Nm sysctl Va hw.safe.debug 38.Nm sysctl Va hw.safe.dump 39.Nm sysctl Va hw.safe.rnginterval 40.Nm sysctl Va hw.safe.rngbufsize 41.Nm sysctl Va hw.safe.rngmaxalarm 42.Sh DESCRIPTION 43The 44.Nm 45driver supports cards containing SafeNet crypto accelerator chips. 46.Pp 47The 48.Nm 49driver registers itself to accelerate DES, Triple-DES, AES, MD5-HMAC, 50SHA1-HMAC, and NULL operations for 51.Xr ipsec 4 52and 53.Xr crypto 4 . 54.Pp 55On all models, the driver registers itself to provide random data to the 56.Xr random 4 57subsystem. 58Periodically the driver will poll the hardware RNG and retrieve 59data for use by the system. 60If the driver detects that the hardware RNG is resonating with any local 61signal, it will reset the oscillators that generate random data. 62Three 63.Xr sysctl 8 64settings control this procedure: 65.Va hw.safe.rnginterval 66specifies the time, in seconds, between polling operations, 67.Va hw.safe.rngbufsize 68specifies the number of 32-bit words to retrieve on each poll, 69and 70.Va hw.safe.rngmaxalarm 71specifies the threshold for resetting the oscillators. 72.Pp 73When the driver is compiled with 74.Dv SAFE_DEBUG 75defined, two 76.Xr sysctl 8 77variables are provided for debugging purposes: 78.Va hw.safe.debug 79can be set to a non-zero value to enable debugging messages to be sent 80to the console for each cryptographic operation, 81.Va hw.safe.dump 82is a write-only variable that can be used to force driver state to be sent 83to the console. 84Set this variable to 85.Dq Li ring 86to dump the current state of the descriptor ring, 87to 88.Dq Li dma 89to dump the hardware DMA registers, 90or 91to 92.Dq Li int 93to dump the hardware interrupt registers. 94.Sh HARDWARE 95The 96.Nm 97driver supports cards containing any of the following chips: 98.Bl -tag -width "SafeNet 1141" -offset indent 99.It SafeNet 1141 100The original chipset. 101Supports DES, Triple-DES, AES, MD5, and SHA-1 102symmetric crypto operations, RNG, public key operations, and full IPsec 103packet processing. 104.It SafeNet 1741 105A faster version of the 1141. 106.El 107.Sh SEE ALSO 108.Xr crypt 3 , 109.Xr crypto 4 , 110.Xr intro 4 , 111.Xr ipsec 4 , 112.Xr random 4 , 113.Xr crypto 9 114.Sh BUGS 115Public key support is not implemented. 116