COBRAS
Member
Offline
Activity: 991
Merit: 23
|
|
October 26, 2021, 10:09:49 PM |
|
I would like to understand the math behind this...
Simply and objectively!In decimal for ease.
All calculations: p = 115792089237316195423570985008687907853269984665640564039457584007908834671663 ------------------------------------------------------------------------------------------------------------------------------------------------------- Private key : 1
Public key :
x = 55066263022277343669578718895168534326250603453777594175500187360389116729240
55066263022277343669578718895168534326250603453777594175500187360389116729240**3 + 7 =
32748224938747404814623910738487752935528512903530129802856995983256684603122**28948022309329048855892746252171976963317496166410141009864396001977208667916=
y = 32670510020758816978083085130507043184471273380659243275938904335757337482424
OKAY ---------------------------------------------------------------------------------------------------------------------------------------------------
Private key : 2
Public key :
x = 89565891926547004231252920425935692360644145829622209833684329913297188986597
89565891926547004231252920425935692360644145829622209833684329913297188986597**3 + 7 =
57199941671890039290383617934355424684258807805258215939368959893591666662646**28948022309329048855892746252171976963317496166410141009864396001977208667916=
y = 12158399299693830322967808612713398636155367887041628176798871954788371653930
OKAY -------------------------------------------------------------------------------------------------------------------------------------------------
Private key : 3
Public key :
x = 112711660439710606056748659173929673102114977341539408544630613555209775888121
112711660439710606056748659173929673102114977341539408544630613555209775888121**3 + 7 =
104193826873522593991639737736096919049125888873761064059040146529970392609905**28948022309329048855892746252171976963317496166410141009864396001977208667916=
y = 90209061256745311731914079131285931446821116410824268969537695047367247992253
NO OKAY ------------------------------------------------------------------------------------------------------------------------------------------------ Why did the y value of private key 3 need to be inverted?
What math or method is used to know whether or not I will need to invert the y value?
I send you pm, check your pm. Thx
|
[
|
|
|
stilichovandal
Jr. Member
Offline
Activity: 31
Merit: 5
|
|
October 26, 2021, 10:37:20 PM Last edit: October 27, 2021, 12:19:00 AM by achow101 |
|
sorry for the basic question. how did you get 28948022309329048855892746252171976963317496166410141009864396001977208667916 ?
sorry for the basic question.
how did you get 28948022309329048855892746252171976963317496166410141009864396001977208667916 ?
I get it, its P/4 ..
|
|
|
|
mausuv
Jr. Member
Offline
Activity: 70
Merit: 1
|
|
November 14, 2021, 01:58:03 PM |
|
hi eny update Re: y coordinate calculation (PUBLIC KEY BITCOIN) share me
|
|
|
|
mausuv
Jr. Member
Offline
Activity: 70
Merit: 1
|
|
November 14, 2021, 02:17:02 PM |
|
p (modulus) = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F n (order; size; the count of all possible EC points) = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 a (the constant "a" in y^2 ≡ x^3 + a*x + b (mod p)) = 0x0000000000000000000000000000000000000000000000000000000000000000 b (the constant "b" in y^2 ≡ x^3 + a*x + b (mod p)) = 0x0000000000000000000000000000000000000000000000000000000000000007 g (the curve generator point G {x, y}) = (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798, 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8) h (cofactor, typically 1) = 01
please tell why use h = 1 a = 0 b = 7 what different
how to reverse calculate y^2 ≡ x^3 + a*x + b (mod p) share your code
|
|
|
|
mausuv
Jr. Member
Offline
Activity: 70
Merit: 1
|
|
December 02, 2021, 01:21:34 PM |
|
script: y from x p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f x = 0x33709eb11e0d4439a729f21c2c443dedb727528229713f0065721ba8fa46f00e ysquared = ((x*x*x+7) % p) print ("ysquared= %s ", hex(ysquared) ) y = pow(ysquared, (p+1)/4, p) print ("y1 = ",hex(y)) print ("y2 = ", hex(y * -1 % p)) y1 = y y2 = (y * -1) % p print(" ") print("value x = ",hex(x)) print("value x = ",x) print(" ")
if Integer(y1) % 2 == 0: print("value 02 to y = ",hex(y1)) print("value 02 to y =",y1) print(" ") print("value 03 to y = ",hex(y2)) print("value 03 to y =",y2)
if Integer(y2) % 2 == 0: print("value 02 to y = ",hex(y2)) print("value 02 to y =",y2) print(" ") print("value 03 to y = ",hex(y1)) print("value 03 to y =",y1)
#test print (hex((x**3 + 7 - y1**2) % p) )
print (hex((x**3 + 7 - y2**2) % p)) i am run your code python and python2 both erro why? ?.... NameError: name 'Integer' is not defined
user@me133:~/Downloads$ python 3.py ysquared= %s 0x8ff5190f5e682d223717cd48318a53d918a5c48335924148963d7fc92c852e00 Traceback (most recent call last): File "3.py", line 5, in <module> y = pow(ysquared, (p+1)/4, p) TypeError: pow() 3rd argument not allowed unless all arguments are integers
user@me133:~/Downloads$ python2 3.py[ ('ysquared= %s ', '0x8ff5190f5e682d223717cd48318a53d918a5c48335924148963d7fc92c852e00L') ('y1 = ', '0x4bb74cfb14940bce37a2468d7873ea0d0ac01a946607fd774ffb8cdbfb022eacL') ('y2 = ', '0xb448b304eb6bf431c85db972878c15f2f53fe56b99f80288b004732304fdcd83L') ('value x = ', '0xc0c686408d517dfd67c2367651380d00d126e4229631fd03f8ff35eef1a61e3cL') ('value x = ', 87194829221142880348582938487511785107150118762739500766654458540580527283772L) Traceback (most recent call last): File "3.py", line 15, in <module> if Integer(y1) % 2 == 0: NameError: name 'Integer' is not defined
user@me133:~/Downloads$ python3 3.py ysquared= %s 0x8ff5190f5e682d223717cd48318a53d918a5c48335924148963d7fc92c852e00 Traceback (most recent call last): File "3.py", line 5, in <module> y = pow(ysquared, (p+1)/4, p) TypeError: pow() 3rd argument not allowed unless all arguments are integers
|
|
|
|
mausuv
Jr. Member
Offline
Activity: 70
Merit: 1
|
|
December 04, 2021, 12:15:53 PM Last edit: December 04, 2021, 12:36:04 PM by mausuv |
|
thanks its work @ETFbitcoin i need help, sample.txt file open next get x and y value same time,set value for setmy_x_value,setmy_y_value #note without error.. sample x and y value.. sample.txt ('0xaf5a13d03a858342aea7dcc0772d66d65b83f6fa17988568cc219866a99436ccL', '0xc694e15f92cddfb68aebcc313f5594b987e7ae7d72f5bfc7b44b6adbd4301ee1L') ('0x680c20dcdca0813ae3450845c18c6b4975e96281313fb811dda958bca2222076L', '0xe1bb14e7912ff0224f95d90c710ccf830bef75e1bfe16898adf80fe0d4b595c9L') ('0x8d485591727814848b4917388714866d9fd60f0269112edb646f3c13e06924f0L', '0xf44e87d22618b5f5b6545cf5555092c64d279708eaf12a5518bbe9bca0d1aae2L') ('0xedb1bc4d3649221c13c65dcf79d7d2050cc734ab878f78ac90d1274356e65536L', '0x5ee7898c708f13ab827bffb1c411375e80155366f0d9b74769a25aa6b3f3e17bL') ('0xa3472f6ecc489b37a0059d3555e11fa44ba6fa139080ea91a84d5928ea1e4058L', '0xc822e040aef7a7a82cc0f7e1b91d2ce35e60f98cbb77b1127d5a69ecb51f62d8L') ('0x2f5410507ab547341c4cfd87c89381dff84609f0ba3b106d912ac8b3b939b139L', '0x79b0462c5105e546f827871efbf9bb53a83615f4fd90486afa6280a994c2fea2L') ('0x66c31d4feabd3f65a7d2ee4cb60f484a29c3485c555189ac993bb5465c21baafL', '0x90c2113380966bf3fffd18b8f94f49b4e21a22bf01c17cce17b8b1256a43d504L') ('0xef78c2ae7c2d1bed13f204e5ed6764c7a9b1c24690ab6fc259f4f4b3acc24e3dL', '0x5c3458d1124458f569fcabc4fab4872335a75e0834d4afa564c83d7d3833e7a4L') ('0x32253c8bcb7cc19c9b959537aafd738bbaba5943cace632248e3ecd03f7cd960L', '0x4dccceab7f7eb85a5d21a5a21c6ebc5ed53bbbd74784cd422e84edf8ef89bc3eL') ('0x9fbc293e6bdaffa96519a7538a7ece62d07a8182bf20494551f2894d39e3c75bL', '0x957beece6c39c7d41fc2c9c3a53796a45a7bef5d3baf8cbd95a32e999615f83L')
filename ='sample.txt' with open(filename) as f: addf = f.read().split() addf = set(addf) # this is my idea how to same time get x and y ?... setmy_x_value,setmy_y_value #mybadenglish example output... like tihs >>> Point1 = Point(setmy_x_value, setmy_y_value) >>> Point2 = Point(0xc6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5, 0x1ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52a) >>> Point3 = sub(Point1,Point2) >>> hex(Point3.x),hex(Point3.y) ('0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', '0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8')
|
|
|
|
mausuv
Jr. Member
Offline
Activity: 70
Merit: 1
|
|
December 20, 2021, 02:39:34 AM Last edit: December 20, 2021, 04:38:09 PM by mausuv |
|
Here's the output 'Set X' ['0xaf5a13d03a858342aea7dcc0772d66d65b83f6fa17988568cc219866a99436ccL', '0x680c20dcdca0813ae3450845c18c6b4975e96281313fb811dda958bca2222076L', '0x8d485591727814848b4917388714866d9fd60f0269112edb646f3c13e06924f0L','] 'Set Y' ['0xc694e15f92cddfb68aebcc313f5594b987e7ae7d72f5bfc7b44b6adbd4301ee1L', '0xe1bb14e7912ff0224f95d90c710ccf830bef75e1bfe16898adf80fe0d4b595c9L', '0xf44e87d22618b5f5b6545cf5555092c64d279708eaf12a5518bbe9bca0d1aae2L']
#mybadenglishwrite other example i am genarate rsz value, step 1: rsz value in sample_rsz.txt get step 2: rsz to private key hexconvert step 3: cheak for balance your not get rsz value in sample_rsz.txt please skip step1(and) write your code step2,step3 sample_rsz.txt python getz_input.py -txid f9aa66876f79ed8870720e9019e769548f591d285cc2d16460c411c5da0912ca
Starting Program... ====================================================================== [Input Index #: 0] R: 00823cd5826d4dda527055dd8c183c3911a7689c03250214c9928c502d556d5dcd S: 708cbaadc433e75db1b2d2b49f1dcb29a6abcf830fb49b5e2f43edf58a9855f7 Z: cab8d8ead97afc124085bb98127ba0c4c8fc9e0f6908c88c43b24565f98b61f8 PubKey: 039c5889d0ea6c234f0986a519677ec17b8402762bb5e1c2fc85d74256bded7273 ====================================================================== [Input Index #: 1] R: 7020dab260a2621f0ba6ca9cb7117d9f0c3764cf802fbf9f1ec270b876e86478 S: 477b0abf12644608fd2a96c1b877aa6d38cc97beadb23f0935cae3d02da29e50 Z: ac1b62f6fe57a9e226460367fbe45dcad394ea167b44b607182390eec19817be PubKey: 021af19d3e7658610ace22a8cac1a4349fc9ea253d60459d109d152a40df20a7b6 ====================================================================== [Input Index #: 2] R: 40381bfcdaa49e8dc464c7efa260c47ab943d87e55a7bfec9e50791c7a9b00c1 S: 48eaf79559aec14634c80ca1ac9acce1c70dac7f3f23e029bb3509e06826558e Z: 8fe79999e5a085062b64a973fc7e1cfb96343383aa415e191f2c6fea9e91a1d5 PubKey: 031ab5e8b751a9d0fb1a7c8db749bf08d2f96adf700070ed98c192e2226ecaf54a ====================================================================== [Input Index #: 3] R: 27a2026dc60891e753d5769654eae6fdb4273ad5e43b453c89f98ddf735a60d3 S: 287ee3d8394b8020bfa8eb2cbd1731de9b56ebfb7853e9c45a8429d444a4532d Z: da97a9cf6cdc44477da5299626789bfbec96ad5108d8a38166901790e7ef25a1 PubKey: 036c134583e010e1a0a41ce03ab453d8aa09979e9929af208bf7130145aec27eec ====================================================================== [Input Index #: 4] R: 125dd347afe4554df33946d3948e96b24fb852b97a0bfa2ea8d2f4efc7958f9d S: 63ac3605c815a28c2721cfce08aacabf95fffcad9c33dd49f1d16110ac3c379e Z: db2d008d6d0f78d6b766539099f6939a412d5fc75460ce7e8e42d3aec4fc4b54 PubKey: 0233244cb067b59e82de611f665284111b07b6867380efb9317cba100af345974c ====================================================================== [Input Index #: 5] R: 00a264c4897e694fd13c6f0348977bad815499b0cd7df34fd5a4ee680463d3c30c S: 72c579ee7c9cb502c903ac71d60d93834c2a9ce8a43215ed853c619337c1cfe8 Z: cf22845485cd95c625bf92c9a92b49f1166315d4545e404cd213bc4022ca32e5 PubKey: 0374d16a1603a5691eb73aa12be62e506792cff5772def92376d1dbf7d15a64a4d ====================================================================== [Input Index #: 6] R: 6fc545a0360d77a92e5f00ad13f947c48d3d61605b091f43d3b8c9aeca68a3ea S: 472db6ab16c4b34442a123764e871bbf1c866810996a3117c7a4937ef0b92b52 Z: 49acf9eb7e34189460d96ef1d8ce0d6bd35e5ff659da757775244aeb887b398d PubKey: 0242ae9c0bd6300b20b08709546b79a02ef3a297a7eee1299121e2f79eb646c5b9
other help please solve: iam run ImportError: No module named txnUtils https://github.com/FoxxD3V/btc-rsz/blob/master/RawTX_RSZ.py
|
|
|
|
cixegz
Newbie
Offline
Activity: 13
Merit: 0
|
|
December 27, 2021, 04:59:36 PM |
|
this is normal math sqrt√(x)^2, test value: 4^2 = 16, next root return 4 -8^2= 64,next root return 8
how to bitcoin Publickey x and y use to sqrt example: √(x,y)^2 how to calculate sqrt for bitcoin publickey teach me please
example1:x,y px: e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13 py: 51ed993ea0d455b75642e2098ea51448d967ae33bfbdfe40cfe97bdc47739922 #privatekey 4 px: 421f5fc9a21065445c96fdb91c0c1e2f2431741c72713b4b99ddcb316f31e9fc py: 2b90f16d11dabdb616f6db7e225d1e14743034b37b223115db20717ad1cd6781 #privatekey 4^2 = 16 ans px: e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13 py: 51ed993ea0d455b75642e2098ea51448d967ae33bfbdfe40cfe97bdc47739922 #privatekey √16 = 4
example2: px: 2f01e5e15cca351daff3843fb70f3c2f0a1bdd05e5af888a67784ef3e10a2a01 py: a3b25758beac66b6d6c2f7d5ecd2ec4b3d1dec2945a489e84a25d3479342132b # -8 px: ed3bace23c5e17652e174c835fb72bf53ee306b3406a26890221b4cef7500f88 py: e57a6f571288ccffdcda5e8a7a1f87bf97bd17be084895d0fce17ad5e335286e # -8^ = 64 ans px: 2f01e5e15cca351daff3843fb70f3c2f0a1bdd05e5af888a67784ef3e10a2a01 py: 5c4da8a741539949293d082a132d13b4c2e213d6ba5b7617b5da2cb76cbde904 # √64 = 8
how does work explain. do u understad my problem ,i speak little english
|
|
|
|
|