Bitcoin Forum
May 04, 2024, 12:45:21 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Presentation of my ECC Calculator  (Read 941 times)
MrFreeDragon
Sr. Member
****
Offline Offline

Activity: 443
Merit: 350


View Profile
April 13, 2020, 02:32:28 PM
 #21

-snip-
I use a precomputed table of multiples of G.

I did not use any precomputed multiples of G.
Do you use just 256 precomupted points for powers of two (2^0, 2^1, 2^2, 2^3, 2^4, ... 2^255) and later represent every private key number in binary and make scalar additions of precomputed points? If no, how much is your precomupted table and what kind of points include?

1714783521
Hero Member
*
Offline Offline

Posts: 1714783521

View Profile Personal Message (Offline)

Ignore
1714783521
Reply with quote  #2

1714783521
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714783521
Hero Member
*
Offline Offline

Posts: 1714783521

View Profile Personal Message (Offline)

Ignore
1714783521
Reply with quote  #2

1714783521
Report to moderator
1714783521
Hero Member
*
Offline Offline

Posts: 1714783521

View Profile Personal Message (Offline)

Ignore
1714783521
Reply with quote  #2

1714783521
Report to moderator
MixMAx123 (OP)
Full Member
***
Offline Offline

Activity: 161
Merit: 168


View Profile
April 13, 2020, 02:41:45 PM
 #22

-snip-
I use a precomputed table of multiples of G.

I did not use any precomputed multiples of G.
Do you use just 256 precomupted points for powers of two (2^0, 2^1, 2^2, 2^3, 2^4, ... 2^255) and later represent every private key number in binary and make scalar additions of precomputed points? If no, how much is your precomupted table and what kind of points include?


https://github.com/MrMaxweII/Secp256k1-Calculator/blob/master/EXPList.java
arulbero
Legendary
*
Offline Offline

Activity: 1915
Merit: 2074


View Profile
April 13, 2020, 03:07:54 PM
Last edit: April 13, 2020, 03:48:48 PM by arulbero
Merited by bones261 (4), MrFreeDragon (2), ABCbits (1)
 #23


-snip-
I use a precomputed table of multiples of G.

I did not use any precomputed multiples of G.
Do you use just 256 precomupted points for powers of two (2^0, 2^1, 2^2, 2^3, 2^4, ... 2^255) and later represent every private key number in binary and make scalar additions of precomputed points? If no, how much is your precomupted table and what kind of points include?


If you precompute only the powers of two, you avoid only the doublings. It is like you split your binary key in 256 pieces, each piece in this case is a particular point and then you perform 255 additions between these points.
But if you split 256 in 128/64/32/16/8 parts and you precompute every key in these "parts" (in these cases each part has more than 1 point) you can lower the number of additions.

I use 32 groups of 255 points = 8160 precomputed points.

I represent every private key in binary, I split that number in 32 pieces (each piece has 256/32=8 bit -> 255 elements) and I compute only 32-1 = 31 group additions (instead of 256) for each key. No doubling.

Just for example, if you have a 32 bit key:

key = 10101010101000001111111101000010

split in 4 pieces of 32/4=8 bits:

(10101010)*2^24 + (10100000)*2^16 + (11111111)*2^8 + (01000010)

Then I need to do only 3 additions, if I have precomputed this table (a line for each piece):

Code:
00000001  00000010 00000011  …   11111111

  2^0       2*2^0    3*2^0   …    255*2^0       --> one of these is (01000010)

  2^8       2*2^8    3*2^8   …    255*2^8       --> one of these is (11111111)*2^8

2^(2*8)  2*2^(2*8)  3*2^(2*8) . 255*2^(2*8)    --> one of these is (10100000)*2^16

2^(3*8)  2*2^(3*8)  3*2^(3*8) . 255*2^(3*8)    -->  one of these is (10101010)*2^24

Each line has 255 elements because you don't need the (00000000) element.


For a 256 bit key, this is the precomputed table (32 lines * 255 elements = 8160):
Code:
2^0 , 2*2^0,  3*2^0, … , 255*2^0

2^8,  2*2^8,  3*2^8, …,  255*2^8    

2^(2*8),  2*2^(2*8), 3*2^(2*8) , .., 255*2^(2*8)

2^(3*8),  2*2^(3*8), 3*2^(3*8) , .., 255*2^(3*8)

2^(4*8),  2*2^(4*8), 3*2^(4*8) , .., 255*2^(4*8)

2^(5*8),  2*2^(5*8), 3*2^(5*8) , .., 255*2^(5*8)



2^(31*8),  2*2^(31*8), 3*2^(31*8) , .., 255*2^(31*8)


I split a 256 bit key in 32 pieces of 8 bit and I compute 31 additions.
MrFreeDragon
Sr. Member
****
Offline Offline

Activity: 443
Merit: 350


View Profile
April 13, 2020, 04:06:59 PM
 #24

-snip-
I represent every private key in binary, I split that number in 32 pieces (each piece has 256/32=8 bit -> 255 elements) and I compute only 32-1 = 31 group additions (instead of 256) for each key. No doubling.
-snip-
I split a 256 bit key in 32 pieces of 8 bit and I compute 31 additions.

Thank you very much! Very good approach!

I have tested already with 256 precomputed powers of two (so performed 255 additions) - for 10k random private keys I need 7.13 seconds (1400 per second) compared to 16 seconds (625 per second) without precomputed table. More than 2 times improvement.

I beleive that with your approach the speed will be faster. Not sure but seems that if I need only 31 additions instead of 255, the speed should be faster by 255/31 = 8 times, so for 10k I will need less than 1 second (11k per second).

I use 32 groups of 255 points = 8160 precomputed points.
How do you think, if use 16 groups 65,535 points (1 048 576 points) will it be faster? Only 15 additions will be required.

arulbero
Legendary
*
Offline Offline

Activity: 1915
Merit: 2074


View Profile
April 13, 2020, 04:15:15 PM
 #25


I use 32 groups of 255 points = 8160 precomputed points.
How do you think, if use 16 groups 65,535 points (1 048 576 points) will it be faster? Only 15 additions will be required.

I think it would be slower, the table would be in RAM and not in some faster cpu's cache.
brainless
Member
**
Offline Offline

Activity: 316
Merit: 34


View Profile
April 22, 2021, 09:15:15 PM
 #26

can some ecc expert write about Point addition / Point concatenate

https://bitcointalk.org/index.php?topic=5332526.new#new

waiting your expert views

13sXkWqtivcMtNGQpskD78iqsgVy9hcHLF
fxsniper
Member
**
Offline Offline

Activity: 406
Merit: 45


View Profile
April 23, 2021, 02:26:47 AM
 #27

How to use this program?
Did developer have video show hot to use?
MixMAx123 (OP)
Full Member
***
Offline Offline

Activity: 161
Merit: 168


View Profile
April 23, 2021, 07:23:18 AM
 #28

How to use this program?
Did developer have video show hot to use?


If I find the time, I'll make a video. Unfortunately, my English is very poor and I am not a video professional. I would be very happy from someone else who would like to make a video of the program :-)
Pages: « 1 [2]  All
  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!