Hi,

I've seen a few answers from ADI specialists, where they recommended library "MIRACL" (www.shamus.ie) to generate key pairs. I downloaded and compiled the library. I run the program esgen2 using the parameters from the file eclyptic_curve_parameters_548.ecs. Everything seemed right - the program has asked to enter the “seed” of the nine digits, and created a key pair. Private key looks fine, like this:

341E11615F3F4DBAE61D458777BDDD90084E79991

But the public key generated is too short, here's how it looks:

1 7E7F00925A44DEBF918F31A7134B76DFFA31926D4

It is not clear what the “1” before the key. It is also unclear why the length of the public key only 164 bits. while in the file lockbox_548_readme.txt is an example of where the keys are longer than twice:

In comments to the file ecsgen2.c (from MIRACL sources) reads:

“This program generates one set of public and private keys in files public.ecs and private.ecs respectively. Notice that the public key can be much shorter in this scheme, for the same security level.”

Maybe the above "unit" in reality should be understood as

00000000000000000000000000000000000000001 ?

Perhaps, the library generated a "normal" 384-bits public keys in previous versions ?

If this letter reads someone who successfully uses a MIRACL library and who was able to generate a 384-bits keys for Blackfin Lockbox, please help. If you believe that this questions can be answered only by MIRACL developers, please let me know.

Thanks in advance,

Youri

Hi Youri,

The reason why the Public key seems twice as long as the Private key in the example is because the Public Key is a vector while the Private key is a scalar value. For more information and details, refer to specification X9.63. In libararies and other code for ECC, point compression is used. The vector value for (x, y) for the Public key can be represented by just x and the least significant bit for y. With this information, y can be recreated, thus reducing the size of the public key. The readme file for the Lockbox example is showing you the public key in it's entirety. The '1' you see before the key from MIRACL is actually part of the key. It's the least significant bit in y.

Regards,

Gabby