Skip to content

Commit fc53320

Browse files
author
Lucien Grondin
committed
do not depend on secp256k1.dc file
1 parent 5bba59a commit fc53320

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/secp256k1.t

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ do
1313
uv="${REPLY^^}"
1414
u="${uv:0:64}"
1515
v="${uv:64}"
16-
if [[ "$(dc -f secp256k1.dc -e "16doi $u dsu $v dsv +ln%sw lgxlul;x lgxlvl;x lPxlfx r2%+ lgxlwl;xlfxr2%+ -p")" = 0 ]]
16+
if [[ "$(dc -e "${secp256k1}16doi $u dsu $v dsv +ln%sw lgxlul;x lgxlvl;x lPxlfx r2%+ lgxlwl;xlfxr2%+ -p")" = 0 ]]
1717
then echo "ok $t - (u + v)G = uG + vG"
1818
else echo "not ok $t - (u + v)G != uG + vG"
1919
fi
@@ -23,7 +23,7 @@ done
2323
while read -r e p
2424
do
2525
((t++))
26-
if [[ "$(dc -f secp256k1.dc -e "16doi lgx $e l;x lex")" = "$p" ]]
26+
if [[ "$(dc -e "${secp256k1}16doi lgx $e l;x lex")" = "$p" ]]
2727
then echo "ok $t - 0x$e*G = $p"
2828
else echo "not ok $t - 0x$e*G != $p"
2929
fi
@@ -36,7 +36,7 @@ EDGES
3636
{
3737
grep '^[kxy] =' |
3838
cut -d ' ' -f 3 | {
39-
coproc DC { dc -f secp256k1.dc -; }
39+
coproc DC { dc -e "$secp256k1" -; }
4040
trap 'echo q >&"${DC[1]}"' EXIT
4141
while
4242
read -r k

0 commit comments

Comments
 (0)