On 3/13/06, Vadym Fedyukovych <[EMAIL PROTECTED]> wrote:
> On Mon, Mar 13, 2006 at 10:34:05AM -0600, Allen Bierbaum wrote:
> > I am looking for a PKI signature system that I can use on a networking
> > system I am writing.  As such I am looking for a system with the
> > smallest key-size, key representation, and signature size.  From what
>
> At this point, it would be reasonable to specify what key (private/public)
> you need to keep compact.

I want to keep the public key compact so I can distribute it
efficiently on the network.  (it will become part of the node
identifier that is transmitted with many of the data packets).

>
> > I have read Elliptic Curve cryptopgraphy seems to be a very good fit.
> > There are references on this list and elsewhere to key sizes around
> > 128-150 bits in length.
>
> Field element representation could be around 130-190 bit size.
> This is not exactly a signature or a public key.

Maybe I should be more clear about what I need.

What I want is to create a minimal data structure that could be used
on a remote node to initialize the cryptopp representation of the
public key.  I do not need to use any formal representation that would
allow the key to be shared with other software.  I just need a way to
represent the parameters that could be used by cryptopp to create the
same key on another machine.  I can guarantee that the other node will
be running the same version of crypto and will be using the same field
parameters (??) namely ASN1::sect113r1().

>From what I understand of EC I think I probably just need a way to
share a curve point and possibly some other parameters.

> > Based on this I started using crytopp and experimenting with it's EC
> > systems.  The problem is I can't find a way to serialize a key to a
> > data buffer in a way that it is actually represented as anything close
> > to 150bits.
>
> I still think there could be something that would fit your requirements
>
> > Here is some of the code I am currently working with:
> >
> > -------------------------------------------------
> > ECIES<EC2N>::PrivateKey priv_key;
> > ECIES<EC2N>ec_enc_t::PublicKey pub_key;
> >
> > priv_key.Initialize(randPool, ASN1::sect113r1());
> > priv_key.MakePublicKey(pub_key);
> >
> > std::string priv_key_value, priv_key_comp_value,
> >                   pub_key_value, pub_key_comp_value;
> > cryptopp::StringSink priv_key_sink(priv_key_value),
> >                      priv_key_comp_sink(priv_key_comp_value),
> >                      pub_key_sink(pub_key_value),
> >                      pub_key_comp_sink(pub_key_comp_value);
> > priv_key.Save(priv_key_sink);
> > pub_key.Save(pub_key_sink);
> >
> > priv_key.AccessGroupParameters().SetPointCompression(true);
> > pub_key.AccessGroupParameters().SetPointCompression(true);
> > priv_key.Save(priv_key_comp_sink);
> > pub_key.Save(pub_key_comp_sink);
> > -----------------------------------------------------
> >
> > >From what I can tell of the code this saves the key out to the strings
> > using the BER method.  Unfortunately this leads to key length of:
> >
> > 166 bytes (1328 bits)
> > 150 bytes (1200 bits)
> > 173 bytes (1384 bits)
> > 142 bytes (1136 bits)
> >
> > This is much larger then I can use in my application.
> >
> > What I am looking for is a way to represent the EC keys in the fewest
> > number of bits possible.  My application knows that the bits represent
> > so there doesn't need to be any extra overhead that identify or
> > delimit the data.
> >
> > Can anyone point me to some code that will let me get a compact
> > representation of ec keys?
>
> Please consider to learn exactly what are you saving.
> ASN1/DER dump utility might be a way to go

Where can I find this utility?

Thanks,
Allen

>
> Good luck,
> Vadym Fedyukovych
>

Reply via email to