COBRAS (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 895
Merit: 22
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 16, 2022, 10:30:56 PM |
|
I was change a N from order.SetBase16("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141") to 2^70
I divide 0xf56926f9ca9abc1065153d25383e80 / -1 Result: 20212ef8c52b3a842d0bc
but then I divide pubkey from
0xf56926f9ca9abc1065153d25383e80 - privkey;
pubkey ./calculatefromkey f56926f9ca9abc1065153d25383e80 privatekey: 0000000000000000000000000000000000f56926f9ca9abc1065153d25383e80 publickey compressed: 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c
i gent NOT PUBKEY FROM 20212ef8c52b3a842d0bc
029304ae3d06058417730a717b15727f651188448742442c311a5af9a5b02aa73d
./calculatefromkey 20212ef8c52b3a842d0bc privatekey: 000000000000000000000000000000000000000000020212ef8c52b3a842d0bc publickey compressed: 03193f6e2afc8e2a243239a25ec7c92807c07833bb66bcc63586ad1e1eadb79406 public address compressed 13HzVpWa3YDVW9sEUEoc9wvJeMCZoCeDYb publickey uncompressed: 04193f6e2afc8e2a243239a25ec7c92807c07833bb66bcc63586ad1e1eadb794062bcf9a0987701 bd2d1068a024f17c0edfe5f3cf7f7c3df74c2b2989d693c4bd3 public address uncompressed 1Hja51B5T5a2zHCTswdANGPDxYcju1hRQF
./keymath 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c / -1 Result: 029304ae3d06058417730a717b15727f651188448742442c311a5af9a5b02aa73d
bupkey are differents, but must be pub1 = pub2 !!!
how to resolve this ?
ASAP.
Thank You
|
[
|
|
|
COBRAS (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 895
Merit: 22
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 16, 2022, 10:38:27 PM |
|
03193f6e2afc8e2a243239a25ec7c92807c07833bb66bcc63586ad1e1eadb79406 not = 029304ae3d06058417730a717b15727f651188448742442c311a5af9a5b02aa73d
hot solve this bug ?
|
[
|
|
|
NotATether
Legendary
Offline
Activity: 1708
Merit: 7184
In memory of o_e_l_e_o
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 17, 2022, 03:13:37 AM |
|
I divide 0xf56926f9ca9abc1065153d25383e80 / -1 Result: 20212ef8c52b3a842d0bc
but then I divide pubkey from
0xf56926f9ca9abc1065153d25383e80 - privkey;
pubkey ./calculatefromkey f56926f9ca9abc1065153d25383e80 privatekey: 0000000000000000000000000000000000f56926f9ca9abc1065153d25383e80 publickey compressed: 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c
0xf56926f9ca9abc1065153d25383e80 is a 116-bit private key, which out of range for n. What's more, you're dividing it by -1 so it calculated -0xf56926f9ca9abc1065153d25383e80 instead. This is still not in range, so it'll keep adding N (2^70 = 1??) to this number until it is within range, hence mod(-0xf56926f9ca9abc1065153d25383e80, n) = 20212ef8c52b3a842d0bc <-- this is a 70-bit private key. When you attempt to make a public key it interprets the input as 256 bits. So if you want to avoid that, you must insert the modulus first.
|
|
|
|
COBRAS (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 895
Merit: 22
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 17, 2022, 06:22:13 AM |
|
I divide 0xf56926f9ca9abc1065153d25383e80 / -1 Result: 20212ef8c52b3a842d0bc
but then I divide pubkey from
0xf56926f9ca9abc1065153d25383e80 - privkey;
pubkey ./calculatefromkey f56926f9ca9abc1065153d25383e80 privatekey: 0000000000000000000000000000000000f56926f9ca9abc1065153d25383e80 publickey compressed: 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c
0xf56926f9ca9abc1065153d25383e80 is a 116-bit private key, which out of range for n. What's more, you're dividing it by -1 so it calculated -0xf56926f9ca9abc1065153d25383e80 instead. This is still not in range, so it'll keep adding N (2^70 = 1??) to this number until it is within range, hence mod(-0xf56926f9ca9abc1065153d25383e80, n) = 20212ef8c52b3a842d0bc <-- this is a 70-bit private key. When you attempt to make a public key it interprets the input as 256 bits. So if you want to avoid that, you must insert the modulus first. Hi bro. How to calculate this for publick key
|
[
|
|
|
NotATether
Legendary
Offline
Activity: 1708
Merit: 7184
In memory of o_e_l_e_o
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 17, 2022, 09:30:53 AM |
|
Hi bro. How to calculate this for publick key Doesn't ecctools have a "mod" command? (I have never used ecctools before).
|
|
|
|
|
COBRAS (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 895
Merit: 22
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 17, 2022, 05:03:48 PM |
|
fuck ... ![Cry](https://bitcointalk.org/Smileys/default/cry.gif)
|
[
|
|
|
COBRAS (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 895
Merit: 22
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 17, 2022, 05:14:19 PM Last edit: August 17, 2022, 06:46:21 PM by COBRAS |
|
Hi bro. How to calculate this for publick key Doesn't ecctools have a "mod" command? (I have never used ecctools before). Bro, can you make python function ? pls ![Huh](https://bitcointalk.org/Smileys/default/huh.gif) I wasvchange a Order, in keymath, modmath and generatecfrom privkey. Then div pubkey, and dividing privkey (resul for ex will be Z, result are different ! resulted pubkey not from Z !!! How to solve this ptoblem ??
|
[
|
|
|
COBRAS (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 895
Merit: 22
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 17, 2022, 06:48:49 PM |
|
I divide 0xf56926f9ca9abc1065153d25383e80 / -1 Result: 20212ef8c52b3a842d0bc
but then I divide pubkey from
0xf56926f9ca9abc1065153d25383e80 - privkey;
pubkey ./calculatefromkey f56926f9ca9abc1065153d25383e80 privatekey: 0000000000000000000000000000000000f56926f9ca9abc1065153d25383e80 publickey compressed: 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c
0xf56926f9ca9abc1065153d25383e80 is a 116-bit private key, which out of range for n. What's more, you're dividing it by -1 so it calculated -0xf56926f9ca9abc1065153d25383e80 instead. This is still not in range, so it'll keep adding N (2^70 = 1??) to this number until it is within range, hence mod(-0xf56926f9ca9abc1065153d25383e80, n) = 20212ef8c52b3a842d0bc <-- this is a 70-bit private key. When you attempt to make a public key it interprets the input as 256 bits. So if you want to avoid that, you must insert the modulus first. why modulus ? i need change order, not midulus ![Huh](https://bitcointalk.org/Smileys/default/huh.gif) ? Thank's
|
[
|
|
|
NotATether
Legendary
Offline
Activity: 1708
Merit: 7184
In memory of o_e_l_e_o
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 17, 2022, 08:24:20 PM |
|
why modulus ? i need change order, not midulus ![Huh](https://bitcointalk.org/Smileys/default/huh.gif) ? Thank's Because you cannot change the curve order when generating a bitcoin public key. Otherwise you will end up with an invalid key. So that's why you hace to modulus the private key first before you compute the public key.
|
|
|
|
COBRAS (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 895
Merit: 22
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 17, 2022, 08:59:49 PM |
|
why modulus ? i need change order, not midulus ![Huh](https://bitcointalk.org/Smileys/default/huh.gif) ? Thank's Because you cannot change the curve order when generating a bitcoin public key. Otherwise you will end up with an invalid key. So that's why you hace to modulus the private key first before you compute the public key. Can you make script please ? yes, result is "invalid" but this is ok.
|
[
|
|
|
COBRAS (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 895
Merit: 22
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 18, 2022, 10:37:10 AM |
|
Hello. Bro, did you find any alternaative formulas for dividing and creating privkeys and pubkeys ? Regards
|
[
|
|
|
bigvito19
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 18, 2022, 11:50:09 AM |
|
Hello. Bro, did you find any alternaative formulas for dividing and creating privkeys and pubkeys ? Regards That code above is not exactly for dividing pubkeys, that code is for showing the address of that pubkey. This is a code for dividing pubkeys https://github.com/albertobsd/ecctools#keydivision example on how to use ./keydivision -p 03a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070 -n 3 -d 4 Output: 03f694cbaf2b966c1cc5f7f829d3a907819bc70ebcc1b229d9e81bda2712998b10 02e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d 033ab6bde10cd3ac0cd06883fa66f0b0e3eb1309c0534b812286e2a30ca540db99
|
|
|
|
ArErD
Newbie
Offline
Activity: 3
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 16, 2022, 09:08:25 PM |
|
![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) I divide 0xf56926f9ca9abc1065153d25383e80 / -1 Result: 20212ef8c52b3a842d0bc
but then I divide pubkey from
0xf56926f9ca9abc1065153d25383e80 - privkey;
pubkey ./calculatefromkey f56926f9ca9abc1065153d25383e80 privatekey: 0000000000000000000000000000000000f56926f9ca9abc1065153d25383e80 publickey compressed: 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c
0xf56926f9ca9abc1065153d25383e80 is a 116-bit private key, which out of range for n. What's more, you're dividing it by -1 so it calculated -0xf56926f9ca9abc1065153d25383e80 instead. This is still not in range, so it'll keep adding N (2^70 = 1??) to this number until it is within range, hence mod(-0xf56926f9ca9abc1065153d25383e80, n) = 20212ef8c52b3a842d0bc <-- this is a 70-bit private key. When you attempt to make a public key it interprets the input as 256 bits. So if you want to avoid that, you must insert the modulus first. Hi bro. How to calculate this for publick key
|
|
|
|
|