diff options
| author | J08nY | 2025-12-03 18:08:28 +0100 |
|---|---|---|
| committer | J08nY | 2025-12-03 18:08:43 +0100 |
| commit | eaabd6980f268c920bef20f0c7bb4472c8cb7471 (patch) | |
| tree | d487859f87ed96d8e4c08ad472ada7491ae25241 | |
| parent | bfccf8f955d6634e7a067feda81645d07b90c5ab (diff) | |
| download | std-curves-eaabd6980f268c920bef20f0c7bb4472c8cb7471.tar.gz std-curves-eaabd6980f268c920bef20f0c7bb4472c8cb7471.tar.zst std-curves-eaabd6980f268c920bef20f0c7bb4472c8cb7471.zip | |
Bump bitsize for oversized curves.
| -rwxr-xr-x | .github/workflows/validate.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/.github/workflows/validate.sh b/.github/workflows/validate.sh index 1654609..c086262 100755 --- a/.github/workflows/validate.sh +++ b/.github/workflows/validate.sh @@ -61,6 +61,7 @@ for directory in $(ls -d */); do echo "Checking $directory$name" bits=$(echo "$curve" | jq -r ".field.bits") + a=$(echo "$curve" | jq -r ".params.a.raw") b=$(echo "$curve" | jq -r ".params.b.raw") n=$(echo "$curve" | jq -r ".order") @@ -76,6 +77,10 @@ for directory in $(ls -d */); do a_reduced=$(echo "ibase=16;obase=10; $(to_bc $a) % $(to_bc $p)" | bc | from_bc) b_reduced=$(echo "ibase=16;obase=10; $(to_bc $b) % $(to_bc $p)" | bc | from_bc) computed_curve=$(echo -e "$p\n$a_reduced\n$b_reduced\n" | ./ecgen-static --fp $bits 2>/dev/null) + if [ "$?" -ne 0 ]; then + bits=$((bits+1)) + computed_curve=$(echo -e "$p\n$a_reduced\n$b_reduced\n" | ./ecgen-static --fp $bits 2>/dev/null) + fi ;; Binary) @@ -106,6 +111,6 @@ for directory in $(ls -d */); do done done -if [ $errors -ne 0 ]; then - exit 1 +if [ "$errors" != 0 ]; then + exit 1 fi |
