]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/ECDSA_Profile.h
4 Contains: ECDSA Profiling support.
7 Copyright: Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
9 Change History (most recent first):
11 <7> 10/06/98 ap Changed to compile with C++.
16 /* Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
18 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
19 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
20 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE, INC. AND THE
21 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE,
22 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
23 * EXPOSE YOU TO LIABILITY.
24 ***************************************************************************
27 #ifndef _CK_ECDSA_PROFILE_H_
28 #define _CK_ECDSA_PROFILE_H_
35 #define ECDSA_PROFILE 0
37 #define ECDSA_PROFILE 0 /* always off */
38 #endif /* FEE_DEBUG */
42 #include <kern/time_stamp.h>
45 * Unlike the profiling macros in feeDebug.h, these are intended to
46 * be used for fragments of code, not entire functions.
48 #define SIGPROF_START \
50 struct tsval _profStartTime; \
51 struct tsval _profEndTime; \
52 kern_timestamp(&_profStartTime);
55 * This one goes at the end of the routine, just before the (only) return.
56 * There must be a static accumulator (an unsigned int) on a per-routine basis.
58 #define SIGPROF_END(accum) \
59 kern_timestamp(&_profEndTime); \
60 accum += (_profEndTime.low_val - _profStartTime.low_val); \
67 extern unsigned signStep1
;
68 extern unsigned signStep2
;
69 extern unsigned signStep34
;
70 extern unsigned signStep5
;
71 extern unsigned signStep67
;
72 extern unsigned signStep8
;
73 extern unsigned vfyStep1
;
74 extern unsigned vfyStep3
;
75 extern unsigned vfyStep4
;
76 extern unsigned vfyStep5
;
77 extern unsigned vfyStep6
;
78 extern unsigned vfyStep7
;
80 #else /* ECDSA_PROFILE */
83 #define SIGPROF_END(accum)
85 #endif /* ECDSA_PROFILE */
87 #endif /* _CK_ECDSA_PROFILE_H_ */