fido-alliance / iot-fdo-conformance-tools

FIDO Alliances Reference FDO Implementation and Conformance Testing
https://fidoalliance.org/intro-to-fido-device-onboard/
Other
5 stars 2 forks source link

[BUG] Failed to parse Cose signature #44

Closed quanvincss closed 1 year ago

quanvincss commented 1 year ago

To simplify issue resolution process, please provide network logs, and or test voucher. f1d0fd00eb104ea5b97286286aefac1b.voucher.txt

What part of the spec are you testing?

What protocol are having issue with?

Issue description

yackermann commented 1 year ago

I can not reproduce this issue. I am getting consistent 64byte signature output

yackermann commented 1 year ago

@quanvincss since the change in #8, try reeseeding DB, and running tests again.

quanvincss commented 1 year ago

I can not reproduce this issue. I am getting consistent 64byte signature output

Even if I do reseeding the DB, or I can't reproduce this issue "several" times, the issue still exists, with the big length of r and s, you may need to try thousands of times or even more to see. But it is possible to check and add 0 padding to r and s to their maximum size https://github.com/fido-alliance/fdo-fido-conformance-server/blob/62b74d9157cc270af551e779310f92c9eb70626c/core/shared/signing.crypto.go#L247

yackermann commented 1 year ago

I will add additional check when generating r/s

On Mon, 2 Oct 2023 at 5:58 PM, quanvincss @.***> wrote:

I can not reproduce this issue. I am getting consistent 64byte signature output

Even if I do reseeding the DB, or I can't reproduce this issue "several" times, the issue still exists, with the big length of r and s, you may need to try thousands of times or even more to see. But it is possible to check and add 0 padding to r and s to their maximum size

https://github.com/fido-alliance/fdo-fido-conformance-server/blob/62b74d9157cc270af551e779310f92c9eb70626c/core/shared/signing.crypto.go#L247

— Reply to this email directly, view it on GitHub https://github.com/fido-alliance/fdo-fido-conformance-server/issues/44#issuecomment-1742400933, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPOFGWBPN4QCCEJ6QKNGLX5JCXBANCNFSM6AAAAAA5HMFJEI . You are receiving this because you were assigned.Message ID: @.*** com>

yackermann commented 1 year ago

I ran over 100,000 runs. All signatures validate, and no issues with the size no more!

ECDSA can be weird...

quanvincss commented 1 year ago

Nice!