ECPoint

rangeli nepal <[email protected]>
Newsgroups gmane.comp.encryption.bouncy-castle.devel
Message-ID <[email protected]>
Good Evening Gentlemen,

I am trying to use java ECPoint of org.bouncycastle.ec.math package. I generate random number and create ECPoing ( public coordinates) as follows.  I am using P-256 curve. My expectation is AffineXcoordiante or AffineYCoord will be 32 bytes.
However I some time get 32 other time it gives 33. am I missing something?

Your answer will be appreciated.

Thank you.
Regards,
rn


ECPoint g = x9.getG()
ECPoint pointQ = g.multiply(privateKey); 
pointQ=pointQ.normalize();
byte[] datax1=pointQ.getAffineXCoord().toBigInteger().toByteArray();
byte[] datay1=pointQ.getAffineYCoord().toBigInteger().toByteArray();
System.out.println(“Len X=“+ datax1.length+”  Y=“+datay1.length)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.