0 Replies Latest reply: Jul 2, 2013 3:57 AM by 906963 RSS

    setModulus for Public key RSA 2048 throw exception

    906963

      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