cryptosoft.h revision 139825
1104476Ssam/* $FreeBSD: head/sys/opencrypto/cryptosoft.h 139825 2005-01-07 02:29:27Z imp $ */ 2104476Ssam/* $OpenBSD: cryptosoft.h,v 1.10 2002/04/22 23:10:09 deraadt Exp $ */ 3104476Ssam 4139825Simp/*- 5104476Ssam * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) 6104476Ssam * 7104476Ssam * This code was written by Angelos D. Keromytis in Athens, Greece, in 8104476Ssam * February 2000. Network Security Technologies Inc. (NSTI) kindly 9104476Ssam * supported the development of this code. 10104476Ssam * 11104476Ssam * Copyright (c) 2000 Angelos D. Keromytis 12104476Ssam * 13104476Ssam * Permission to use, copy, and modify this software with or without fee 14104476Ssam * is hereby granted, provided that this entire notice is included in 15104476Ssam * all source code copies of any software which is or includes a copy or 16104476Ssam * modification of this software. 17104476Ssam * 18104476Ssam * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR 19104476Ssam * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY 20104476Ssam * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE 21104476Ssam * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR 22104476Ssam * PURPOSE. 23104476Ssam */ 24104476Ssam 25104476Ssam#ifndef _CRYPTO_CRYPTOSOFT_H_ 26104476Ssam#define _CRYPTO_CRYPTOSOFT_H_ 27104476Ssam 28104476Ssam/* Software session entry */ 29104476Ssamstruct swcr_data { 30104476Ssam int sw_alg; /* Algorithm */ 31104476Ssam union { 32104476Ssam struct { 33104476Ssam u_int8_t *SW_ictx; 34104476Ssam u_int8_t *SW_octx; 35104476Ssam u_int32_t SW_klen; 36104476Ssam struct auth_hash *SW_axf; 37104476Ssam } SWCR_AUTH; 38104476Ssam struct { 39104476Ssam u_int8_t *SW_kschedule; 40104476Ssam struct enc_xform *SW_exf; 41104476Ssam } SWCR_ENC; 42104476Ssam struct { 43104476Ssam u_int32_t SW_size; 44104476Ssam struct comp_algo *SW_cxf; 45104476Ssam } SWCR_COMP; 46104476Ssam } SWCR_UN; 47104476Ssam 48104476Ssam#define sw_ictx SWCR_UN.SWCR_AUTH.SW_ictx 49104476Ssam#define sw_octx SWCR_UN.SWCR_AUTH.SW_octx 50104476Ssam#define sw_klen SWCR_UN.SWCR_AUTH.SW_klen 51104476Ssam#define sw_axf SWCR_UN.SWCR_AUTH.SW_axf 52104476Ssam#define sw_kschedule SWCR_UN.SWCR_ENC.SW_kschedule 53104476Ssam#define sw_exf SWCR_UN.SWCR_ENC.SW_exf 54104476Ssam#define sw_size SWCR_UN.SWCR_COMP.SW_size 55104476Ssam#define sw_cxf SWCR_UN.SWCR_COMP.SW_cxf 56104476Ssam 57104476Ssam struct swcr_data *sw_next; 58104476Ssam}; 59104476Ssam 60104476Ssam#ifdef _KERNEL 61104476Ssamextern u_int8_t hmac_ipad_buffer[64]; 62104476Ssamextern u_int8_t hmac_opad_buffer[64]; 63104476Ssam#endif /* _KERNEL */ 64104476Ssam 65104476Ssam#endif /* _CRYPTO_CRYPTO_H_ */ 66