Bitcoin Forum
May 28, 2024, 05:36:30 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Considering secp256k1 how can I obtain private keys?  (Read 158 times)
mluired (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
April 15, 2022, 11:03:42 AM
 #1

Hi colleagues.

This is just for a CTF and I am not familiar with secp256k1 and hpw EC works.

I know 2 public keys (from Local and Server). I want to know how to obtain private keys for Local and server.

Can you please provide me any hint on how to do it?

It would be very much appreciated.

Thanks.
Regards.
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5829


not your keys, not your coins!


View Profile WWW
April 15, 2022, 11:21:35 AM
 #2

You cannot get private keys from public keys, that's exactly why they exist. If this was possible, you would have broken Bitcoin.
The solution for your CTF must lie somewhere else, not in breaking cryptography.

This is a clear example of the XY Problem, in my opinion.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1526
Merit: 7452


Farewell, Leo


View Profile
April 15, 2022, 11:52:21 AM
 #3

You can't know the private key if you only have the public key. That's where public key cryptography relies on. You can calculate it if you have more information such as two signatures from the same public key with certain characteristics (reuse of k value).

Check these:

This is a clear example of the XY Problem, in my opinion.
Perhaps. It may be misunderstanding of a problem too.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
April 15, 2022, 02:09:31 PM
 #4

Hi colleagues.

This is just for a CTF and I am not familiar with secp256k1 and hpw EC works.

I know 2 public keys (from Local and Server). I want to know how to obtain private keys for Local and server.

Can you please provide me any hint on how to do it?

What is Local, what is Server?

In general, you ask for a very difficult subject. Knowing public key you may find corresponding private key only with huge cost of time and computational power. In other words - it is doable in reasonable time only for a limited number of private keys, in the range which is just a fraction of the full range used by Bitcoin / secp256k1 etc.
We may say that there are some methods to solve the problem you ask for (like https://arxiv.org/pdf/1501.07019.pdf) and even there exists programs for that, but all that works only in some cases. Imagine that you look for someone, and to find him you must check manually every apartment, every house on the planet. Clearly you will not be able to find that person in reasonable time - but if it is just a test for your method and given person will be in the same building you start your search, or even on the same street, it confirms the method is mathematically correct.
In other words - yes, it is possible that you find private key if you know public key only (it is not impossible), but the chance is so low that we say it is improbable.


gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4186
Merit: 8435



View Profile WWW
April 16, 2022, 03:29:30 AM
Merited by ABCbits (1)
 #5

If it's a CTF then they presumably setup an intentionally broken key generator or (more likely) signer.  Google for information on nonce reuse or related nonce vulnerabilities.
NeuroticFish
Legendary
*
Offline Offline

Activity: 3682
Merit: 6416


Looking for campaign manager? Contact icopress!


View Profile
April 16, 2022, 07:31:37 AM
 #6

What is Local, what is Server?

This is imho the spot-on question.

I know 2 public keys (from Local and Server). I want to know how to obtain private keys for Local and server.


@mluired you may have misunderstood something. Bitcoin is not the usual client-server application. Creating a private key doesn't need a server. Signing the private key doesn't need a server.
Getting a private key from a public key is not possible under normal circumstances. (It can be possible only if crucial mistakes are done.)

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
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!