ECDSA signature values (sometimes) too small

Issue #6 resolved
Brian Campbell repo owner created an issue

http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-24#section-3.4 says that the signature values must be 64, 96 and 132 octets in length for ES256, ES384 and ES512 respectively. However the integer values of R & S sometimes are not always big enough to use the full size and EcdsaUsingShaAlgorithm isn't currently padding them with zero bytes to the the full length.

Comments (2)

  1. Brian Campbell reporter

    fixed with e5a66b1 "The integer values of R & S in the ECDSA signature value are sometimes are not big enough to use the full size and EcdsaUsingShaAlgorithm needs to pad them with zero bytes to the the full length of 64, 96 and 132 octets for ES256, ES384 and ES512 respectively per http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-25#section-3.4 which addresses https://bitbucket.org/b_c/jose4j/issue/6/ecdsa-signature-values-sometimes-too-small"

  2. Log in to comment