]> git.saurik.com Git - apple/security.git/blob - libsecurity_cryptkit/lib/ckconfig.h
Security-55471.tar.gz
[apple/security.git] / libsecurity_cryptkit / lib / ckconfig.h
1 /*
2 File: ckconfig.h
3
4 Contains: Common config info.
5
6 Written by: Doug Mitchell
7
8 Copyright: Copyright 1998 by Apple Computer, Inc.
9 All rights reserved.
10
11 Change History (most recent first):
12
13 <7> 10/06/98 ap Changed to compile with C++.
14
15 To Do:
16 */
17
18 /* Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
19 *
20 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
21 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
22 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE COMPUTER, INC. AND THE
23 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE COMPUTER,
24 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
25 * EXPOSE YOU TO LIABILITY.
26 ***************************************************************************
27 */
28
29 #ifndef _CK_CONFIG_H_
30 #define _CK_CONFIG_H_
31
32 /*
33 * Common build flags.
34 */
35 #define DEBUG_ENGINE 0
36
37 #define ENGINE_127_BITS 0 /* hard-coded 127 elliptic() */
38
39 /*
40 * These flags are set en masse, one set per target in the XCode project file or
41 * Makefile. They determine what gets compiled into the library. Every flag
42 * has to be defined for every configureation - preprocessors directives use
43 * #if, not #ifdef.
44 */
45
46 #ifdef CK_SECURITY_BUILD
47 /*
48 * Standard Security.framework build
49 */
50 #define CRYPTKIT_DER_ENABLE 1 /* DER encoding support */
51 #define CRYPTKIT_LIBMD_DIGEST 1 /* use CommonCrypto digests */
52 #define CRYPTKIT_ELL_PROJ_ENABLE 1 /* elliptic projection */
53 #define CRYPTKIT_ECDSA_ENABLE 1 /* ECDSA (requires ELL_PROJ_ENABLE) */
54 #define CRYPTKIT_CIPHERFILE_ENABLE 0 /* cipherfile w/symmetric encryption */
55 #define CRYPTKIT_SYMMETRIC_ENABLE 0 /* symmetric encryption */
56 #define CRYPTKIT_ASYMMETRIC_ENABLE 1 /* asymmetric encryption */
57 #define CRYPTKIT_MD5_ENABLE 1 /* MD5 hash */
58 #define CRYPTKIT_SHA1_ENABLE 1 /* SHA1 hash - needed for GHMAX_LEGACY */
59 #define CRYPTKIT_HMAC_LEGACY 1
60 #define CRYPTKIT_KEY_EXCHANGE 0 /* FEE key exchange */
61 #define CRYPTKIT_HIGH_LEVEL_SIG 0 /* high level one-shot signature */
62 #define CRYPTKIT_GIANT_STACK_ENABLE 0 /* cache of giants */
63
64 #elif defined(CK_STANDALONE_BUILD)
65 /*
66 * Standalone library build
67 */
68 #define CRYPTKIT_DER_ENABLE 0
69 #define CRYPTKIT_LIBMD_DIGEST 0
70 #define CRYPTKIT_ELL_PROJ_ENABLE 1
71 #define CRYPTKIT_ECDSA_ENABLE 1
72 #define CRYPTKIT_CIPHERFILE_ENABLE 1
73 #define CRYPTKIT_SYMMETRIC_ENABLE 1
74 #define CRYPTKIT_ASYMMETRIC_ENABLE 1
75 #define CRYPTKIT_MD5_ENABLE 1
76 #define CRYPTKIT_SHA1_ENABLE 1
77 #define CRYPTKIT_HMAC_LEGACY 0
78 #define CRYPTKIT_KEY_EXCHANGE 1
79 #define CRYPTKIT_HIGH_LEVEL_SIG 1
80 #define CRYPTKIT_GIANT_STACK_ENABLE 1
81
82 #elif defined(CK_MINIMUM_SIG_BUILD)
83 /*
84 * Standalone, just ElGamal signature and key generation
85 */
86 #define CRYPTKIT_DER_ENABLE 0
87 #define CRYPTKIT_LIBMD_DIGEST 0
88 #define CRYPTKIT_ELL_PROJ_ENABLE 0
89 #define CRYPTKIT_ECDSA_ENABLE 0
90 #define CRYPTKIT_CIPHERFILE_ENABLE 0
91 #define CRYPTKIT_SYMMETRIC_ENABLE 0
92 #define CRYPTKIT_ASYMMETRIC_ENABLE 0
93 #define CRYPTKIT_MD5_ENABLE 1
94 /* FIXME convert native ElGamal to use SHA1! */
95 #define CRYPTKIT_SHA1_ENABLE 0
96 #define CRYPTKIT_HMAC_LEGACY 0
97 #define CRYPTKIT_KEY_EXCHANGE 0
98 #define CRYPTKIT_HIGH_LEVEL_SIG 0
99 #define CRYPTKIT_GIANT_STACK_ENABLE 1
100
101 #else
102
103 #error You must supply a build configuration.
104 #endif
105
106 #endif /* _CK_CONFIG_H_ */