/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SOFTMAC_H
#define _SOFTMAC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include "softSession.h"
#include "softObject.h"
#define SHA256_HMAC_INTS_PER_BLOCK \
(SHA256_HMAC_BLOCK_SIZE/sizeof (uint64_t))
#define SHA512_HMAC_INTS_PER_BLOCK \
(SHA512_HMAC_BLOCK_SIZE/sizeof (uint64_t))
/* 48 (MD5 SSL pad length in bytes) + 16 (key length in bytes) = 64 */
/* 40 (SHA1 SSL pad length in bytes) + 20 (key length in bytes) = 104 */
/*
* Context for MD5-HMAC and MD5-HMAC-GENERAL mechanisms.
*/
typedef struct md5_hc_ctx {
} md5_hc_ctx_t;
/*
* Context for SHA1-HMAC and SHA1-HMAC-GENERAL mechanisms.
*/
typedef struct sha1_hc_ctx {
typedef struct sha2_hc_ctx {
/*
* Generic Context struct for HMAC.
*/
typedef struct soft_hmac_ctx {
union {
} hc_ctx_u;
/* Generic MAC envelop macros. Substitute HASH with MD5, SHA1, & SHA2 mechs */
/* Perform HASH on ipad */ \
/* Perform HASH on opad */ \
/*
* Function Prototypes.
*/
soft_object_t *, boolean_t);
#ifdef __cplusplus
}
#endif
#endif /* _SOFTMAC_H */