licel / jcardsim

https://jcardsim.org
222 stars 123 forks source link

RSAPublicKey parameter accessors return index rather than length #14

Closed licel closed 10 years ago

licel commented 10 years ago

From erick...@bitflash.net on September 13, 2013 03:05:06

The jCardSim implementation of methods to get parameters like the modulus or public exponent of an RSA key return the index of the byte after the copied value.

This is consistent with many other javacard APIs, like Util.arrayCopy(). Unfortunately, it is incorrect.

These methods are specified to return "the byte length of the modulus value returned." In other words, they result in the number of bytes copied to the array, not an offset into the array. These methods produce incorrect results with a non-zero offset argument.

Original issue: http://code.google.com/p/jcardsim/issues/detail?id=14

licel commented 10 years ago

From jcard...@licel.ru on September 17, 2013 15:14:44

Status: Accepted

licel commented 10 years ago

From jcard...@licel.ru on September 20, 2013 10:14:39

fixed at r14

Status: Fixed