I'm not sure what you mean by key dimensions. Usually when someone says
n-bit elliptic curve key, they mean the group order of the curve is n bits
long. In this case it's 233 bits (hence the name "sect233k1"). You can get 
it from the key like this:

int keylength = privkey.GetGroupParameters().GetGroupOrder().BitCount();

On Mon, Oct 14, 2002 at 09:33:05AM +0200, Francesco Cammeresi wrote:
> Hello everybody.
> 
> Just a little dummy question:
> 
> I generated a keypair in this way:
> 
>  AutoSeededRandomPool rng;
> 
>  ECPrivateKey<EC2N> privkey(rng, ASN1::sect233k1());
>  HexEncoder privkeysink(new FileSink("/root/Desktop/privkey.txt"));
>  privkey.DEREncode(privkeysink);
>  privkeysink.MessageEnd();   
> 
> 
>  ECPublicKey<EC2N> pubkey(privkey);
> 
>  HexEncoder pubkeysink(new FileSink("/root/Desktop/pubkey.txt"));
>  pubkey.DEREncode(pubkeysink);
>  pubkeysink.MessageEnd();    
> 
> 
> 
> Now I don't know the dimension (in bit or byte) of my private key (also of my 
> public key). How can I get them?
> 
> The file privkey.txt is 620 Bytes long and the pubey.txt 534 B. Are these the 
> right number I'm searching for? I don't think so. 
> Sorry for the stupid question, I tried to do by myself, but I didn't reach 
> them :-(
> 
>                               Francesco

Reply via email to