Home | History | Annotate | Line # | Download | only in opencrypto
cryptosoft.h revision 1.5.60.1
      1  1.5.60.1      matt /*	$NetBSD: cryptosoft.h,v 1.5.60.1 2011/05/20 08:11:32 matt Exp $ */
      2       1.1  jonathan /*	$OpenBSD: cryptosoft.h,v 1.10 2002/04/22 23:10:09 deraadt Exp $	*/
      3       1.1  jonathan 
      4       1.1  jonathan /*
      5       1.1  jonathan  * The author of this code is Angelos D. Keromytis (angelos (at) cis.upenn.edu)
      6       1.1  jonathan  *
      7       1.1  jonathan  * This code was written by Angelos D. Keromytis in Athens, Greece, in
      8       1.1  jonathan  * February 2000. Network Security Technologies Inc. (NSTI) kindly
      9       1.1  jonathan  * supported the development of this code.
     10       1.1  jonathan  *
     11       1.1  jonathan  * Copyright (c) 2000 Angelos D. Keromytis
     12       1.1  jonathan  *
     13       1.1  jonathan  * Permission to use, copy, and modify this software with or without fee
     14       1.1  jonathan  * is hereby granted, provided that this entire notice is included in
     15       1.1  jonathan  * all source code copies of any software which is or includes a copy or
     16       1.1  jonathan  * modification of this software.
     17       1.1  jonathan  *
     18       1.1  jonathan  * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
     19       1.1  jonathan  * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
     20       1.1  jonathan  * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
     21       1.1  jonathan  * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
     22       1.1  jonathan  * PURPOSE.
     23       1.1  jonathan  */
     24       1.1  jonathan 
     25       1.1  jonathan #ifndef _CRYPTO_CRYPTOSOFT_H_
     26       1.1  jonathan #define _CRYPTO_CRYPTOSOFT_H_
     27       1.1  jonathan 
     28       1.1  jonathan /* Software session entry */
     29       1.1  jonathan struct swcr_data {
     30       1.1  jonathan 	int		sw_alg;		/* Algorithm */
     31       1.1  jonathan 	union {
     32       1.1  jonathan 		struct {
     33       1.1  jonathan 			u_int8_t	 *SW_ictx;
     34       1.1  jonathan 			u_int8_t	 *SW_octx;
     35       1.1  jonathan 			u_int32_t	 SW_klen;
     36       1.3   thorpej 			const struct swcr_auth_hash *SW_axf;
     37       1.1  jonathan 		} SWCR_AUTH;
     38       1.1  jonathan 		struct {
     39       1.1  jonathan 			u_int8_t	 *SW_kschedule;
     40       1.3   thorpej 			const struct swcr_enc_xform *SW_exf;
     41       1.1  jonathan 		} SWCR_ENC;
     42       1.1  jonathan 		struct {
     43       1.1  jonathan 			u_int32_t	 SW_size;
     44  1.5.60.1      matt 			u_int32_t	 SW_crc;
     45       1.3   thorpej 			const struct swcr_comp_algo *SW_cxf;
     46       1.1  jonathan 		} SWCR_COMP;
     47       1.1  jonathan 	} SWCR_UN;
     48       1.1  jonathan 
     49       1.1  jonathan #define sw_ictx		SWCR_UN.SWCR_AUTH.SW_ictx
     50       1.1  jonathan #define sw_octx		SWCR_UN.SWCR_AUTH.SW_octx
     51       1.1  jonathan #define sw_klen		SWCR_UN.SWCR_AUTH.SW_klen
     52       1.1  jonathan #define sw_axf		SWCR_UN.SWCR_AUTH.SW_axf
     53       1.1  jonathan #define sw_kschedule	SWCR_UN.SWCR_ENC.SW_kschedule
     54       1.1  jonathan #define sw_exf		SWCR_UN.SWCR_ENC.SW_exf
     55       1.1  jonathan #define sw_size		SWCR_UN.SWCR_COMP.SW_size
     56       1.1  jonathan #define sw_cxf		SWCR_UN.SWCR_COMP.SW_cxf
     57       1.1  jonathan 
     58       1.1  jonathan 	struct swcr_data *sw_next;
     59       1.1  jonathan };
     60       1.1  jonathan 
     61       1.4    daniel #ifdef _KERNEL
     62       1.4    daniel int swcr_authcompute(struct cryptop *crp, struct cryptodesc *crd,
     63       1.5  christos     struct swcr_data *sw, void *buf, int outtype);
     64       1.4    daniel #endif /* _KERNEL */
     65       1.4    daniel 
     66       1.1  jonathan #endif /* _CRYPTO_CRYPTO_H_ */
     67