Bitcoin Forum
November 05, 2024, 11:48:28 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: ecctools qeschion. asap. help wanted  (Read 231 times)
COBRAS (OP)
Member
**
Offline Offline

Activity: 1015
Merit: 23


View Profile
August 16, 2022, 10:30:56 PM
Merited by saxydev (1)
 #1

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
**
Offline Offline

Activity: 1015
Merit: 23


View Profile
August 16, 2022, 10:38:27 PM
 #2

03193f6e2afc8e2a243239a25ec7c92807c07833bb66bcc63586ad1e1eadb79406 not = 029304ae3d06058417730a717b15727f651188448742442c311a5af9a5b02aa73d

hot solve this bug ?

[
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7362


Top Crypto Casino


View Profile WWW
August 17, 2022, 03:13:37 AM
 #3

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.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
COBRAS (OP)
Member
**
Offline Offline

Activity: 1015
Merit: 23


View Profile
August 17, 2022, 06:22:13 AM
 #4

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 Huh

[
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7362


Top Crypto Casino


View Profile WWW
August 17, 2022, 09:30:53 AM
 #5

Hi bro.

How to calculate this for publick key Huh

Doesn't ecctools have a "mod" command? (I have never used ecctools before).

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
bigvito19
Full Member
***
Offline Offline

Activity: 711
Merit: 111


View Profile
August 17, 2022, 12:18:21 PM
Last edit: August 17, 2022, 12:47:35 PM by bigvito19
 #6

Its an error in the code he hasn't changed yet. I already told him about it and he told me you can do that with bash or python.

https://github.com/albertobsd/ecctools/issues/22#event-7201325521
COBRAS (OP)
Member
**
Offline Offline

Activity: 1015
Merit: 23


View Profile
August 17, 2022, 05:03:48 PM
 #7

Its an error in the code he hasn't changed yet. I already told him about it and he told me you can do that with bash or python.

https://github.com/albertobsd/ecctools/issues/22#event-7201325521

fuck ...  Cry

[
COBRAS (OP)
Member
**
Offline Offline

Activity: 1015
Merit: 23


View Profile
August 17, 2022, 05:14:19 PM
Last edit: August 17, 2022, 06:46:21 PM by COBRAS
 #8

Hi bro.

How to calculate this for publick key Huh

Doesn't ecctools have a "mod" command? (I have never used ecctools before).


Bro, can you make python function ?

pls Huh


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
**
Offline Offline

Activity: 1015
Merit: 23


View Profile
August 17, 2022, 06:48:49 PM
 #9

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?

Thank's

[
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7362


Top Crypto Casino


View Profile WWW
August 17, 2022, 08:24:20 PM
 #10

why modulus ?


i need change order, not midulus Huh?

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.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
COBRAS (OP)
Member
**
Offline Offline

Activity: 1015
Merit: 23


View Profile
August 17, 2022, 08:59:49 PM
 #11

why modulus ?


i need change order, not midulus Huh?

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
**
Offline Offline

Activity: 1015
Merit: 23


View Profile
August 18, 2022, 10:37:10 AM
 #12

Its an error in the code he hasn't changed yet. I already told him about it and he told me you can do that with bash or python.

https://github.com/albertobsd/ecctools/issues/22#event-7201325521

Hello. Bro, did you find any alternaative formulas for dividing and creating  privkeys and pubkeys ?

Regards

[
bigvito19
Full Member
***
Offline Offline

Activity: 711
Merit: 111


View Profile
August 18, 2022, 11:50:09 AM
 #13

Its an error in the code he hasn't changed yet. I already told him about it and he told me you can do that with bash or python.

https://github.com/albertobsd/ecctools/issues/22#event-7201325521

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 Offline

Activity: 3
Merit: 0


View Profile
September 16, 2022, 09:08:25 PM
 #14

 Tongue
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 Huh
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!