crypto.9 (211356) | crypto.9 (231564) |
---|---|
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.\" | 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 211356 2010-08-15 21:37:30Z brueffer $ | 18.\" $FreeBSD: head/share/man/man9/crypto.9 231564 2012-02-12 18:29:56Z ed $ |
19.\" 20.Dd September 19, 2007 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 | 19.\" 20.Dd September 19, 2007 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 |
29.Fn crypto_get_driverid u_int8_t | 29.Fn crypto_get_driverid uint8_t |
30.Ft int | 30.Ft int |
31.Fn crypto_register u_int32_t int u_int16_t u_int32_t "int \*[lp]*\*[rp]\*[lp]void *, u_int32_t *, struct cryptoini *\*[rp]" "int \*[lp]*\*[rp]\*[lp]void *, u_int64_t\*[rp]" "int \*[lp]*\*[rp]\*[lp]void *, struct cryptop *\*[rp]" "void *" | 31.Fn crypto_register uint32_t int uint16_t uint32_t "int \*[lp]*\*[rp]\*[lp]void *, uint32_t *, struct cryptoini *\*[rp]" "int \*[lp]*\*[rp]\*[lp]void *, uint64_t\*[rp]" "int \*[lp]*\*[rp]\*[lp]void *, struct cryptop *\*[rp]" "void *" |
32.Ft int | 32.Ft int |
33.Fn crypto_kregister u_int32_t int u_int32_t "int \*[lp]*\*[rp]\*[lp]void *, struct cryptkop *\*[rp]" "void *" | 33.Fn crypto_kregister uint32_t int uint32_t "int \*[lp]*\*[rp]\*[lp]void *, struct cryptkop *\*[rp]" "void *" |
34.Ft int | 34.Ft int |
35.Fn crypto_unregister u_int32_t int | 35.Fn crypto_unregister uint32_t int |
36.Ft int | 36.Ft int |
37.Fn crypto_unregister_all u_int32_t | 37.Fn crypto_unregister_all uint32_t |
38.Ft void 39.Fn crypto_done "struct cryptop *" 40.Ft void 41.Fn crypto_kdone "struct cryptkop *" 42.Ft int | 38.Ft void 39.Fn crypto_done "struct cryptop *" 40.Ft void 41.Fn crypto_kdone "struct cryptkop *" 42.Ft int |
43.Fn crypto_newsession "u_int64_t *" "struct cryptoini *" int | 43.Fn crypto_newsession "uint64_t *" "struct cryptoini *" int |
44.Ft int | 44.Ft int |
45.Fn crypto_freesession u_int64_t | 45.Fn crypto_freesession uint64_t |
46.Ft int 47.Fn crypto_dispatch "struct cryptop *" 48.Ft int 49.Fn crypto_kdispatch "struct cryptkop *" 50.Ft int | 46.Ft int 47.Fn crypto_dispatch "struct cryptop *" 48.Ft int 49.Fn crypto_kdispatch "struct cryptkop *" 50.Ft int |
51.Fn crypto_unblock u_int32_t int | 51.Fn crypto_unblock uint32_t int |
52.Ft "struct cryptop *" 53.Fn crypto_getreq int 54.Ft void 55.Fn crypto_freereq void 56.Bd -literal 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; | 52.Ft "struct cryptop *" 53.Fn crypto_getreq int 54.Ft void 55.Fn crypto_freereq void 56.Bd -literal 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]; | 67 uint8_t cri_iv[EALG_MAX_BLOCK_LEN]; |
68 struct cryptoini *cri_next; 69}; 70 71struct cryptodesc { 72 int crd_skip; 73 int crd_len; 74 int crd_inject; 75 int crd_flags; 76 struct cryptoini CRD_INI; 77#define crd_iv CRD_INI.cri_iv 78#define crd_key CRD_INI.cri_key 79#define crd_alg CRD_INI.cri_alg 80#define crd_klen CRD_INI.cri_klen 81 struct cryptodesc *crd_next; 82}; 83 84struct cryptop { 85 TAILQ_ENTRY(cryptop) crp_next; | 68 struct cryptoini *cri_next; 69}; 70 71struct cryptodesc { 72 int crd_skip; 73 int crd_len; 74 int crd_inject; 75 int crd_flags; 76 struct cryptoini CRD_INI; 77#define crd_iv CRD_INI.cri_iv 78#define crd_key CRD_INI.cri_key 79#define crd_alg CRD_INI.cri_alg 80#define crd_klen CRD_INI.cri_klen 81 struct cryptodesc *crd_next; 82}; 83 84struct cryptop { 85 TAILQ_ENTRY(cryptop) crp_next; |
86 u_int64_t crp_sid; | 86 uint64_t crp_sid; |
87 int crp_ilen; 88 int crp_olen; 89 int crp_etype; 90 int crp_flags; 91 caddr_t crp_buf; 92 caddr_t crp_opaque; 93 struct cryptodesc *crp_desc; 94 int (*crp_callback) (struct cryptop *); --- 8 unchanged lines hidden (view full) --- 103#define CRK_MAXPARAM 8 104 105struct cryptkop { 106 TAILQ_ENTRY(cryptkop) krp_next; 107 u_int krp_op; /* ie. CRK_MOD_EXP or other */ 108 u_int krp_status; /* return status */ 109 u_short krp_iparams; /* # of input parameters */ 110 u_short krp_oparams; /* # of output parameters */ | 87 int crp_ilen; 88 int crp_olen; 89 int crp_etype; 90 int crp_flags; 91 caddr_t crp_buf; 92 caddr_t crp_opaque; 93 struct cryptodesc *crp_desc; 94 int (*crp_callback) (struct cryptop *); --- 8 unchanged lines hidden (view full) --- 103#define CRK_MAXPARAM 8 104 105struct cryptkop { 106 TAILQ_ENTRY(cryptkop) krp_next; 107 u_int krp_op; /* ie. CRK_MOD_EXP or other */ 108 u_int krp_status; /* return status */ 109 u_short krp_iparams; /* # of input parameters */ 110 u_short krp_oparams; /* # of output parameters */ |
111 u_int32_t krp_hid; | 111 uint32_t krp_hid; |
112 struct crparam krp_param[CRK_MAXPARAM]; 113 int (*krp_callback)(struct cryptkop *); 114}; 115.Ed 116.Sh DESCRIPTION 117.Nm 118is a framework for drivers of cryptographic hardware to register with 119the kernel so --- 399 unchanged lines hidden (view full) --- 519The same will be done if all algorithms associated with a driver are 520unregistered one by one. 521.Pp 522The calling convention for the three driver-supplied routines is: 523.Pp 524.Bl -item -compact 525.It 526.Ft int | 112 struct crparam krp_param[CRK_MAXPARAM]; 113 int (*krp_callback)(struct cryptkop *); 114}; 115.Ed 116.Sh DESCRIPTION 117.Nm 118is a framework for drivers of cryptographic hardware to register with 119the kernel so --- 399 unchanged lines hidden (view full) --- 519The same will be done if all algorithms associated with a driver are 520unregistered one by one. 521.Pp 522The calling convention for the three driver-supplied routines is: 523.Pp 524.Bl -item -compact 525.It 526.Ft int |
527.Fn \*[lp]*newsession\*[rp] "void *" "u_int32_t *" "struct cryptoini *" ; | 527.Fn \*[lp]*newsession\*[rp] "void *" "uint32_t *" "struct cryptoini *" ; |
528.It 529.Ft int | 528.It 529.Ft int |
530.Fn \*[lp]*freesession\*[rp] "void *" "u_int64_t" ; | 530.Fn \*[lp]*freesession\*[rp] "void *" "uint64_t" ; |
531.It 532.Ft int 533.Fn \*[lp]*process\*[rp] "void *" "struct cryptop *" ; 534.It 535.Ft int 536.Fn \*[lp]*kprocess\*[rp] "void *" "struct cryptkop *" ; 537.El 538.Pp --- 127 unchanged lines hidden --- | 531.It 532.Ft int 533.Fn \*[lp]*process\*[rp] "void *" "struct cryptop *" ; 534.It 535.Ft int 536.Fn \*[lp]*kprocess\*[rp] "void *" "struct cryptkop *" ; 537.El 538.Pp --- 127 unchanged lines hidden --- |