This discussion is archived
0 Replies Latest reply: Jul 2, 2013 1:57 AM by 906963 RSS

setModulus for Public key RSA 2048 throw exception

906963 Newbie
Currently Being Moderated

public RSAPublicKey Key = (RSAPublicKey)KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PUBLIC,KeyBuilder.LENGTH_RSA_2048,false);

...

static byte[] Pub = { /* 256 byte of key + 3 bytes of exponent*/ };

...

Key.setModulus(Pub, (short)0, (short)256); // Exception 6F00

Key.setExponent(Pub, (short)256, (short)3);

 

---

JavaCard v2.2

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points