Package de.flexiprovider.ec

This package holds the provider class for the elliptic curve algorithms ECDSA, ECNR, ECDH and ECIES.

See:
          Description

Class Summary
ECDSASignature This Signature class is used to provide applications the functionality of the digital signature algorithm ECDSA.
ECDSASignature.Raw ECDSA without message digest
ECDSASignature.SHA1 ECDSA with SHA1
ECDSASignature.SHA224 ECDSA with SHA224
ECDSASignature.SHA256 ECDSA with SHA256
ECDSASignature.SHA384 ECDSA with SHA384
ECDSASignature.SHA512 ECDSA with SHA512
ECIES ECIES (Elliptic Curve Integrated Encryption Scheme) extends the basic IES implementation.
ECNRSignature This Signature class is used to provide applications the functionality of the digital signature algorithm ECNR.
ECPRNG This class implements a pseudorandom number generator as proposed by Kaliski.
ECRegistry Register all algorithms of the EC package.
ECSVDPDH ECSVDPDH provides the implementation for key exchange with the Diffie Hellman algorithm on elliptic curves over the general field with p elements where p is an odd prime number.
ECSVDPDHC ECSVDPDHC provides the implementation for key exchange with the Diffie Hellman algorithm on elliptic curves GP(p), where p is an odd prime number.
ECTools  
FlexiECProvider This class is the provider for the public key algorithms based on elliptic curves.
 

Package de.flexiprovider.ec Description

This package holds the provider class for the elliptic curve algorithms ECDSA, ECNR, ECDH and ECIES. ECDSA and ECNR are public key signature algorithms, ECDH a public key exchange protocol and ECIES is a cipher.
We will give a short introduction to how to install a JCA-based provider and then explain some of the mathematical background of elliptic curves.

How to install the FlexiECProvider

There are two parts to installing a provider: installing the provider package classes, and configuring the provider.
Installing the Provider Classes
There are a couple possible ways of installing the provider classes:
  1. Place a zip or JAR file containing the classes anywhere on your CLASSPATH.
  2. Supply your provider JAR file as an "installed" or "bundled" extension.
 Configuring the Provider
The next step is to add the provider to your list of approved providers. This is done statically by editing the java.security file in the lib/security directory of the JDK. Thus, if the JDK is installed in a directory called jdk1.2, the file would be jdk1.2/lib/security/java.security. One of the types of properties you can set in java.security is of the following form:
             security.provider.n=masterClassName
This declares a provider, and specifies its preference order n. The preference order is the order in which providers are searched for requested algorithms (when no specific provider is requested). The order is 1-based; 1 is the most preferred, followed by 2, and so on.
masterClassName must specify the provider's "master" class. The provider's documentation will specify its master class. This class is always a subclass of the Provider class. The subclass constructor sets the values of various properties that are required for the Java Cryptography API to look up the algorithms or other facilities implemented by the provider.

Suppose that the master class is de.flexiprovider.ec.FlexiECProvider, and that you would like to configure FlexiECProvider as your second preferred provider. To do so, add the following line to the java.security file:

             security.provider.2=de.flexiprovider.ec.FlexiECProvider
Providers may also be registered dynamically. To do so, call either the addProvider or insertProviderAt method in the Security class. This type of registration is not persistent and can only be done by "trusted" programs.
 

Mathematical Background

To understand Elliptic Curve Cryptography (ECC) one must be familiar at least with the terms group, finite field and group or element order. We will give a short introduction to ECC.

Let Fq be a finite field with q elements. The cubic equation (Weierstraßgleichung)

E: y2z + a1 xyz + a3 yz2 = x3+a2 x2z + a4 xz2 + a6z3

defined over Fq is called an elliptic curve, if it is smooth, that means, if for all points (x : y : z) of the equation

F(x, y, z) = y2z + a1 xyz + a3 yz2 - x3 - a2 x2z - a4 xz2 - a6z3

at least one of the three formal three partial differentials dF/dx, dF/dy and dF/dz is not zero.

The finite fields mostly used in ECC are the prime fieldsFp, p prime, and the finite fields of characteristic 2, F2m. With these fields our Weierstraßgleichung gets a little bit simpler:

E: y2z = x3 + axz2 + bz3

for x, y, z, a, b in Fp and

E: y2z + yz2 = x3 + ax2z + bz3

for x, y, z, a, b in F2m. Further on we will relate only to affine coordinates.

The addition of 2 points R = P + Q is defined as follows:
Connect the points P and Q by a line l. Then mirror the 3. intersection of l with E at the x-axis. The resulting intersection-point is R.
There are two special cases:

     
  1. P = Q: When P = Q, the line l is the tangent of E at the point P.
  2. P /= Q, xP = xQ, yP /= yQ: The line l will be a perpendicular through P and Q. Then l will not intersect curve E again. In this case we call the resulting point point at infinity.
With this point addition the points on E together with the point at infinity form an abelian group. Let R = n*P, where n*P means to add P n-times on itself. Then n is the discrete logarithm of R to the base P. Given R and P it is very hard to compute n.
The problem of computing n given R and P is called the discrete logarithm problem (ECDLP). The security of elliptic curve algorithms are all based on the ECDLP.