]>
git.saurik.com Git - apple/security.git/blob - libsecurity_cryptkit/lib/ellipticMeasure.h
2 File: ellipticMeasure.h
4 Contains: xxx put contents here xxx
6 Written by: Doug Mitchell
8 Copyright: Copyright 1998 by Apple Computer, Inc.
11 Change History (most recent first):
13 <7> 10/06/98 ap Changed to compile with C++.
18 /* Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
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 ***************************************************************************
28 * Measurement of feemods and mulgs withing an elliptic_simple() call.
34 #define ELLIPTIC_MEASURE 0
36 #define ELLIPTIC_MEASURE 0 /* always off */
41 extern int doEllMeasure
; // gather stats on/off */
43 extern int numFeeMods
;
46 #define START_ELL_MEASURE(n) \
48 bitsInN = bitlen(n); \
52 #define END_ELL_MEASURE doEllMeasure = 0;
54 #define INCR_FEEMODS \
65 * These two are used around mulg() calls in feemod() itself; they
66 * inhibit the counting of those mulg() calls.
68 #define PAUSE_ELL_MEASURE \
70 int tempEllMeasure = doEllMeasure; \
73 #define RESUME_ELL_MEASURE \
74 doEllMeasure = tempEllMeasure; \
77 #else // ELLIPTIC_MEASURE
79 #define START_ELL_MEASURE(n)
80 #define END_ELL_MEASURE
83 #define PAUSE_ELL_MEASURE
84 #define RESUME_ELL_MEASURE
86 #endif // ELLIPTIC_MEASURE