bounds-check against sk=1

+sign:schnorr crashes on `=(0 sk)`, so the bounds checking code is not
exercised for sk=0. It also crashes on `(gte sk n.domain.c)`, which is
redundant with the size check on sk, so we remove that.
This commit is contained in:
Jōshin 2022-02-03 13:21:21 -06:00
parent f07f759253
commit 4cef7dc38b
No known key found for this signature in database
GPG Key ID: A8BE5A9A521639D0
2 changed files with 2 additions and 3 deletions

View File

@ -2265,7 +2265,6 @@
~/ %sosi
|= [sk=@I m=@I a=@I]
^- @J
?> (gte 32 (met 3 sk))
?> (gte 32 (met 3 m))
?> (gte 32 (met 3 a))
=/ c curve

View File

@ -330,8 +330,8 @@
ffff.ffff.ffff.ffff.ffff.ffff.ffff.ffff
=/ cases-big-sec=(list case)
:~ [too-big 0 0 0 0]
[0 0 too-big 0 0]
[0 0 0 too-big 0]
[1 0 too-big 0 0]
[1 0 0 too-big 0]
==
=/ cases-big-pub=(list case)
:~ [0 too-big 0 0 0]