In ECC public key is a point on curve with coordinates (x,y)
In uncompressed format it is 65 bytes : [0x04] [32 bytes of X] [32 bytes of Y]
But as long as X can be delivered from Y, you can omit Y. It is called 'compressed format':
[02 if Y is even | 03 if Y is odd] [32 bytes of X]
Total 33 bytes long.
If key is only 32 bytes long -- then it is just point X. If you'll add 02 or 03 in front then you'll get compressed format - which can be used in different Crypto APIs.
In uncompressed format it is 65 bytes : [0x04] [32 bytes of X] [32 bytes of Y]
But as long as X can be delivered from Y, you can omit Y. It is called 'compressed format':
[02 if Y is even | 03 if Y is odd] [32 bytes of X]
Total 33 bytes long.
If key is only 32 bytes long -- then it is just point X. If you'll add 02 or 03 in front then you'll get compressed format - which can be used in different Crypto APIs.
No comments:
Post a Comment