xref: /freebsd/share/man/man4/safe.4 (revision da603228b5000586caaa2c6bd8d2806485de0aa8)
1149e2d23SRuslan Ermilov.\"-
2149e2d23SRuslan Ermilov.\" Copyright (c) 2003	Sam Leffler, Errno Consulting
3149e2d23SRuslan Ermilov.\" All rights reserved.
4149e2d23SRuslan Ermilov.\"
5149e2d23SRuslan Ermilov.\" Redistribution and use in source and binary forms, with or without
6149e2d23SRuslan Ermilov.\" modification, are permitted provided that the following conditions
7149e2d23SRuslan Ermilov.\" are met:
8149e2d23SRuslan Ermilov.\" 1. Redistributions of source code must retain the above copyright
9149e2d23SRuslan Ermilov.\"    notice, this list of conditions and the following disclaimer.
10149e2d23SRuslan Ermilov.\" 2. Redistributions in binary form must reproduce the above copyright
11149e2d23SRuslan Ermilov.\"    notice, this list of conditions and the following disclaimer in the
12149e2d23SRuslan Ermilov.\"    documentation and/or other materials provided with the distribution.
13149e2d23SRuslan Ermilov.\"
14149e2d23SRuslan Ermilov.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15149e2d23SRuslan Ermilov.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16149e2d23SRuslan Ermilov.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17149e2d23SRuslan Ermilov.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18149e2d23SRuslan Ermilov.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19149e2d23SRuslan Ermilov.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20149e2d23SRuslan Ermilov.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21149e2d23SRuslan Ermilov.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22149e2d23SRuslan Ermilov.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23149e2d23SRuslan Ermilov.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24149e2d23SRuslan Ermilov.\" SUCH DAMAGE.
25149e2d23SRuslan Ermilov.\"
26149e2d23SRuslan Ermilov.\" $FreeBSD$
27149e2d23SRuslan Ermilov.\"/
28da603228SSimon L. B. Nielsen.Dd September 12, 2004
295a36f3e9SSam Leffler.Dt SAFE 4
305a36f3e9SSam Leffler.Os
315a36f3e9SSam Leffler.Sh NAME
325a36f3e9SSam Leffler.Nm safe
335a36f3e9SSam Leffler.Nd SafeNet crypto accelerator
345a36f3e9SSam Leffler.Sh SYNOPSIS
35d15cee16SRuslan Ermilov.Cd "device safe"
36d15cee16SRuslan Ermilov.Pp
37d15cee16SRuslan Ermilov.Nm sysctl Va hw.safe.debug
38d15cee16SRuslan Ermilov.Nm sysctl Va hw.safe.dump
39d15cee16SRuslan Ermilov.Nm sysctl Va hw.safe.rnginterval
40d15cee16SRuslan Ermilov.Nm sysctl Va hw.safe.rngbufsize
41d15cee16SRuslan Ermilov.Nm sysctl Va hw.safe.rngmaxalarm
425a36f3e9SSam Leffler.Sh DESCRIPTION
435a36f3e9SSam LefflerThe
445a36f3e9SSam Leffler.Nm
45da603228SSimon L. B. Nielsendriver supports cards containing SafeNet crypto accelerator chips.
465a36f3e9SSam Leffler.Pp
475a36f3e9SSam LefflerThe
485a36f3e9SSam Leffler.Nm
495a36f3e9SSam Lefflerdriver registers itself to accelerate DES, Triple-DES, AES, MD5-HMAC,
505a36f3e9SSam LefflerSHA1-HMAC, and NULL operations for
515a36f3e9SSam Leffler.Xr ipsec 4
525a36f3e9SSam Lefflerand
535a36f3e9SSam Leffler.Xr crypto 4 .
545a36f3e9SSam Leffler.Pp
555a36f3e9SSam LefflerOn all models, the driver registers itself to provide random data to the
565a36f3e9SSam Leffler.Xr random 4
575a36f3e9SSam Lefflersubsystem.
585a36f3e9SSam LefflerPeriodically the driver will poll the hardware RNG and retrieve
59c9420eccSChristian Bruefferdata for use by the system.
605a36f3e9SSam LefflerIf the driver detects that the hardware RNG is resonating with any local
61c9420eccSChristian Brueffersignal, it will reset the oscillators that generate random data.
62d15cee16SRuslan ErmilovThree
63d15cee16SRuslan Ermilov.Xr sysctl 8
64d15cee16SRuslan Ermilovsettings control this procedure:
65d15cee16SRuslan Ermilov.Va hw.safe.rnginterval
665a36f3e9SSam Lefflerspecifies the time, in seconds, between polling operations,
67d15cee16SRuslan Ermilov.Va hw.safe.rngbufsize
685a36f3e9SSam Lefflerspecifies the number of 32-bit words to retrieve on each poll,
695a36f3e9SSam Lefflerand
70d15cee16SRuslan Ermilov.Va hw.safe.rngmaxalarm
71c9420eccSChristian Bruefferspecifies the threshold for resetting the oscillators.
725a36f3e9SSam Leffler.Pp
735a36f3e9SSam LefflerWhen the driver is compiled with
745a36f3e9SSam Leffler.Dv SAFE_DEBUG
75d15cee16SRuslan Ermilovdefined, two
76d15cee16SRuslan Ermilov.Xr sysctl 8
77d15cee16SRuslan Ermilovvariables are provided for debugging purposes:
78d15cee16SRuslan Ermilov.Va hw.safe.debug
795a36f3e9SSam Lefflercan be set to a non-zero value to enable debugging messages to be sent
80d15cee16SRuslan Ermilovto the console for each cryptographic operation,
81d15cee16SRuslan Ermilov.Va hw.safe.dump
825a36f3e9SSam Leffleris a write-only variable that can be used to force driver state to be sent
835a36f3e9SSam Lefflerto the console.
845a36f3e9SSam LefflerSet this variable to
85d15cee16SRuslan Ermilov.Dq Li ring
865a36f3e9SSam Lefflerto dump the current state of the descriptor ring,
875a36f3e9SSam Lefflerto
88d15cee16SRuslan Ermilov.Dq Li dma
895a36f3e9SSam Lefflerto dump the hardware DMA registers,
905a36f3e9SSam Leffleror
915a36f3e9SSam Lefflerto
92d15cee16SRuslan Ermilov.Dq Li int
935a36f3e9SSam Lefflerto dump the hardware interrupt registers.
94da603228SSimon L. B. Nielsen.Sh HARDWARE
95da603228SSimon L. B. NielsenThe
96da603228SSimon L. B. Nielsen.Nm
97da603228SSimon L. B. Nielsendriver supports cards containing any of the following chips:
98da603228SSimon L. B. Nielsen.Bl -tag -width "SafeNet 1141" -offset indent
99da603228SSimon L. B. Nielsen.It SafeNet 1141
100da603228SSimon L. B. NielsenThe original chipset.
101da603228SSimon L. B. NielsenSupports DES, Triple-DES, AES, MD5, and SHA-1
102da603228SSimon L. B. Nielsensymmetric crypto operations, RNG, public key operations, and full IPsec
103da603228SSimon L. B. Nielsenpacket processing.
104da603228SSimon L. B. Nielsen.It SafeNet 1741
105da603228SSimon L. B. NielsenA faster version of the 1141.
106da603228SSimon L. B. Nielsen.El
1075a36f3e9SSam Leffler.Sh SEE ALSO
1085a36f3e9SSam Leffler.Xr crypt 3 ,
1095a36f3e9SSam Leffler.Xr crypto 4 ,
1105a36f3e9SSam Leffler.Xr intro 4 ,
1115a36f3e9SSam Leffler.Xr ipsec 4 ,
1125a36f3e9SSam Leffler.Xr random 4 ,
1135a36f3e9SSam Leffler.Xr crypto 9
1145a36f3e9SSam Leffler.Sh BUGS
1155a36f3e9SSam LefflerPublic key support is not implemented.
116