RSA Security 5.2.2 Projection Television User Manual


 
Chapter 7 Public-Key Operations 273
Performing Elliptic Curve Operations
Generating Acceleration Tables
An acceleration table stores precomputed versions of certain values that are
frequently used during some elliptic curve operations. Acceleration tables can speed
up certain elliptic curve operations. However, this increase in speed comes at the cost
of space, as these tables tend to be very large.
There are two types of acceleration tables in Crypto-C:
Generic acceleration table: stores values that are commonly used in many elliptic-
curve operations, including key-pair generation, Elliptic Curve Diffie-Hellman
key agreement, and ECDSA signing and verifying.
Public-key acceleration table: stores all the values stored by the generic acceleration
table, as well as additional values commonly used only in ECDSA verification.
The examples in this section are in the file
eparam.c.
Generating a Generic Acceleration Table
This acceleration table can be used to speed up key-pair generation, public-key
encryption, Elliptic Curve Diffie-Hellman key agreement, and ECDSA signing and
verifying. This table is most useful if these operations are performed repeatedly with
the same elliptic curve. The function
BuildAccelTable, used in the sample code and
defined in the file
ecparam.c, demonstrates the following steps in creating the
acceleration table.
/* This procedure takes a pointer to an A_EC_PUBLIC_KEY structure containing
* space allocated by AllocAndCopyECPubKeyInfo and frees all data allocated
* with T_malloc. */
void FreeECPubKeyInfo(pubKey)
A_EC_PUBLIC_KEY *pubKey;
{
T_free(pubKey->publicKey.data);
FreeECParamInfo(&(pubKey->curveParams));
} /* end FreeECPubKeyInfo */