Home | History | Annotate | Line # | Download | only in opencrypto
cryptosoft.h revision 1.6.6.1
      1  1.6.6.1    jruoho /*	$NetBSD: cryptosoft.h,v 1.6.6.1 2011/06/06 09:10:04 jruoho 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.3   thorpej 			const struct swcr_comp_algo *SW_cxf;
     44      1.1  jonathan 		} SWCR_COMP;
     45      1.1  jonathan 	} SWCR_UN;
     46      1.1  jonathan 
     47      1.1  jonathan #define sw_ictx		SWCR_UN.SWCR_AUTH.SW_ictx
     48      1.1  jonathan #define sw_octx		SWCR_UN.SWCR_AUTH.SW_octx
     49      1.1  jonathan #define sw_klen		SWCR_UN.SWCR_AUTH.SW_klen
     50      1.1  jonathan #define sw_axf		SWCR_UN.SWCR_AUTH.SW_axf
     51      1.1  jonathan #define sw_kschedule	SWCR_UN.SWCR_ENC.SW_kschedule
     52      1.1  jonathan #define sw_exf		SWCR_UN.SWCR_ENC.SW_exf
     53      1.1  jonathan #define sw_cxf		SWCR_UN.SWCR_COMP.SW_cxf
     54      1.1  jonathan 
     55      1.1  jonathan 	struct swcr_data *sw_next;
     56      1.1  jonathan };
     57      1.1  jonathan 
     58      1.4    daniel #ifdef _KERNEL
     59      1.4    daniel int swcr_authcompute(struct cryptop *crp, struct cryptodesc *crd,
     60  1.6.6.1    jruoho     const struct swcr_data *sw, void *buf, int outtype);
     61      1.4    daniel #endif /* _KERNEL */
     62      1.4    daniel 
     63      1.1  jonathan #endif /* _CRYPTO_CRYPTO_H_ */
     64