1.\" $OpenBSD: crypto.9,v 1.19 2002/07/16 06:31:57 angelos Exp $
2.\"
3.\" The author of this manual page is Angelos D. Keromytis (angelos@cis.upenn.edu)
4.\"
5.\" Copyright (c) 2000, 2001 Angelos D. Keromytis
6.\"
7.\" Permission to use, copy, and modify this software with or without fee
8.\" is hereby granted, provided that this entire notice is included in
9.\" all source code copies of any software which is or includes a copy or
10.\" modification of this software.
11.\"
12.\" THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
14.\" REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
15.\" MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
16.\" PURPOSE.
17.\"
18.\" $FreeBSD: head/share/man/man9/crypto.9 158707 2006-05-17 18:44:37Z pjd $
19.\"
20.Dd May 17, 2006
21.Dt CRYPTO 9
22.Os
23.Sh NAME
24.Nm crypto
25.Nd API for cryptographic services in the kernel
26.Sh SYNOPSIS
27.In opencrypto/cryptodev.h
28.Ft int32_t
--- 28 unchanged lines hidden (view full) ---
57#define CRYPTO_SYMQ 0x1
58#define CRYPTO_ASYMQ 0x2
59
60#define EALG_MAX_BLOCK_LEN 16
61
62struct cryptoini {
63 int cri_alg;
64 int cri_klen;
65 int cri_mlen;
66 caddr_t cri_key;
67 u_int8_t cri_iv[EALG_MAX_BLOCK_LEN];
68 struct cryptoini *cri_next;
69};
70
71struct cryptodesc {
72 int crd_skip;
73 int crd_len;
--- 113 unchanged lines hidden (view full) ---
187.It Dv CRYPTO_SHA1
188.It Dv CRYPTO_SHA2_HMAC
189.It Dv CRYPTO_NULL_HMAC
190.It Dv CRYPTO_NULL_CBC
191.El
192.It Va cri_klen
193Specifies the length of the key in bits, for variable-size key
194algorithms.
195.It Va cri_mlen
196Specifies how many bytes from the calculated hash should be copied back.
1970 means entire hash.
198.It Va cri_key
199Contains the key to be used with the algorithm.
200.It Va cri_iv
201Contains an explicit initialization vector (IV), if it does not prefix
202the data.
203This field is ignored during initialization.
204If no IV is explicitly passed (see below on details), a random IV is used
205by the device driver processing the request.
--- 418 unchanged lines hidden ---
2.\"
3.\" The author of this manual page is Angelos D. Keromytis (angelos@cis.upenn.edu)
4.\"
5.\" Copyright (c) 2000, 2001 Angelos D. Keromytis
6.\"
7.\" Permission to use, copy, and modify this software with or without fee
8.\" is hereby granted, provided that this entire notice is included in
9.\" all source code copies of any software which is or includes a copy or
10.\" modification of this software.
11.\"
12.\" THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
14.\" REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
15.\" MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
16.\" PURPOSE.
17.\"
18.\" $FreeBSD: head/share/man/man9/crypto.9 158707 2006-05-17 18:44:37Z pjd $
19.\"
20.Dd May 17, 2006
21.Dt CRYPTO 9
22.Os
23.Sh NAME
24.Nm crypto
25.Nd API for cryptographic services in the kernel
26.Sh SYNOPSIS
27.In opencrypto/cryptodev.h
28.Ft int32_t
--- 28 unchanged lines hidden (view full) ---
57#define CRYPTO_SYMQ 0x1
58#define CRYPTO_ASYMQ 0x2
59
60#define EALG_MAX_BLOCK_LEN 16
61
62struct cryptoini {
63 int cri_alg;
64 int cri_klen;
65 int cri_mlen;
66 caddr_t cri_key;
67 u_int8_t cri_iv[EALG_MAX_BLOCK_LEN];
68 struct cryptoini *cri_next;
69};
70
71struct cryptodesc {
72 int crd_skip;
73 int crd_len;
--- 113 unchanged lines hidden (view full) ---
187.It Dv CRYPTO_SHA1
188.It Dv CRYPTO_SHA2_HMAC
189.It Dv CRYPTO_NULL_HMAC
190.It Dv CRYPTO_NULL_CBC
191.El
192.It Va cri_klen
193Specifies the length of the key in bits, for variable-size key
194algorithms.
195.It Va cri_mlen
196Specifies how many bytes from the calculated hash should be copied back.
1970 means entire hash.
198.It Va cri_key
199Contains the key to be used with the algorithm.
200.It Va cri_iv
201Contains an explicit initialization vector (IV), if it does not prefix
202the data.
203This field is ignored during initialization.
204If no IV is explicitly passed (see below on details), a random IV is used
205by the device driver processing the request.
--- 418 unchanged lines hidden ---