8147502: Digest is incorrectly truncated for ECDSA signatures when the bit length of n is less than the field size

Truncate the digest according to the group order, not the field size

Reviewed-by: jnimeh
3 files changed