ecc_verify_hash_raw fails when not using Shamir method and provided hash is all zeros #116

Closed
opened 2016-04-28 19:31:43 -05:00 by dgarske · 2 comments
dgarske commented 2016-04-28 19:31:43 -05:00 (Migrated from github.com)

The math for handling the ECC verify with a hash with null characters, such as {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} and hashlen = 20. This results in an invalid signature verification (v != r). This only happens if the traditional (non Shamir) method is used to calculate "u1_mG + u2_mQ = mG".

This happens when calling "ecc_verify_hash_raw" and not using Shamir method (ecc_mul2add == NULL) and provided hash is all zeros.

Has anyone seen this or have any idea how to resolve the math?

The math for handling the ECC verify with a hash with null characters, such as {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} and hashlen = 20. This results in an invalid signature verification (v != r). This only happens if the traditional (non Shamir) method is used to calculate "u1_mG + u2_mQ = mG". This happens when calling "ecc_verify_hash_raw" and not using Shamir method (ecc_mul2add == NULL) and provided hash is all zeros. Has anyone seen this or have any idea how to resolve the math?
sjaeckel commented 2017-06-27 07:17:06 -05:00 (Migrated from github.com)

@karel-m how should we proceed with this issue regarding the release?

@karel-m how should we proceed with this issue regarding the release?
karel-m commented 2026-04-23 16:02:48 -05:00 (Migrated from github.com)
solution commited to https://github.com/libtom/libtomcrypt/pull/446
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libtom/libtomcrypt#116
No description provided.