I am trying to find the lenghth of the ECC public key. I read that the public key of ECC is about 64 bytes. I tried to test this my self but the result is different than the common one. Provided that I am using this specification (secp256k1). The code which I used to calculate the length of the public key is given below.
byte publicKeyLength [] =pk.getEncoded();
System.out.println("The Length of PK is " +publicKeyLength.length); // it prints 311 byes?
As I read in this forum it should be 64 bytes. But Why when I tested it, it gives 311 bytes?