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 162404 2006-09-18 15:24:20Z ru $
19.\"
20.Dd June 4, 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
--- 260 unchanged lines hidden (view full) ---
287.Bl -tag -width ".Dv CRYPTO_F_CBIFSYNC"
288.It Dv CRYPTO_F_IMBUF
289The buffer pointed to by
290.Va crp_buf
291is an mbuf chain.
292.It Dv CRYPTO_F_IOV
293The buffer pointed to by
294.Va crp_buf
295is an
296.Vt uio
297structure.
298.It Dv CRYPTO_F_REL
299Must return data in the same place.
300.It Dv CRYPTO_F_BATCH
301Batch operation if possible.
302.It Dv CRYPTO_F_CBIMM
303Do callback immediatelly instead of doing it from a dedicated kernel thread.
304.It Dv CRYPTO_F_DONE
305Operation completed.
--- 46 unchanged lines hidden (view full) ---
352For encryption algorithms, this is where the initialization vector
353(IV) will be inserted when encrypting or where it can be found when
354decrypting (subject to
355.Va crd_flags ) .
356For MAC algorithms, this is where the result of the keyed hash will be
357inserted.
358.It Va crd_flags
359The following flags are defined:
360.Bl -tag -width 3n
361.It Dv CRD_F_ENCRYPT
362For encryption algorithms, this bit is set when encryption is required
363(when not set, decryption is performed).
364.It Dv CRD_F_IV_PRESENT
365For encryption algorithms, this bit is set when the IV already
366precedes the data, so the
367.Va crd_inject
368value will be ignored and no IV will be written in the buffer.
--- 296 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 162404 2006-09-18 15:24:20Z ru $
19.\"
20.Dd June 4, 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
--- 260 unchanged lines hidden (view full) ---
287.Bl -tag -width ".Dv CRYPTO_F_CBIFSYNC"
288.It Dv CRYPTO_F_IMBUF
289The buffer pointed to by
290.Va crp_buf
291is an mbuf chain.
292.It Dv CRYPTO_F_IOV
293The buffer pointed to by
294.Va crp_buf
295is an
296.Vt uio
297structure.
298.It Dv CRYPTO_F_REL
299Must return data in the same place.
300.It Dv CRYPTO_F_BATCH
301Batch operation if possible.
302.It Dv CRYPTO_F_CBIMM
303Do callback immediatelly instead of doing it from a dedicated kernel thread.
304.It Dv CRYPTO_F_DONE
305Operation completed.
--- 46 unchanged lines hidden (view full) ---
352For encryption algorithms, this is where the initialization vector
353(IV) will be inserted when encrypting or where it can be found when
354decrypting (subject to
355.Va crd_flags ) .
356For MAC algorithms, this is where the result of the keyed hash will be
357inserted.
358.It Va crd_flags
359The following flags are defined:
360.Bl -tag -width 3n
361.It Dv CRD_F_ENCRYPT
362For encryption algorithms, this bit is set when encryption is required
363(when not set, decryption is performed).
364.It Dv CRD_F_IV_PRESENT
365For encryption algorithms, this bit is set when the IV already
366precedes the data, so the
367.Va crd_inject
368value will be ignored and no IV will be written in the buffer.
--- 296 unchanged lines hidden ---