2007-03-04 08:59:00 +03:00
|
|
|
/* $NetBSD: cryptosoft.h,v 1.5 2007/03/04 06:03:40 christos Exp $ */
|
2003-07-26 01:12:39 +04:00
|
|
|
/* $OpenBSD: cryptosoft.h,v 1.10 2002/04/22 23:10:09 deraadt Exp $ */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
|
|
|
|
*
|
|
|
|
* This code was written by Angelos D. Keromytis in Athens, Greece, in
|
|
|
|
* February 2000. Network Security Technologies Inc. (NSTI) kindly
|
|
|
|
* supported the development of this code.
|
|
|
|
*
|
|
|
|
* Copyright (c) 2000 Angelos D. Keromytis
|
|
|
|
*
|
|
|
|
* Permission to use, copy, and modify this software with or without fee
|
|
|
|
* is hereby granted, provided that this entire notice is included in
|
|
|
|
* all source code copies of any software which is or includes a copy or
|
|
|
|
* modification of this software.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
|
|
|
|
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
|
|
|
|
* MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
|
|
|
|
* PURPOSE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CRYPTO_CRYPTOSOFT_H_
|
|
|
|
#define _CRYPTO_CRYPTOSOFT_H_
|
|
|
|
|
|
|
|
/* Software session entry */
|
|
|
|
struct swcr_data {
|
|
|
|
int sw_alg; /* Algorithm */
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
u_int8_t *SW_ictx;
|
|
|
|
u_int8_t *SW_octx;
|
|
|
|
u_int32_t SW_klen;
|
2005-11-25 19:16:46 +03:00
|
|
|
const struct swcr_auth_hash *SW_axf;
|
2003-07-26 01:12:39 +04:00
|
|
|
} SWCR_AUTH;
|
|
|
|
struct {
|
|
|
|
u_int8_t *SW_kschedule;
|
2005-11-25 19:16:46 +03:00
|
|
|
const struct swcr_enc_xform *SW_exf;
|
2003-07-26 01:12:39 +04:00
|
|
|
} SWCR_ENC;
|
|
|
|
struct {
|
|
|
|
u_int32_t SW_size;
|
2005-11-25 19:16:46 +03:00
|
|
|
const struct swcr_comp_algo *SW_cxf;
|
2003-07-26 01:12:39 +04:00
|
|
|
} SWCR_COMP;
|
|
|
|
} SWCR_UN;
|
|
|
|
|
|
|
|
#define sw_ictx SWCR_UN.SWCR_AUTH.SW_ictx
|
|
|
|
#define sw_octx SWCR_UN.SWCR_AUTH.SW_octx
|
|
|
|
#define sw_klen SWCR_UN.SWCR_AUTH.SW_klen
|
|
|
|
#define sw_axf SWCR_UN.SWCR_AUTH.SW_axf
|
|
|
|
#define sw_kschedule SWCR_UN.SWCR_ENC.SW_kschedule
|
|
|
|
#define sw_exf SWCR_UN.SWCR_ENC.SW_exf
|
|
|
|
#define sw_size SWCR_UN.SWCR_COMP.SW_size
|
|
|
|
#define sw_cxf SWCR_UN.SWCR_COMP.SW_cxf
|
|
|
|
|
|
|
|
struct swcr_data *sw_next;
|
|
|
|
};
|
|
|
|
|
2007-02-17 03:28:23 +03:00
|
|
|
#ifdef _KERNEL
|
|
|
|
int swcr_authcompute(struct cryptop *crp, struct cryptodesc *crd,
|
2007-03-04 08:59:00 +03:00
|
|
|
struct swcr_data *sw, void *buf, int outtype);
|
2007-02-17 03:28:23 +03:00
|
|
|
#endif /* _KERNEL */
|
|
|
|
|
2003-07-26 01:12:39 +04:00
|
|
|
#endif /* _CRYPTO_CRYPTO_H_ */
|