Hello,
> I created EC keypair via JAVA with secp160r2 template. When I looked at text
> form of public key, I saw there this:
> 
> "04666d59b1fb53c1c998c12c71731d3a36a37cd995cadeee96c156c8d7c7852b39b5fefd1fa3ce18c7"
>  
> I know that last 40 bytes present x and y number of ec point but I don't
> know what means first byte 04.
This means that this octet string has EC point (x,y) without compression.

> It's some compresion or what ?
This is information how to interpret following octets.

> Does exist some rule for generating of this byte or it's constant value ?. 
Yes, you may look at "SEC1: Elliptic Curve Cryptography" chapter 2.3.3,
in short:
 00 - point at inifinity
 02 or 03 - compressed point (depending on EC point)
 04 - uncompressed point

> In Java I created public key that menas I know ec point(x and y) and now I
> need to construct this array  of 41 bytes   
If you are going to use uncompressed point then you should create octet
string as 04|x|y (in hex). 

Best regards,
-- 
Marek Marcola <[EMAIL PROTECTED]>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to