fips_post.h revision 12573:fb4ef506980f
114075Spsandoz/* 214075Spsandoz * CDDL HEADER START 314075Spsandoz * 414075Spsandoz * The contents of this file are subject to the terms of the 514075Spsandoz * Common Development and Distribution License (the "License"). 614075Spsandoz * You may not use this file except in compliance with the License. 714075Spsandoz * 814075Spsandoz * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 914075Spsandoz * or http://www.opensolaris.org/os/licensing. 1014075Spsandoz * See the License for the specific language governing permissions 1114075Spsandoz * and limitations under the License. 1214075Spsandoz * 1314075Spsandoz * When distributing Covered Code, include this CDDL HEADER in each 1414075Spsandoz * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1514075Spsandoz * If applicable, add the following below this CDDL HEADER, with the 1614075Spsandoz * fields enclosed by brackets "[]" replaced with your own identifying 1714075Spsandoz * information: Portions Copyright [yyyy] [name of copyright owner] 1814075Spsandoz * 1914075Spsandoz * CDDL HEADER END 2014075Spsandoz */ 2114075Spsandoz 2214075Spsandoz/* 2314075Spsandoz * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 2414075Spsandoz */ 2514075Spsandoz 2614075Spsandoz#ifndef _FIPS_POST_H 2714075Spsandoz#define _FIPS_POST_H 2814075Spsandoz 2914075Spsandoz#ifdef __cplusplus 3014075Spsandozextern "C" { 3114075Spsandoz#endif 3214075Spsandoz 3314075Spsandoz#define FIPS_KNOWN_HMAC_MESSAGE_LENGTH 64 /* 512-bits */ 3414075Spsandoz 3514075Spsandoz#ifdef _KERNEL 3614075Spsandoz 3714075Spsandoz#define CK_BYTE uchar_t 3814075Spsandoz#define CK_ULONG ulong_t 3914075Spsandoz#define CK_RV int 4014075Spsandoz 4114075Spsandoz#define CKR_OK CRYPTO_SUCCESS 4214075Spsandoz#define CKR_HOST_MEMORY CRYPTO_HOST_MEMORY 4314075Spsandoz#define CKR_DEVICE_ERROR CRYPTO_DEVICE_ERROR 4414075Spsandoz#define CKR_DATA_LEN_RANGE CRYPTO_DATA_LEN_RANGE 4514075Spsandoz#define CKR_ENCRYPTED_DATA_LEN_RANGE CRYPTO_ENCRYPTED_DATA_LEN_RANGE 4614075Spsandoz#define CKR_ENCRYPTED_DATA_INVALID CRYPTO_ENCRYPTED_DATA_INVALID 4714075Spsandoz#define CKR_SIGNATURE_INVALID CRYPTO_SIGNATURE_INVALID 4814075Spsandoz#define CKR_SIGNATURE_LEN_RANGE CRYPTO_SIGNATURE_LEN_RANGE 4914075Spsandoz#define CKR_ARGUMENTS_BAD CRYPTO_ARGUMENTS_BAD 5014075Spsandoz 5114075Spsandoz#else 5214075Spsandoz 5314075Spsandoz#define FIPS_RNG_XKEY_LENGTH 32 /* 256-bits */ 5414075Spsandoz#define PAIRWISE_DIGEST_LENGTH 20 /* 160-bits */ 5514075Spsandoz#define PAIRWISE_MESSAGE_LENGTH 20 /* 160-bits */ 5614075Spsandoz 5714075Spsandoz#endif /* _KERNEL */ 5814075Spsandoz 5914075Spsandoz#ifdef __cplusplus 6014075Spsandoz} 6114075Spsandoz#endif 6214075Spsandoz 6314075Spsandoz#endif /* _FIPS_POST_H */ 6414075Spsandoz