It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
s=(z+rd)/k
sk=z+rd
sk-z=rd
(sk-z)/r=d
(s/r)k-(z/r)=d
(z/r)+d=(s/r)k
k=((z/r)+d)*(r/s)
z/r=random
r/s=random
z/r=120_bit_number_v1
r/s=120_bit_number_v2
k=(120_bit_number_v1+d)*120_bit_number_v2
def generates_signatures(curve):
puzzle120=int("00000000000000000000000000000000007fffffffffffffffffffffffffffff",16) #119-bit to be 100% sure to not fall into 241-bit range
known_bits=16
n_value=ecdsa_lib.curve_n(curve)
Q_point=[93499419120076195219278579763555015417347613618260420189054155605804414805552,19494200143356336257404688340550956357466777176798681646526975620299854296492]
sigs = []
for index in range(100):
binaryIndex=(index*2).to_bytes(32,'big')
binaryIndex2=(index*2+1).to_bytes(32,'big')
hashedIndex=ecdsa_lib.sha2_int(binaryIndex)
hashedIndex2=ecdsa_lib.sha2_int(binaryIndex2)
z_value_with_r=(hashedIndex%puzzle120)
added_point=ecdsa_lib.privkey_to_pubkey(z_value_with_r,curve)
final_point=add_point(Q_point[0],Q_point[1],added_point[0],added_point[1])
r_value_with_s=(hashedIndex2%puzzle120)
R_point=multiply_point(final_point[0],final_point[1],r_value_with_s)
r_value=R_point[0]
s_value_with_r=ecdsa_lib.inverse_mod(r_value_with_s,n_value)
s_value=(s_value_with_r*r_value)%n_value
z_value=(z_value_with_r*r_value)%n_value
sigs.append(
{
"r": r_value,
"s": s_value,
"kp": 0,
"hash": z_value
}
)
ret = {
"curve": curve.upper(),
"public_key": Q_point,
"known_type": "MSB",
"known_bits": known_bits,
"signatures": sigs,
}
return ret
[code]I have rewrite code for sagemath
from hashlib import sha256
import struct
p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
a = 0
b = 7
G = (0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798, 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8)
n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
E = EllipticCurve(GF(p), [a, b])
G = E(G)
def bytes_to_long(s):
"""bytes_to_long(strinng) : long
Convert a byte string to a long integer.
This is (essentially) the inverse of long_to_bytes().
"""
acc = 0L
unpack = struct.unpack
length = len(s)
if length % 4:
extra = (4 - length % 4)
s = b('\000') * extra + s
length = length + extra
for i in range(0, length, 4):
acc = (acc << 32) + unpack('>I', s[i:i+4])[0]
return acc
def H(m):
h = sha256()
h.update(m)
return bytes_to_long(h.digest())
def egcd(a, b):
"Euclidean greatest common divisor"
if a == 0:
return (b, 0, 1)
else:
g, y, x = egcd(b % a, a)
return (g, x - (b // a) * y, y)
def modinv(a, m):
"Modular inverse"
# in Python 3.8 you can simply return pow(a,-1,m)
g, x, y = egcd(a, m)
if g != 1:
raise Exception('modular inverse does not exist')
else:
return x % m
def verify(pub,r, s, m):
v1 = m*modinv(s, n) % n
v2 = r*modinv(s, n) % n
V = v1*G + v2*pub
x,y=V.xy()
return int(x) % n == r,hex(int(v1)),hex(int(v2))
def calc_k(num,r,s,z):
k=(r*num + z)*modinv(s,n)%n
return k,n-k
sign=[]
ge=[]
def calc_x(a,b,r,s,z):
#x1 = (z1 -b)*modinv(a*s1-r1,n)%n
x_a =(z -b)%n
x_b=(a*s-r)%n
if x_b != 0:
return (x_a*modinv(x_b,n)%n)%n
return 0
def generates_signatures():
puzzle120=16
n_value=n
sigs = []
private=50
Qp=private*G
for index in range(130):
print("---- index",index)
binaryIndex=int((index*3)).to_bytes(32,'big')
binaryIndex2=int((index*2+1)).to_bytes(32,'big')
hashedIndex=H(binaryIndex)
hashedIndex2=H(binaryIndex2)
z_value_with_r=(hashedIndex%puzzle120)
added_point= int(z_value_with_r)*G
final_point=Qp+added_point
r_value_with_s=(hashedIndex2%puzzle120)
print(r_value_with_s)
if r_value_with_s!=0:
R_point=final_point*int(r_value_with_s)
x,y=R_point.xy()
r_value=int(x)
s_value_with_r=int(modinv(r_value_with_s,n)%n)
s_value=int((s_value_with_r*r_value)%n)
z_value=((z_value_with_r*r_value)%n)
print("r", r_value)
print("s", s_value)
print("hash", z_value)
k,k1=calc_k(private,r_value,s_value,z_value)
print("k",k,k1)
print("k",hex(k),hex(k1))
print(verify(Qp,r_value,s_value,z_value))
wy,b,a=verify(Qp,r_value,s_value,z_value)
x=calc_x(int(a,16),int(b,16),int(r_value),int(s_value),int(z_value))
print("x",x)
k,k1=calc_k(x,r_value,s_value,z_value)
print("k",k,k1)
print("k",hex(k),hex(k1))
t=tuple([r_value,s_value,z_value])
if t not in sign:
sign.append(t)
for le in range(0,1000):
k2=(k*2**le)%n
ge.append(int(k2))
ge.append(int(n-k2))
generates_signatures()
---- index 18
9
r 63933145574282734898435981717146773918756897333098319278256437952015461322467
s 97164196692832900318159208530884680987624427476291405550721397771404732420314
hash 0
k 450 115792089237316195423570985008687907852837564279074904382605163141518161493887
k 0x1c2 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0363f7f
(True, '0x0', '0x9')
x 0
---- index 18
37929
r 106052440004676334409650332163651951923042923173423795888106072423870533309482
s 86487388237072824922585675463188678676341543446573502861944943782026730667995
hash 110763458801388154151046907647238024857062280457110140174709389756661623888001
k 1495388754 115792089237316195423570985008687907852837564279074904382605163141516666105583
k 0x5921d252 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8c77146eef
(True, '0x5904e250', '0x9429')
x 0
k 1493492304 115792089237316195423570985008687907852837564279074904382605163141516668002033
k 0x5904e250 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8c77315ef1
---- index 19
21317
r 18103990796095223393229492283858137777181144560247153354193996653271708547693
s 71995424062587838315307175718789388226264777318544777869325093881612562000023
hash 74553635558632807494232092124236529938587320104480240499961671012084809061673
k 139541082 115792089237316195423570985008687907852837564279074904382605163141518021953255
k 0x8513a5a 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cc7e506e7
(True, '0x840f6e0', '0x5345')
x 0
k 138475232 115792089237316195423570985008687907852837564279074904382605163141518023019105
k 0x840f6e0 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cc7f54a61
[code]I have rewrite code for sagemath
from hashlib import sha256
import struct
p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
a = 0
b = 7
G = (0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798, 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8)
n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
E = EllipticCurve(GF(p), [a, b])
G = E(G)
def bytes_to_long(s):
"""bytes_to_long(strinng) : long
Convert a byte string to a long integer.
This is (essentially) the inverse of long_to_bytes().
"""
acc = 0L
unpack = struct.unpack
length = len(s)
if length % 4:
extra = (4 - length % 4)
s = b('\000') * extra + s
length = length + extra
for i in range(0, length, 4):
acc = (acc << 32) + unpack('>I', s[i:i+4])[0]
return acc
def H(m):
h = sha256()
h.update(m)
return bytes_to_long(h.digest())
def egcd(a, b):
"Euclidean greatest common divisor"
if a == 0:
return (b, 0, 1)
else:
g, y, x = egcd(b % a, a)
return (g, x - (b // a) * y, y)
def modinv(a, m):
"Modular inverse"
# in Python 3.8 you can simply return pow(a,-1,m)
g, x, y = egcd(a, m)
if g != 1:
raise Exception('modular inverse does not exist')
else:
return x % m
def verify(pub,r, s, m):
v1 = m*modinv(s, n) % n
v2 = r*modinv(s, n) % n
V = v1*G + v2*pub
x,y=V.xy()
return int(x) % n == r,hex(int(v1)),hex(int(v2))
def calc_k(num,r,s,z):
k=(r*num + z)*modinv(s,n)%n
return k,n-k
sign=[]
ge=[]
def calc_x(a,b,r,s,z):
#x1 = (z1 -b)*modinv(a*s1-r1,n)%n
x_a =(z -b)%n
x_b=(a*s-r)%n
if x_b != 0:
return (x_a*modinv(x_b,n)%n)%n
return 0
def generates_signatures():
puzzle120=16
n_value=n
sigs = []
private=50
Qp=private*G
for index in range(130):
print("---- index",index)
binaryIndex=int((index*3)).to_bytes(32,'big')
binaryIndex2=int((index*2+1)).to_bytes(32,'big')
hashedIndex=H(binaryIndex)
hashedIndex2=H(binaryIndex2)
z_value_with_r=(hashedIndex%puzzle120)
added_point= int(z_value_with_r)*G
final_point=Qp+added_point
r_value_with_s=(hashedIndex2%puzzle120)
print(r_value_with_s)
if r_value_with_s!=0:
R_point=final_point*int(r_value_with_s)
x,y=R_point.xy()
r_value=int(x)
s_value_with_r=int(modinv(r_value_with_s,n)%n)
s_value=int((s_value_with_r*r_value)%n)
z_value=((z_value_with_r*r_value)%n)
print("r", r_value)
print("s", s_value)
print("hash", z_value)
k,k1=calc_k(private,r_value,s_value,z_value)
print("k",k,k1)
print("k",hex(k),hex(k1))
print(verify(Qp,r_value,s_value,z_value))
wy,b,a=verify(Qp,r_value,s_value,z_value)
x=calc_x(int(a,16),int(b,16),int(r_value),int(s_value),int(z_value))
print("x",x)
k,k1=calc_k(x,r_value,s_value,z_value)
print("k",k,k1)
print("k",hex(k),hex(k1))
t=tuple([r_value,s_value,z_value])
if t not in sign:
sign.append(t)
for le in range(0,1000):
k2=(k*2**le)%n
ge.append(int(k2))
ge.append(int(n-k2))
generates_signatures()
---- index 18
9
r 63933145574282734898435981717146773918756897333098319278256437952015461322467
s 97164196692832900318159208530884680987624427476291405550721397771404732420314
hash 0
k 450 115792089237316195423570985008687907852837564279074904382605163141518161493887
k 0x1c2 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0363f7f
(True, '0x0', '0x9')
x 0
[code]I have rewrite code for sagemath
from hashlib import sha256
import struct
p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
a = 0
b = 7
G = (0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798, 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8)
n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
E = EllipticCurve(GF(p), [a, b])
G = E(G)
def bytes_to_long(s):
"""bytes_to_long(strinng) : long
Convert a byte string to a long integer.
This is (essentially) the inverse of long_to_bytes().
"""
acc = 0L
unpack = struct.unpack
length = len(s)
if length % 4:
extra = (4 - length % 4)
s = b('\000') * extra + s
length = length + extra
for i in range(0, length, 4):
acc = (acc << 32) + unpack('>I', s[i:i+4])[0]
return acc
def H(m):
h = sha256()
h.update(m)
return bytes_to_long(h.digest())
def egcd(a, b):
"Euclidean greatest common divisor"
if a == 0:
return (b, 0, 1)
else:
g, y, x = egcd(b % a, a)
return (g, x - (b // a) * y, y)
def modinv(a, m):
"Modular inverse"
# in Python 3.8 you can simply return pow(a,-1,m)
g, x, y = egcd(a, m)
if g != 1:
raise Exception('modular inverse does not exist')
else:
return x % m
def verify(pub,r, s, m):
v1 = m*modinv(s, n) % n
v2 = r*modinv(s, n) % n
V = v1*G + v2*pub
x,y=V.xy()
return int(x) % n == r,hex(int(v1)),hex(int(v2))
def calc_k(num,r,s,z):
k=(r*num + z)*modinv(s,n)%n
return k,n-k
sign=[]
ge=[]
def calc_x(a,b,r,s,z):
#x1 = (z1 -b)*modinv(a*s1-r1,n)%n
x_a =(z -b)%n
x_b=(a*s-r)%n
if x_b != 0:
return (x_a*modinv(x_b,n)%n)%n
return 0
def generates_signatures():
puzzle120=16
n_value=n
sigs = []
private=50
Qp=private*G
for index in range(130):
print("---- index",index)
binaryIndex=int((index*3)).to_bytes(32,'big')
binaryIndex2=int((index*2+1)).to_bytes(32,'big')
hashedIndex=H(binaryIndex)
hashedIndex2=H(binaryIndex2)
z_value_with_r=(hashedIndex%puzzle120)
added_point= int(z_value_with_r)*G
final_point=Qp+added_point
r_value_with_s=(hashedIndex2%puzzle120)
print(r_value_with_s)
if r_value_with_s!=0:
R_point=final_point*int(r_value_with_s)
x,y=R_point.xy()
r_value=int(x)
s_value_with_r=int(modinv(r_value_with_s,n)%n)
s_value=int((s_value_with_r*r_value)%n)
z_value=((z_value_with_r*r_value)%n)
print("r", r_value)
print("s", s_value)
print("hash", z_value)
k,k1=calc_k(private,r_value,s_value,z_value)
print("k",k,k1)
print("k",hex(k),hex(k1))
print(verify(Qp,r_value,s_value,z_value))
wy,b,a=verify(Qp,r_value,s_value,z_value)
x=calc_x(int(a,16),int(b,16),int(r_value),int(s_value),int(z_value))
print("x",x)
k,k1=calc_k(x,r_value,s_value,z_value)
print("k",k,k1)
print("k",hex(k),hex(k1))
t=tuple([r_value,s_value,z_value])
if t not in sign:
sign.append(t)
for le in range(0,1000):
k2=(k*2**le)%n
ge.append(int(k2))
ge.append(int(n-k2))
generates_signatures()
---- index 18
9
r 63933145574282734898435981717146773918756897333098319278256437952015461322467
s 97164196692832900318159208530884680987624427476291405550721397771404732420314
hash 0
k 450 115792089237316195423570985008687907852837564279074904382605163141518161493887
k 0x1c2 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0363f7f
(True, '0x0', '0x9')
x 0
s=(z+rd)/k
sk=z+rd
sk-z=rd
(sk-z)/r=d
(s/r)k-(z/r)=d
(z/r)+d=(s/r)k
k=((z/r)+d)*(r/s)
z/r=random
r/s=random
z/r=120_bit_number_v1
r/s=120_bit_number_v2
k=(120_bit_number_v1+d)*120_bit_number_v2
def generates_signatures(curve):
puzzle120=int("00000000000000000000000000000000007fffffffffffffffffffffffffffff",16) #119-bit to be 100% sure to not fall into 241-bit range
known_bits=16
n_value=ecdsa_lib.curve_n(curve)
Q_point=[93499419120076195219278579763555015417347613618260420189054155605804414805552,19494200143356336257404688340550956357466777176798681646526975620299854296492]
sigs = []
for index in range(100):
binaryIndex=(index*2).to_bytes(32,'big')
binaryIndex2=(index*2+1).to_bytes(32,'big')
hashedIndex=ecdsa_lib.sha2_int(binaryIndex)
hashedIndex2=ecdsa_lib.sha2_int(binaryIndex2)
z_value_with_r=(hashedIndex%puzzle120)
added_point=ecdsa_lib.privkey_to_pubkey(z_value_with_r,curve)
final_point=add_point(Q_point[0],Q_point[1],added_point[0],added_point[1])
r_value_with_s=(hashedIndex2%puzzle120)
R_point=multiply_point(final_point[0],final_point[1],r_value_with_s)
r_value=R_point[0]
s_value_with_r=ecdsa_lib.inverse_mod(r_value_with_s,n_value)
s_value=(s_value_with_r*r_value)%n_value
z_value=(z_value_with_r*r_value)%n_value
sigs.append(
{
"r": r_value,
"s": s_value,
"kp": 0,
"hash": z_value
}
)
ret = {
"curve": curve.upper(),
"public_key": Q_point,
"known_type": "MSB",
"known_bits": known_bits,
"signatures": sigs,
}
return ret
private key 0x1000
public points
px: 0x175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739
py: 0xd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695
k:1
r: 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
s: 0xe667ef9dcbbac55a06295ce870b079d3efe3a465c532ef334320987bf4d736a5
z: 0x0
SIGN_U: 0x0000000000000000000000000000000000000000000000000000000000000000
SIGN_V: 0x13efffffffffffffffffffffffffffffe6a9fe543746b7faa740723d177739b5
as you can see example
0x13efffffffffffffffffffffffffffffe6a9fe543746b7faa740723d177739b5
K: 0x000000000000000000000000000000079d523ff7bb533dc6d6fabf75a30ac000
R: 0xdaff9f3f66aae00146a41c5401fa148a9f3945b9bb9045f12c21d0bf43b5b330
S: 0x45127dc4fbeffc546746250887e2aadcbd214576b74b0202a2667ae3ad900a59
Z: 0x0000000000000000000000000000000000000000000000000000000000000000
SIGN_U: 0x0000000000000000000000000000000000000000000000000000000000000000
SIGN_V: 0x000000000000000000000000000000000079d523ff7bb533dc6d6fabf75a30ac
Sign is := True
K: 0x0000000000000000000000000000000000000000000000000000000000000800
R: 0x5d1bdb4ea172fa79fce4cc2983d8f8d9fc318b85f423de0dedcb63069b920471
S: 0xba37b69d42e5f4f3f9c9985307b1f1b3f863170be847bc1bdb96c60d372408e2
Z: 0x0000000000000000000000000000000000000000000000000000000000000000
SIGN_U: 0x0000000000000000000000000000000000000000000000000000000000000000
SIGN_V: 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1
Sign is := True
x=0xceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630
y=0x2b195386bea3f5f002dc033b92cfc2c9e71b586302b09cfe535e1ff290b1b5ac
r1=c923e141c9c6d8aacc1cda5f5fb88f04deb0b9edc4dcfb7fdedbfa5e378f7be4
s1=d94dda4835f0f508ce3dd254e1dbb305036ff2d730d358d88a3baabe9d62b8dd
z1=20a4ddb78e28c3a53c205044e406033888d0747104a1aa7cea6060f745f01b3c
n=fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
1/r1=53491f1b04c43dd53f7fb49494addad940a027ffdd1a8c1042b8d8b2533057ac
1/s1=be72598b2890fb2dc5e9516660a3938c2227e0d4c48b3acf8265c2e224204572
z1*(1/r1)=00000000000000000000000000000000000c7076345d228cafad703a4c7d02d8
r1*(1/s1)=000000000000000000000000000000000048a18eb8762a75cfc41e17ae48e0c5