Performing Elliptic Curve Operations

Performing Elliptic Curve Operations

Elliptic curve cryptosystems can be used for a number of public-key operations. Crypto-C supports the following elliptic curve features:

Generation of elliptic curve parameters

Elliptic curve key pair generation

Elliptic Curve Signature Schemes (ECDSA)

Elliptic Curve Authenticated Encryption Scheme (ECAES)

Elliptic Curve Diffie-Hellman key agreement (ECDH)

Crypto-C also allows you to generate precomputed acceleration tables to speed up certain elliptic curve operations.

For a description of elliptic curve parameters and algorithms, see “Elliptic Curve Cryptography” on page 65.

Generating Elliptic Curve Parameters

Before you can perform any elliptic curve operations, you must create the parameters for the curve that you will be using. Once you have generated elliptic curve parameters, you can use the parameters to: generate a key pair, to create an acceleration table, or to perform Elliptic Curve Diffie-Hellman (ECDH) key agreement. The same elliptic curve parameters can be used for multiple operations. See “Elliptic Curve Parameters” on page 66 for more information.

You need to make some choices about the kind of elliptic curve you want to use. You need to choose what to use for a base field: an odd prime finite field or a field of even characteristic. If you choose a field of even characteristic, you also have to choose what type of basis you want to use. You also have to choose the number of bits that you want for the length of an element in the field.

For this example, you will use an odd prime field for the base field. The example in this section corresponds to the file ecparam.c.

Step 1: Creating an Algorithm Object

You need to create two algorithm objects. The first, paramGenObj, is initialized by the programmer prior to the parameter generation operation; it is used to hold information necessary to generate parameters.

2 6 0

R S A B S A F E C r y p t o - C D e v e l o p e r ’s G u i d e

Page 282
Image 282
RSA Security 5.2.2 manual Performing Elliptic Curve Operations, Generating Elliptic Curve Parameters