0

I'm using https://github.com/cossacklabs/themis library for the public key generation which is providing secp256r1 curve. The problem is that PublicKey has only getBytes method but I need to get x and y coordinates. Is it possible to count them having only bytes array of the public key? I need these coordinates to implement Fido2 and according to documentation: Convert the COSE_KEY formatted credentialPublicKey to Raw ANSI X9.62 public key format.

falsetto
  • 789
  • 2
  • 11
  • 35
  • It seems that this library is creating key pairs just for its own purpose. The library is not created as a Java provider, otherwise you could e.g. cast to ECPublicKey. Why are you using this library? Is the new Bouncy Castle lib too slow? If I look at the source, the only thing you *can* do is to parse the returned byte array, or indeed change the library. – Maarten Bodewes Sep 25 '19 at 21:12
  • @MaartenBodewes how can I parse the returned byte array, is it described anywhere? – falsetto Sep 26 '19 at 07:11
  • I'm not sure of the format of the byte array that you get, I don't know that lib. And I don't know what is meant with "raw" ANSI X9.62 public key format either. Having an example preferably using hexadecimals of both would be helpful. – Maarten Bodewes Sep 26 '19 at 15:01

0 Answers0