Skip to content

Commit 9ff39cd

Browse files
author
Lucien Grondin
committed
add C macro
1 parent 4b4d1ff commit 9ff39cd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bitcoin.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ newBitcoinKey() {
129129
fi
130130
} | base58 -c
131131

132-
echo bitcoinAddress "$(dc -f secp256k1.dc -e "lG16doi$hex lMx l< 2*2^+[0]Pp")"
132+
bitcoinAddress "$(dc -f secp256k1.dc -e "lG16doi$hex lMx lCx[0]Pp")"
133133

134134
while ((${#hex} != 64))
135135
do hex="0$hex"
@@ -142,7 +142,7 @@ newBitcoinKey() {
142142
dc -f secp256k1.dc -e "lG16i$hex lMx l< 2*2^+P"
143143
else
144144
xxd -p -r <<<"30540201010420${hex}A00706052B8104000AA124032200"
145-
dc -f secp256k1.dc -e "lG16doi$hex lMx d2%2+l<* rl</r+P"
145+
dc -f secp256k1.dc -e "lG16doi$hex lMx lCx P"
146146
fi |
147147
openssl ec -inform der -check
148148

secp256k1.dc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ ly2*lIxl*xdd*lx2*l-xd_3Rlxrl-xl*xlyl-xrl<*+lCx]sD
4040
SP[q]sQ[d0!<Qd2%1=P2/l.lDxs.lLx]dSLxs#LPs#LQs#]sM[[d2%1=_q]s2 2
4141
2 8^^~dsxd3lp|rla*+lb+lRxr2=2d2%0=_]sY
4242
[2l<*2^+]sU
43+
[dl<d2%2+*rl</+]sC

0 commit comments

Comments
 (0)