Bitcoin Forum
May 24, 2024, 10:37:34 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 »
241  Bitcoin / Electrum / Re: electrum 4.0.2 update check says latest version is 3.3.8 on: July 29, 2020, 06:57:13 AM
Thanks for the report.
I opened a new issue addressing this: https://github.com/spesmilo/electrum/issues/6449

apparently this is intentional since they don't want to force people to update to v4 as of yet.
But it has been released as an stable version for a while now. It would have made sense when it was beta release.
242  Bitcoin / Project Development / Re: The FinderOuter, a bitcoin recovery tool (v0.4.0 2020-06-30) on: July 23, 2020, 03:06:29 PM
Version 0.3.0 is released.
https://github.com/Coding-Enthusiast/FinderOuter/releases/tag/v0.3.0.0
See changelog for more details.
Most notable changes are:
- New feature: mini-privatekey (of length 22, 26 or 30) missing characters
- Some bug fixes in missing base-58 option
- Improved reports
Version 0.4.0 is released.
https://github.com/Coding-Enthusiast/FinderOuter/releases/tag/v0.4.0.0
See changelog for more details.
Most notable changes are:
- New feature: BIP-39 mnemonic recovery
- Code improvement, optimization of hash algorithms, more tests
Version 0.4.1 is released.
https://github.com/Coding-Enthusiast/FinderOuter/releases/tag/v0.4.1.0
See changelog for details.
This is a minor version released with a little bit of delay that introduces the Example button. It is an easy and quick way of seeing how to fill different text boxes. Hopefully it can clear some confusions that some beginners may have with things such as BIP-32 paths.
243  Bitcoin / Development & Technical Discussion / Re: Do invalid keys in BIP44 path matter? on: July 21, 2020, 05:15:01 AM
A 256-bit number bigger than n modulo n is at most only 128 bits.
It actually is at most 136 bits (0x014551231950b75fc4402da1732fc9bebe).

Quote
If one knows the xpub, then k-par is known, and it is possible to recover the private key.
You can't know the parent private key from xpub, you only know the parent public key (capital K) and even then to compute a child private key you still need another private key, even if the next key was only 1G ahead.


P.S. I honestly can't think of any reason why this decision was made.
244  Bitcoin / Project Development / Re: Denovo (v 0.0.0) and Bitcoin.Net (v 0.4.1) on: July 17, 2020, 08:54:57 AM
I have some experience with working on C and Python. I can read that code and make sense of it. The maximum program size that I have ever written would be just a couple hundred lines only. How would you rate C# for someone with basic knowledge of C?? Is there a starting point you can suggest??
You'll probably love C# too. I find C# to be one of the most balanced programming languages.
It is easy to learn, develop, scale and maintain.
You can write code that runs nearly as fast as the same code written in a low level language such as C, and with .Net 5 and 6 I'd expect the gap shrinks even more to the point where they both compile to the same exact machine code. In some ways you could say it is between C and Python.
C# can be used to write a wide variety of applications and for all platforms, from desktop apps to web apps and mobile apps. It is also being used to write games. The size of the binary can be as small as 8 kilobytes to several GB.

Knowing C you could also write low level code for specific parts that need to be like that and then simply call it inside your C# app using PInvoke.
To get started take a look at this similar question: https://www.reddit.com/r/csharp/comments/88v4w5/transitioning_from_c_to_c/ also check the sidebar for more useful links.
MSDN has excellent documentation and guides to get you started with C#.

I see and appreciate your work, especially the way you simplify and explain things. I would love to learn from following you.
Thanks for your kind words. Hope to see your projects and/or contributions on GitHub soon. Smiley
245  Bitcoin / Development & Technical Discussion / Re: Do invalid keys in BIP44 path matter? on: July 14, 2020, 03:07:45 PM
Follow up ques: If parent key at m/44'/0'/0'/0 is found to be valid, shouldn't I be checking the corresponding parent key of internal chain at m/44'/0'/0'/1 before assuming its safe to use? Otherwise we would have no valid change addresses to send money to.

Each key is checked only when it is generated and wallets usually generate a bunch of them at a time, there is no need to check the ones that may be generated in the future. Keep in mind that chances of finding an invalid key is extremely small since sekp256k1 order is very close to 2256.

If a child key was invalid you simply skip it and get the next one, meaning m/44'/0'/0'/0/0, m/44'/0'/0'/0/1, m/44'/0'/0'/0/2, m/44'/0'/0'/0/4, m/44'/0'/0'/0/5 assuming index=3 gave an invalid key.
But if the parent key (eg the key at depth 1) was invalid you should stop, that would be a very unlikely error and the seed must be changed, meaning stop if m/44'/ was invalid. At least that is what I do in my Bitcoin.Net code.
246  Bitcoin / Project Development / Re: Denovo (v 0.0.0) and Bitcoin.Net (v 0.4.1) on: July 14, 2020, 05:23:51 AM
Version 0.3.0 released.
This release is focusing on the default transaction signing methods and Script classes by improving the code and increasing their test coverage to near 100%.
  • New BIP: Signatures of Messages using Private Keys (BIP-137)
  • Improve Address and FastStream classes
  • Add missing parts in transaction methods for signing
  • Some improvements and bug fixes in script classes
  • Various code improvements, xml doc correction, additional tests and some bug fixes
Version 0.4.0 released.
This release is focusing on the improving P2PNetwork namespace
  • Improvements in P2PNetwork namespace
  • New BIP: Compact Block Relay: SendCmpct, CmpctBlock, GetBlockTxn (BIP-152)
  • New hash algorithm: SipHash
  • Add a miner with limited functionality to add the option to mine a block if needed (will be improved in the future)
  • BIP-39 now lets caller get the entire 2048 words from its wordlists
  • Various code improvements and additional tests
Version 0.4.1 released.
This minor version focuses on improving P2PNetwork namespace more and adds a new BIP
  • New BIP: Electrum mnemonics
  • Minor optimization of some of the classes under Cryptography.Hashing
  • Separated listening and connecting operations from Node class
  • Decouple more classes in P2PNetwork and introduce NodeStatus and ClientSettings classes
247  Bitcoin / Development & Technical Discussion / Re: Do invalid keys in BIP44 path matter? on: July 14, 2020, 02:57:59 AM
It could potentially cause problems if we ignore validity (being in range) of the parent derived keys because even though BIP-32 may look like any other Key Derivation Function but it is more than a simple KDF. For instance each non-hardened child key is derived using the parent's public key which means that parent key must have been in range to be used in EC multiplication.

BIP-44 is not relevant here but since you mentioned it, lets take the path used in this BIP:
m / 44' / 0' / 0' / 0 / 0
The bold one is the child keys used in creating addresses.
You won't notice the problem in first 3 depths since they are all hardened but the last one is not. If the parent key at m/44'/0'/0'/0 returned a key that is outside of curve range you can't derive the child key at  m / 44'/0'/0'/0/0 anymore.
So the standard has to enforce this validity check on each step.
248  Bitcoin / Electrum / Re: Technical help needed regarding Electrum mnemonics on: July 04, 2020, 01:35:27 PM
Yeah I do realize that! But the problem isn't the HMAC function, it instead is what's being passed to this function.

You see unlike BIP-39, Electrum heavily modifies the words in the given string before it passes them to the HMAC function. For example in the case of the test vector linked above all spaces are being removed then it is passed to the HMAC function as "msg". That makes the data part 35 bytes whereas it normally would have somewhere around 80+.
Code:
眼 悲 叛 改 节 跃 衡 响 疆 股 遂 冬 -> 眼悲叛改节跃衡响疆股遂冬

Basically my code was simply missing these 2 methods:
https://github.com/Autarkysoft/Denovo/blob/648419d8a3ccd590051ab390539b0b7147917d4e/Src/Autarkysoft.Bitcoin/ImprovementProposals/ElectrumMnemonic.cs#L234-L258
249  Bitcoin / Electrum / Re: Technical help needed regarding Electrum mnemonics on: July 03, 2020, 05:55:16 PM
Could you also tell me what "msg" does it pass this function:
https://github.com/spesmilo/electrum/blob/8d7370d897314d8542906aecc6a45cc949651f77/electrum/crypto.py#L299
250  Bitcoin / Electrum / Technical help needed regarding Electrum mnemonics on: July 03, 2020, 03:14:44 PM
I'm trying to add Electrum mnemonic recovery option to The FinderOuter and looking at the test_mnemonic.py file I'm having trouble understanding the tests even though I think I understand how the mnemonic.py file works.

The English test vectors in this file and also random keys I created using Electrum work fine meaning after computing HmachSha512(data=words, key="Seed version") I get a digest that starts with SEED_PREFIX (01) or SEED_PREFIX_SW (100). eg. the first digest is 1001bc7d1ea.... which is all Electrum looks for in a valid mnemonic (there is no checksum).

But the rest don't.
Take the Chinese case for example, the digest is
Code:
0f5c4c9ff66e87bcbdde59f06ad540eba48fe06f7bdfa16b1248cb868ae3cd3fe7f6ea08e50bc77fdec1f08d8b5710bd25a9d76427e636feed23cbcb3ec8b8cb
Which is incorrect.
It is worth mentioning that the words are normalized using form KD as is with BIP-39 and return the same bytes as the "words_hex" in test vector.

So what is the problem here?
251  Bitcoin / Development & Technical Discussion / Re: Step by step guide to go from public key to a Bech32 encoded address on: July 03, 2020, 05:14:19 AM
I'm trying to decode a bech32 address tb1qwm3dqje4wc7cs2u9sv39yh2as8ae0ntzqkjunw into the h160 of the public key

Same process steps in reverse:
Map each character to its index in Bech-32 charset after removing hrp (q=0; w=14,...):
Code:
0 14 27 17 13 0 18...
The result is in base-32 (5-bits group) and has to be converted back to base-256 (8-bits or 1 octet/byte group).
Also since this is an address, the first item is the witness version that has to be dropped and evaluated separately.
Code:
14 = 01110
27 = 11011
17 = 10001
13 = 01101
0  = 00000
18 = 10010
25 = 11001
...
Select 8-bits at a time:
Code:
01110110 11100010 11010000 01001011 ...
118      226      208      75 ...
which is  0x76e2d0... in hex and the same result that the site you linked gives.

PS. The additional steps to expand H.R.P and compute and verify checksum are skipped for simplicity but are mandatory.

How do I go from the array of numbers into the hex version of the h160 which according to https://slowli.github.io/bech32-buffer/ should be: 751e76e8199196d454941c45d1b3a323f1433bd6
Try again, when decoding Bech32=tb1qwm3dqje4wc7cs2u9sv39yh2as8ae0ntzqkjunw it returns 0x76e2d04b35763d882b858322525d5d81fb97cd62 as data (hexadecimal).
252  Bitcoin / Bitcoin Technical Support / Re: Correct / incorrect WIF on: June 29, 2020, 12:53:01 PM
Surprisingly, '99' flag resulted in 'K' or 'L' in every random private key that I've tried 

There are a bunch of different variations that could give similar looking key strings. Here are 3 examples from Bitcoin.Net test vectors:
Code:
5GPHYxaeAAqL2egjmyU8Kaaqh831aw12XJ92y2rgRWi1zc
L5HydKmZoMcqfoY9Rgi8BRnWGmDw9YhoUS9ArnToVxvyFbM9GyfJ
KwFAa6AumokBD2dVqQLPou42jHiVsvThY1n25HJ8Ji8REf1wxAQb
Same with BIP-32 extended keys.
253  Bitcoin / Development & Technical Discussion / Re: Bitcoin Address Utility I made (Visual C#, Source Only) on: June 29, 2020, 12:29:29 PM
the thing is when manually added the address with balance. it shows 0 btc,

Possibly because blockexplorer.com no longer works.
254  Bitcoin / Development & Technical Discussion / Historically has there been any BIP32/39 impl. that used uncompressed pubkeys? on: June 23, 2020, 08:39:14 AM
I'm adding BIP-39 recovery option to The FinderOuter and even though adding the option to also check uncompressed public keys or the addresses created using those is trivial, I'd rather not add it if it were never used in the history since sometimes having too many options is creating more confusion and my focus is simplicity of the tool as much as possible.
255  Bitcoin / Development & Technical Discussion / Re: Bitcoin Address Utility I made (Visual C#, Source Only) on: June 13, 2020, 04:16:04 AM
but is cascasius present at forum, or reading this,
Barely. Last activity on bitcointalk was 2019-12-29. Last activity on GitHub was 2013-02.
256  Bitcoin / Development & Technical Discussion / Re: Generating and using P2SH-wrapped-P2WPKH Bitcoin addresses [Tutorial] on: June 09, 2020, 04:47:11 PM
Do you have any idea how many "anyone can spent" outputs there have been in history like the one you linked where it always pushes a 1 to the stack at the end?
No, I haven't done any research in that area, actually I didn't know that address was used before either.
Here is another one on TestNet though: 2MyHxGtCH53AhhWTzqwRRCq3MUZ5DahmhRi
257  Bitcoin / Development & Technical Discussion / Re: Generating and using P2SH-wrapped-P2WPKH Bitcoin addresses [Tutorial] on: June 08, 2020, 03:46:45 PM
Is this a complete list or am I missing something?
If you think of "addresses" as human readable form of certain scripts then you'll see that there really isn't any cap to the number of addresses you can create, of course some may make no sense and some may be non-standard but for the sake of technical discussion here are some examples:
P2SH-P2PK: 33SjdVkpGHBENVKtYCEDtk4RmAPK7kvJUA
P2SH-P2PKH: 3LyehHxt2uq83FJz9EudBEVQR8mgtsPg8D
P2SH-1of1MultiSig: 3Ly4mSGMWhXq9KTXMnUvwy5rHoLoFBKYq9
P2SH-(locktime): 37TUHj9a2T7ip3m23Z5jX6YHJShZBRoHYv (locktime= e359de5e)
P2WSH(locktime): bc1q7le8nq4pem836mn702n3svx9q82wps9nv3rxhgh69eh2cl84ewrsv6f8t2 (locktime= e359de5e)
...
And here is an address that anyone can spend from: 3MaB7QVq3k4pQx3BhsvEADgzQonLSBwMdj
As an exercise try to guess redeem script of each of the above addresses.
Here is the code I used to create these: https://gist.github.com/Coding-Enthusiast/5e58b3ddc2161c853562bc483beddf69
258  Bitcoin / Development & Technical Discussion / Re: Why was BIP-61 (reject messages) removed from bitcoin core v0.20? on: June 07, 2020, 04:37:07 AM
Thanks for the links.

Shouldn't the protocol version be bumped also since there is no code to handle reject messages anymore? It is still the same 70015 as before:
https://github.com/bitcoin/bitcoin/blob/b1b173994406158e5faa3c83b113da9d971ac104/src/version.h#L12
259  Bitcoin / Development & Technical Discussion / Why was BIP-61 (reject messages) removed from bitcoin core v0.20? on: June 07, 2020, 03:20:10 AM
I've seen some reasons here and there but looking for full arguments against this BIP.
260  Bitcoin / Development & Technical Discussion / What is the maximum allowed P2P message size? on: June 02, 2020, 07:21:43 AM
The dev. doc.[1] keeps referring to MAX_SIZE in serialize.h file[2] which is 32 MiB when it comes to message sizes but this strange* comparison in net.cpp[3] seems to be rejecting anything above 4 MB[4].
Am I reading it correctly or am I missing something here?

* Strange because it is basically saying if size > 33,554,432 OR size > 4,000,000 and obviously the first check is redundant since both values are constant.

[1] https://developer.bitcoin.org/reference/p2p_networking.html
[2] https://github.com/bitcoin/bitcoin/blob/60abd463ac2eaa8bc1d616d8c07880dc53d97211/src/serialize.h#L23
[3] https://github.com/bitcoin/bitcoin/blob/9bc7751cadbd038faf8ac1d62cda23fcf00d4cc2/src/net.cpp#L660
[4] https://github.com/bitcoin/bitcoin/blob/9bc7751cadbd038faf8ac1d62cda23fcf00d4cc2/src/net.h#L56
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!