Bitcoin Forum
May 04, 2024, 11:25:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: I need a guiding hand to explain me elliptic curve cryptography on: October 03, 2020, 02:28:25 PM
But the guide says that the original public key can be found inside the locking script, the attacker don't have to find any hashes:


That is the input
For spending it, one mus provide a key that it's hash is equal to the value in blockchain.

By the way, for proven the ownership of one UTXO locked by a p2pkh script you must: provide the public key and a valid signature for it. Then the coins are locked again in a new p2pkh, and until the owner sped it again the public key will be kept secret. That's why you shouldn't re-use addressees, the public key will be disclosed after the firs transaction.
2  Bitcoin / Development & Technical Discussion / Re: I need a guiding hand to explain me elliptic curve cryptography on: October 03, 2020, 02:09:52 PM
So a computer cannot solve it, because of lack of intelligence? Can't it approach it at least?

I don't would to say "lack of intelligence", even we use numeric approximations for munch cases. Both computers and humans can't deal with big numbers without a "easy way" to do.

Anyway, so this is why you should never reveal your public keys? Because the procedure of reversing a public key is easier than reversing a SHA256 hash to its original string? I'm asking because on this public-key guide (https://learnmeabitcoin.com/technical/public-key) it says that public keys can be seen on the blockchain.

Bitcoin's pay-to-public-key-hash is a standard transaction that, in stead of recording the receiver public key in the blockchain, record only the ripdem160(sha256(pKey)). For spending it, one mus provide a key that it's hash is equal to the value in blockchain. The use of two different algorithms is made to reduce the chance of an attacker find the right hash using pre-image or some  attack to the hash. To broken a p2pkh you must broken both sha256 and ripdem160, as well find the right public key to create the pre-image (only a limited set o public keys on the whole space). Theoretically, if you find a good way to calculate the discrete log and use it to broke bitcoin keys, you will not go so far, because you don't know what public key look for (except for the very first transactions, and in case of key reuse)
3  Bitcoin / Electrum / Re: Electrum wallet and Lightning Node on: October 02, 2020, 08:42:01 PM
What you mean to connect? Connect your c-lightning node as one peer, or make the two nodes act as one?
4  Bitcoin / Development & Technical Discussion / Re: I need a guiding hand to explain me elliptic curve cryptography on: October 02, 2020, 07:39:27 PM
-snip-

Thank you for your time on writing this. You mentioned some maths' phrases like discrete logarithm or Taylor Series that are unknown to me. You said, though, that in order to reverse the result of a public key we need the discrete logarithm. A computer calculates only in real numbers, so it cannot reverse it. Here's my question. Can a human do it? Or is it mathematically impossible?

Also, I'm not fully sure why a computer calculates only in real numbers since it can calculate x * G on an elliptic curve shape. For example, how all these incredibly many bounces are calculated on the axis within 1 second?


Sorry for the terms, I talk about it on my day-by-day and missuppose that everyone know it!

Discrete logarithm are logarithms function with discrete numbers (integers are discrete, for example)

Series are not more then a sum of simple terms with a former rule: like x+x²+x³+x⁴... is formed from sum (xn) where sum() is just the sum of all terms.

Taylor Series are some special ones that gives the same (or close to) the result of another. For exemplo, how carry out in a CPU that only knows basic math (sum, subtract...) functions like sin(x). We use this Series to get the result, like this:


Here's my question. Can a human do it? Or is it mathematically impossible?

Yes! What is the log of 4 in base 2; two, of course. But, why? I know that 2² is 4, and I also know that the log 2(4) is a number n, that when I take 2a it returns 4. This method is called "imediate" or "intuitive", and works for small number. But for big numbers, the process becomes hard. Imagine hand-calculate log12334434343(34234325654767454)? So, isn't mathematically impossible (there is methods to solve then) but is HARD.


Also, I'm not fully sure why a computer calculates only in real numbers since it can calculate x * G on an elliptic curve shape. For example, how all these incredibly many bounces are calculated on the axis within 1 second?

Because taking the process on the "right" direction (private -> public) not involves DLs. Is basically ordinary math, but to go backwards you should solve a DL, hence this function is so called "an one way function". This is the point you should keep in mind (sorry if I'm being boring) in one way: ordinary math, in the other way: DLs.
5  Bitcoin / Development & Technical Discussion / Re: I need a guiding hand to explain me elliptic curve cryptography on: October 02, 2020, 06:06:21 PM
And why someone can't simply divide 3G with G and get the 3?

Because this operation isn't defined on elliptic curves, most specially in a curve defined over a discreet field, this leads to the "discreet logarithm problem" that are an unsolved problem so far.
if you are using a curve over, let's say, the real numbers set, you can calculate it. But for cripto, usually the curves are defined over a set mod(p).

secp256k1 is defined over the set mod(p), where p is:
Code:
p = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F
p = 2256 - 232 - 29 - 28 - 27 - 26 - 24 - 1



Yes but if the first G is randomly chosen and the coordinates of public key are given to someone he can't prove he owns the public key, even if he has the private key. The G is something unknown, meaning that he can't start our `painting` if he only has the number we multiply G. This is what I don't get...

G is just a convention, for the point where the calculations begins. There is some optimizations that can be done, but in general terms, every point on the curve can be a generator point. For computing a given public key, just take the secret and multiply it for G. Your result is the public key.
Elliptic curve cryptographic (or ECC) assumes that when you have a curve defined over a discreet set of numbers, is impossible to do the inverse operations (subtraction and division), because to do so, you need compute something called  a discrete logarithm(DL).
Your computer can calculate logarithm over the real numbers set because there is a serie, called Taylor Serie that is a numerical approximation of the result (i.e gives the sabe output to a given input). But this series are ONLY defined over real numbers, and without a method to compute it, the only way to solve is via brute force.
We use brute force methods for solve small logarithms or to factor small number, but for really big numbers, like 2¹²³, this method keeps useless. This makes the safety of ECC and RSA respectively.
And because it, we can easily calculate the public key via multiply (no DL here), but we can't make the inverse, find out the private key from the public (a DL need to be solved).

Maybe you can thought whether there is some way to solve DL. Yes, there is! But with digital computer and numbers in a big order (2²⁵⁶) it will take forever. (Pollard's Kangaroo is an example)

[moderator's note: consecutive posts merged]
6  Bitcoin / Development & Technical Discussion / Re: Selfish full node for production? on: August 12, 2020, 08:12:13 PM
Thank you for all the suggestions. I think I pulled together those that work best for. Here is how I am setting up my bitcoin.conf:

Code:
maxconnections=8 // no more than the 8 outbound connections my node will attempt
addnode=123.123.123.123 // my external node that I am sure it will always be up
addnode-122.122.122.122 // some node geographically close to me with an up-to-date block height (maybe repeat this step)

peerbloomfilters=0 // disable SPV clients from doing block filtering
blockfilterindex=0 // I think this is unnecessary because it's the default, but just making sure


Setting a low with -maxuploadtarget won't work for me because my application will broadcast many transactions (possibly new to the network), so it's very important that these broadcasts are done properly.
I also don't want to prune because I need the whole tx history.

@JuleAdka suggestion seems interesting. I took a look at BIP 159 (https://github.com/bitcoin/bips/blob/master/bip-0159.mediawiki) which introduced NODE_NETWORK_LIMITED. Disabling NODE_NETWORK might be a good way to make sure nobody tries to download historical blocks from my node. Is there a way to disable this service flag? Searched through the options and didn't find a way to do it (bitcoind --help | grep "service").

You have way to compile the code? If yes, you can open the "init.cpp" file, and change the line 878 (Core-0.20.0)
from:
ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK | NODE_NETWORK_LIMITED);
to:
ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK_LIMITED);
But, you probably had seen in BIP159 that your node still will send the most recent blocks (the BIP says 288)

Edit: Newbie question, how to add code in the wiki's markdown?
7  Bitcoin / Development & Technical Discussion / Re: Feasibility of a separate BTC payment protocol on Wi-Fi by sattelite on: August 12, 2020, 07:56:02 PM
Blockstream already have a satellite network that work almost everywhere, you only need a dish and a open-source decoder to use.

Also there are some companies that use the satellite technology and a Mesh network to connect to then. The network have a certain degree of redundancy and decentralization, once you can have multiples antennas pointed to the satellite and everyone with access to the mesh network can connect to this nodes, maybe te only problem is the centralization of the satellite operation (only blockstrem, from exemple). If we have multiple satellites and multiples antennas in a large network, it may work!
8  Bitcoin / Development & Technical Discussion / Re: Selfish full node for production? on: August 11, 2020, 09:38:42 PM
Maybe I'm wrong, but if you change the node services for NETWORK_LIMITED(node don't send historical blocks), the peers will not request blocks to you. It's the only way that I know for you case.
9  Local / Brasil / Re: A História das Criptomoedas Brasileiras (em desenvolvimento) on: August 11, 2020, 04:29:03 PM
Alguém aí quer fazer a Roberto Carlos coin, a criptomoeda que possui um bloco por ano, sempre no final do ano. O auge da escassez e reserva de valor!
10  Bitcoin / Development & Technical Discussion / Re: Nothing is truly decentralized using a centralized ISP on: August 10, 2020, 11:01:08 PM
I think that tor is a good choice so far. If your ISP keep hostile and start to filtering bitcoin protocol in its network, they can't stop the tor (if they block tor, you can use a bridge to connect to then). But I like Mesh network, probably in a local way this is even possible, creating a "cloud" that makes more difficult to track any specific transaction source, with a redoundant system of connections to others network (connecting to more than one network) may reduce the chance of attack. 
Also, I really think that the ISP is a real problem, since the data on bitcoin network are transmitted without encryption (correct me if I'm wrong), if a transaction comes out form your node without comes in previously, it can deduce that the transaction belong to you. This problem is also solved with tor.
11  Bitcoin / Development & Technical Discussion / Re: Question about encrypting a message on: August 10, 2020, 07:25:20 PM
If this key is reused, is even possible to find your private key(and this already happened in the past).
This is usually the case, for example, when considering signing transactions or signing messages and reusing the k value. In such cases of re-used and non-random k values, it is possible to derive the associated private key, as you say.

This is not the case here, however. Encrypting a message in this way only requires knowledge of the public key, not the private key. Otherwise, how would you encrypt a message to send to someone else? There is no way to derive the private key from this encryption process, even with reuse of the ephemeral key.

Yes, you are right. Sorry!  Grin
Re-using ephemeral keys are a problem only wen signing, not encrypting. Maybe they take it as a good practice?
12  Bitcoin / Development & Technical Discussion / Re: Question about encrypting a message on: August 10, 2020, 12:09:29 AM
As @AdolfinWolf said, when you encrypt any data with the Elliptic Curve Cripto Family, you create a random key called ephemeral key, and this key is used in the calculations AND ONLY ONCE, it is a disposable one. If this key is reused, is even possible to find your private key(and this already happened in the past). 
13  Bitcoin / Development & Technical Discussion / Re: Decentralized website on: August 09, 2020, 11:54:32 PM
Like unstoppabledomains.com? They use the Ethereum's network to store the content, and deliver it through some gateways around the world. But, I personaly think that is no longer decentralized, once I don't have hardware to directly download the chain and retrieve my site(they chain is very big, if you download the whole data), I have to trust in third parties, like cloudfire. ZeroNet and similars are very better
14  Bitcoin / Development & Technical Discussion / Re: Can I use a bitcoind data from LAN from local bitcoin-qt? on: August 09, 2020, 11:42:09 PM
You can try mount the server file system remotely on the others computes, but it probably will lead to a error because more than one instance of bitcoin is running (the core knows it because the .lock file, that is located on the data directory).  
But if your node are already running, there is no reason to have more then one node running, just download a SPV, as you can see above(electrum are a good one), and connect it to your full node. You not will loose privacy in this case
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!