Bitcoin Forum
May 25, 2024, 03:52:16 AM *
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 »
321  Bitcoin / Bitcoin Technical Support / Re: [overview] Recover Bitcoin from any old storage format on: February 15, 2020, 05:21:05 AM
Hi can tell me how to use the software on a macbook or send me the exact link.

You'll have to compile the code yourself to be able to run it on macOS, my released binaries are only for Linux since I want to encourage users to run it on a live Linux and offline.
The readme file of the project has the required information for building: https://github.com/Coding-Enthusiast/FinderOuter#build-from-source-code
If you have Visual Studio, all you need to do is to open the .sln file and then build.

Please post your additional questions in the project's announcement (https://bitcointalk.org/index.php?topic=5214021.0) or open an issue on GitHub. Let's not hijack this topic anymore.
322  Bitcoin / Project Development / Denovo (v 0.7.0) and Bitcoin.Net (v 0.26.0) 2024-01-15 on: February 10, 2020, 07:24:57 AM
Table of Contents

__________


Introduction
This is 2 announcements inside 1 topic to introduce my biggest project to this date. It is an implementation of Bitcoin protocol from scratch without any kind of dependency or code translations.
In short: Denovo is the client and Bitcoin.Net is the library that can also be used by any other project separately.



Denovo
Denovo will eventually be a very flexible and easy to use tool with lots of features from a simple offline tool to handle keys and transaction signing to a full client capable of working as a full node or a SPV node and ultimately a second layer node (such as Lightning network node).
Currently Denovo is in beta and has very limited features listed below:

  • TestNet miner: a simple but powerful miner to mine testnet blocks and broadcast them used only for testing things that can not be tested otherwise.
  • Message encryption: encrypt and decrypt messages using Elliptic Curve Integrated Encryption Scheme (ECIES).
  • Transaction verifier: verify any bitcoin transaction by entering its raw hex and all its UTXOs.
  • WIF helper: an experimental feature to convert WIFs to mnemonic and back
  • Push transaction: broadcast transactions to other bitcoin nodes on mainnet and testnet



Bitcoin.Net
Bitcoin.Net is a stand alone bitcoin library written completely in C# and from scratch (no code translating) with no dependencies. It can be downloaded from Nuget here: https://www.nuget.org/packages/Autarkysoft.Bitcoin

Some characteristics:
  • Full xml documentation of the code explaining what each member does, expections that may be thrown, examples if needed,...
  • Neatly categorized namespaces for ease of access: Blockchain, Cryptography, P2PNetwork are the 3 main ones and there are Encoders, ImprovementProposals covering the rest.
  • Near 100% test coverage (for finished parts only, for now).
  • Loosely coupled implementation of blocks, transactions and scripts making it easy to test and scale.
  • Stand alone cryptography namespace making it possible to optimize functions for bitcoin (only some parts are currently optimized: Hashing and KeyDerivationFunctions namespaces)
  • Implementation of improvement proposals, consensus related BIPs are part of the library and optional bips (eg. BIP-32) are in separate classes.



If you are a .Net developer and a bitcoin enthusiast drop by and check it out. I appreciate your feedback.


Links
Source code on GitHub: https://github.com/Autarkysoft/Denovo
Want to help?
Review the code and leave your feedback in this topic about the code, features any possible bug(s), ...
Donate Bitcoin:
1Q9swRQuwhTtjZZ2yguFWk7m7pszknkWyk
bc1q3n5t9gv40ayq68nwf0yth49dt5c799wpld376s



To Do List (aka future features!)
  • [ ]Optimization of the libray.
  • [ ]Complete testing of remaining parts.
  • [ ]Add more relevant and useful BIPs.
  • [ ]Explore more ideas for a better Bitcoin (eg. block compressions and P2P protocol) to add under Experimental namespace.
  • [ ]Add Lightning Network protocol to both library and client.
323  Bitcoin / Bitcoin Technical Support / Re: [overview] Recover Bitcoin from any old storage format on: February 10, 2020, 06:46:57 AM
hi In the link you have provided where do input the private key with the missing characters?
https://github.com/Coding-Enthusiast/FinderOuter/blob/85d5fdaa8d931bc8709c6e5058704ca0fca94ab4/Src/FinderOuter/Services/Base58Sevice.cs#L338
324  Bitcoin / Bitcoin Technical Support / Re: [overview] Recover Bitcoin from any old storage format on: February 03, 2020, 03:28:37 AM
Hi All

in the following script where do input the private key with the missing characters? is it <param name="pubKey">Bitcoin Public Key</param>?

That is not a script, it is an old helper class to be used in different places within the program (from one of my old projects). It doesn't have any option to accept any "private" keys.
If you want to know how things are done you have to check the link I previously posted to the project called the FinderOuter.
For quick reference the entry point is here where "key" is the base58 encoded private key string containing missing characters that are replaced by a character defined by the missingChar char.
Initialize() method converts what it can from the given string to base-256 and sets the missing indexes. Then depending on key type (compressed or uncompressed) a LoopComp() or LoopUncomp() is called where different base-58 characters are placed in missing indexes and they are checked against the checksum. The rest are SHA-256 details.
325  Bitcoin / Development & Technical Discussion / What tips can you give to get me started on optimizing ECC? on: January 28, 2020, 08:41:40 AM
(I'm not looking for a library to use).

I've started working on optimizing my Elliptic Curve Cryptography code and am looking for some starter tips, maybe some papers on theoretical works on how to optimize ECC specifically for secp256k1 from basic components (ie. the int type used and basic arithmetic) to the cryptography itself.

For instance right now I'm implementing an optimized integer (ie. Unsigned modular 256-bit int) and I'm exploring different details of its implementation and the result has been up to 40x speed up compared to an arbitrary length integer that is not modular by default in certain operations.

I've also cloned libsec256k1 but I'd rather not look at it as my first step due to lack of documentation on code and specially since it could lead to code translating and I believe that it is the worst thing a developer can do.
326  Bitcoin / Development & Technical Discussion / What is the rational for using tagged hash instead of RFC6979 in Schnorr sigs? on: January 25, 2020, 04:54:45 AM
So far in bitcoin RFC-6979 has been used (my almost all implementations) to generate the ephemeral elliptic curve key pair needed in signing operations. BIP-340 on the other hand proposed using two SHA-256 hashes called "tagged hash" in Schnorr signatures. The only benefit of this alternative that I can think of is speed as compared to RFC-6979 it computes less number of SHA-256 hashes (at least 22 SHA-2 blocks vs fixed 4 SHA-2 blocks).

Is speed the only reason? If so does it even matter as we are talking about nano-seconds here and it is for the "signing" operation not verification?
327  Bitcoin / Development & Technical Discussion / Re: How to know BTC balance of certain addresses at a certain block height? on: January 22, 2020, 05:42:10 PM
https://api.blockcypher.com/v1/btc/main/addrs/$Address?limit=2000
The response will be in JSON, look for the key "txrefs" which is an array of transactions that contain hash, block height, ... Then it's just a matter of putting the result in an array and then filtering the result based on whatever block height number or datetime you want.

I am doing it this way in my little project. In the ForkBalance window you can update the tx history and by setting the height to whatever it will calculate the balance of the address at that height.
328  Bitcoin / Bitcoin Discussion / Re: A fun little Christmas themed brain teaser on: January 22, 2020, 05:22:45 PM
Here is how you should have solved the puzzle.
We have
- the ECDSA equation ([1])
- Base64 signature with a recid so we had:
  - r = 0x37bb22d3f7afe8668e9b28561332d9e3734a8139bfe139d2c094741456403609
  - s = 0x50ca4a3efdeb86e9252b4c32114d77ae71911f4f5ed3ce13e5f82bdfd30658ab
  - v = 0x01
- z aka e is calculated easily from the message: 0xfb917a8e7c3dd70b329d7671cc388329749f5e90a39b7f2670a1311e90bb516a
- k = 2020

Also the above equation could be changed to by knowing the basic properties of modular arithmetic:
s*k=z+rdA (mod n) => s*k - z = rdA (mod n) => (s*k - z)r-1 = dA (mod n)

First thing to know is that all of the above is "modular arithmetic" so x-1 or 1/x is not as simple as 1 divided by x. It is modular multiplicative inverse. That means 1/2 (mod n) is not 0.5 but instead it is 57896044618658097711785492504343953926418782139537452191302581570759080747169
ModInverse() method is found in all cryptography libraries.

With that we can calculate dA (that is the private key) as
Code:
0xc5b25300c3f76cd0142b5bcca95fe307eb1cda05df153f81039edaa92ef96afd
But if you get the P2PKH address from this key you'll get 1CNvS7ivEFrZWSbSSSc6fvQFgY7KNG16Aq (compressed pubkey) or as hatshepsut93 found 13LDi5Sb5YG2MAebUNkAB58t1DcFPCAaxZ (uncompressed pubkey).
By the way when redid-27 is bigger than 4 that means the compressed public key was used.

So something must have been wrong. It takes us back to recid. recid-27 is 5 and when you subtract 4 (the fixed value added to indicate compressed public key) you'll get 1. This could be an indication that negative s was used instead.
As I posted above, In bitcoin to prevent malleability there is a consensus rule that mandates usage of low S values in signatures. Which is basically a simple modular subtraction.

With the new (s = secp256k1.N - s) we get a new key value:
Code:
0x53616e746120436c61757320626974636f696e2070726976617465206b657921
Now if you get the P2PKH address of this key you'll get 14B3NsuKDk5piqnw71U9kDuSmvMJnYprnr which is the correct address.

But where is the reward?
A single private key corresponds to a single public key point and from that public key you can create multiple script types (for simplicity addresses) one of which is P2WPKH which is known as a native SegWit address.
Code:
private key: Kz1nt4DTapTZdBhRCNca7QazvC4WSA2rCTk1prmGxtHDYqNehZNe
public key: 022c17a18e7e6b625506ee24f09ed0e4475ae399cd7b16d25693490c07ab2fe94f
address: bc1qyt8g2aucnnd00wmwruxzw6eluf5ut4cmd0ljuz

And the final "mystery" was that if you look at the private key posted here more closely or with another "eye" you can see that it is a simple human readable string! All you have to do is to convert the base58 or base16 to UTF8 to get:
Code:
Santa Claus bitcoin private key!
329  Bitcoin / Bitcoin Discussion / Re: A fun little Christmas themed brain teaser on: January 22, 2020, 04:36:11 PM
Done! https://www.blockchain.com/btc/tx/a198aa79ed1dee8cc4f7501b000c8d9ef373aad826d4fa1bc15990d32e303c77

I imported it in Electrum with p2wpkh flag, worked like a charm!

Congrats. Hope everyone enjoyed the puzzle.
Just FYI there is another hidden mystery that hasn't been found yet. As soon as your transaction is confirmed I will post a comment explaining the steps needed to solve this puzzle and also reveal that mystery too. Meanwhile try looking at the key from another perspective, maybe you could figure that out too.
330  Bitcoin / Bitcoin Discussion / Re: A fun little Christmas themed brain teaser on: January 22, 2020, 04:26:44 PM
Now I only need to find what to do with this private key...

Try importing it in bitcoin-core, or maybe play around with the script types in Electrum when you import a key Wink
331  Bitcoin / Bitcoin Discussion / Re: A fun little Christmas themed brain teaser on: January 22, 2020, 04:15:02 PM
I already made some progress and learned a bit about ECDSA and Bitcoin, so even if I won't win, I'm already happy and I don't think the time I've spent is wasted.
I'm glad to hear it. That was my goal too. I hope you had fun with modular arithmetic.

So, I've found a key, it resolves to a different address but the signature with k = 2020 is (almost, aside from recid) the same as the challenge:
All the steps you have taken to compute this key were correct but there is another hidden first step that you should have taken to find the actual key that was used. The recid is telling you what that step is. But to make it easier here is another hint: BIP62.

then switched the recid in the signature to lead to another public key,
No, the recid is the correct value that should have been used.
332  Bitcoin / Bitcoin Discussion / Re: A fun little Christmas themed brain teaser on: January 19, 2020, 05:14:37 AM
Old quote:
AFAIK knowing k value alone isn't enough. you need 2 signed message with same k value to derive the private key.

That's for the case when all you know about k value is that it is reused.
Hint: if a*b=c and you have a and c then you can calculate b Wink


Since this is still unsolved after a couple of days, let me give more hints that would practically solve the puzzle short of revealing the private key itself!

So far we had a message that contained a lot of words starting with letter 'k' even one misspell to emphasize on letter 'k', if you counted them there are "20" of them. There is also "20" characters in the message that was signed. The total merit reward promises was also "20" and the year is "2020" I even put 0.00202000BTC reward up for grabs. So there is a theme here. The only other thing we have is a signed message.
As someone already guessed the first "mystery" (1 out of 3) and received the first 10 merits, the "k" used in this signature is 2020.

All that is left is to take a look at ECDSA equation ([1]) and solve it by having every variable except the private key.
We already have (r,s) from the signature, z from the message, n from curve and k was revealed already.

It is so easy, or is it? Wink
333  Bitcoin / Project Development / Re: The FinderOuter (initial release 2020-01-01) on: January 16, 2020, 01:11:21 PM
Will it verify messages from Segwit addresses?
Of course it will.
The 3 basic script types used in signing are supported: P2PKH (address starting with 1), P2WPKH (address starting with bc1) and P2SH-P2WPKH (address starting with 3).
I don't think there is anything else left apart from BIP-322 which I will add soon.
334  Bitcoin / Project Development / Re: The FinderOuter (initial release 2020-01-01) on: January 16, 2020, 12:27:33 PM
Next release (0.2.0) is probably going to take some more time as I am busy releasing Denovo (20k LoC so far) these days and the next feature requires optimization of ECC. However I keep releasing the code which could be used if you compile it yourself.
New feature is Missing Mnemonic which is when you have a seed phrase missing a couple of words.
There is also a changelog which helps you follow all the changes (and commits).
There is also a continuous integration workflow to ensure successful builds and deployment.

you should consider scenario when user missing few character but don't know location of the missing character.
I haven't been able to come up with a way to generalize this. The alternative is to hard code it for each case individually (one method for missing 1 char, another for 2 and so on) which I don't really like. I'm going to place it in an issue #1 until I can come up with a neat solution.
335  Bitcoin / Bitcoin Discussion / Re: A fun little Christmas themed brain teaser on: January 14, 2020, 11:34:09 AM
BTW the coins still sit there unclaimed even though the puzzle is almost solved!
336  Bitcoin / Development & Technical Discussion / Re: Digital signature in Bitcoin on: January 12, 2020, 06:21:56 PM
2) Why do we need to sign previous output's pubkey script?

The only person who can answer this is the creator (Satoshi Nakamoto) since it was his decision to design the system like this. There are discussions about this already here and here that you can read for more information.

Security-wise I can think of no reason why you would include previous transaction's PubkeyScript in your transaction since your transaction already has a reference to it when it includes the hash of the previous tx and signs it no matter what SigHashType you use.
337  Bitcoin / Bitcoin Technical Support / Re: [overview] Recover Bitcoin from any old storage format on: January 08, 2020, 03:55:59 PM
Thanks is there a tool i can use to recover ? as i must have missed a few characters off or could someone help me via private message  as i do not want to disclose it on here !!

You could use The FinderOuter. Compile it from source code or download the released version, run it offline. The program only has 2 options for now and you need the second option ("Missing Base58"). I believe the rest is self explanatory.
It should take a second to find the right key(s) with 3 missing characters.

Disclaimer: I am the developer of The FinderOuter. The project is brand new and in beta, I'll try to add new features (eg. not knowing the missing character locations) to it soon.
338  Bitcoin / Bitcoin Discussion / Re: A fun little Christmas themed brain teaser on: January 02, 2020, 04:45:54 PM
Nearly 4 days and only 1 reply. That's just sad Sad

Let's see how things are going to be like with an additional incentive. That is in additional to the joy of learning and receiving some merits.
Alas, I only have little to give but now the key holds 0.00202000BTC. <- 3rd mystery!

@SFR10 Why not give the whole thing another read Wink
339  Bitcoin / Project Development / Re: The FinderOuter (initial release 2020-01-01) on: January 02, 2020, 02:41:23 AM
I see you're switching to .NET Core and user don't need to deal with dependency at all. I can even run it on niche Linux distro Smiley
Yeah, netcore has been a fantastic decision by Microsoft. It is not only runs on multiple OS/platforms but also is fully open source and also highly optimized.
I'll slowly migrate all of my previous projects (eg. transaction tool) to netcore too but as a new project called Denovo.

As for finding missing Base58, IMO you should consider scenario when user missing few character but don't know location of the missing character.
Thanks for your feedback. I'll add this to my to-do list.
340  Bitcoin / Project Development / Re: The FinderOuter on: January 01, 2020, 05:07:18 AM
Major Updates (see commits on github for details)
  • [2020-01-01] Initial Release of Beta (0.1.0) Happy New Year!
  • [2020-02-19] v 0.1.1 finding private key with 3 missing characters at unknown locations.
  • [2020-03-10] v 0.1.2 recovery of hex private keys is now supported.
  • [2020-05-11] v 0.2.0 recovery of addresses and BIP-38 keys are now supported + move backend to Bitcoin.Net.
  • [2020-05-30] v 0.3.0 recovery of mini private keys is now supported.
  • [2020-06-30] v 0.4.0 recovery of BIP-39 mnemonics is now supported.
  • [2020-07-23] v 0.4.1 adds example button.
  • [2020-09-17] v 0.5.0 the parallelism update increasing speed from 10% to more than 1800% utilizing the whole CPU power.
  • [2020-12-24] v 0.6.0 recovery of Electrum mnemonic and more options in Base16 recovery.
  • [2021-02-02] v 0.7.0 UI improvements
  • [2021-03-20] v 0.8.0 recover BIP-32 path and Armory backup phrases
  • [2021-04-05] v 0.9.0 find encoding of a string, added help and knowledge base windows
  • [2021-05-05] v 0.10.0 huge optimization by changing ECC and solving issue #9
  • [2021-06-13] v 0.11.0 optimizing SHA and Base58 algorithm
  • [2021-08-13] v 0.12.0 recovering mnemonic passphrase is now supported.
  • [2021-08-19] v 0.12.1 bug fix in missing mnemonic passphrase option.
  • [2022-02-02] v 0.13.0 recovering BIP38 passwords is now supported.
  • [2022-03-07] v 0.14.0 general code improvement.
  • [2022-05-19] v 0.15.0 introduced search space.
  • [2022-09-19] v 0.16.0 introduced search space for BIP38 passphrases.
  • [2023-02-27] v 0.17.0 bug fixes and code improvement (pre-release for 1.0).
  • [2023-06-23] v 0.18.0 bug fixes and code improvement + 2 new small features (pre-release for 1.0).
  • [2023-11-15] v 0.19.0 new option to limit number of threads to use (pre-release for 1.0).
  • [2024-01-24] v 0.19.1 small but critical bug fix (pre-release for 1.0).


Complete change-log: https://github.com/Coding-Enthusiast/FinderOuter/blob/master/CHANGELOG.md
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!