]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/ellipticMeasure.h
2 File: ellipticMeasure.h
4 Contains: xxx put contents here xxx
7 Copyright: Copyright (c) 1998,2011,2014 Apple Inc.
10 Change History (most recent first):
12 <7> 10/06/98 ap Changed to compile with C++.
17 /* Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
19 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
20 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
21 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE, INC. AND THE
22 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE,
23 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
24 * EXPOSE YOU TO LIABILITY.
25 ***************************************************************************
27 * Measurement of feemods and mulgs withing an elliptic_simple() call.
33 #define ELLIPTIC_MEASURE 0
35 #define ELLIPTIC_MEASURE 0 /* always off */
40 extern int doEllMeasure
; // gather stats on/off */
42 extern int numFeeMods
;
45 #define START_ELL_MEASURE(n) \
47 bitsInN = bitlen(n); \
51 #define END_ELL_MEASURE doEllMeasure = 0;
53 #define INCR_FEEMODS \
64 * These two are used around mulg() calls in feemod() itself; they
65 * inhibit the counting of those mulg() calls.
67 #define PAUSE_ELL_MEASURE \
69 int tempEllMeasure = doEllMeasure; \
72 #define RESUME_ELL_MEASURE \
73 doEllMeasure = tempEllMeasure; \
76 #else // ELLIPTIC_MEASURE
78 #define START_ELL_MEASURE(n)
79 #define END_ELL_MEASURE
82 #define PAUSE_ELL_MEASURE
83 #define RESUME_ELL_MEASURE
85 #endif // ELLIPTIC_MEASURE