Base58 Decode Text - Base58 String Decoder - Online ...

lua-basex: base encoding/decoding of any given alphabet using bitcoin style leading zero compression (e.g., Base58)

submitted by un-def to lua [link] [comments]

How do I decode an external file of bitcoin addresses to base58?

I have a list of bitcoin addresses in address.txt that I want to decode to base58 and send to address.hex. How can I use this to accomplish that?
submitted by piratebootyjuice to learnprogramming [link] [comments]

Bitcoin mentioned around Reddit: lua-basex: base encoding/decoding of any given alphabet using bitcoin style leading zero compression (e.g., Base58) /r/lua

Bitcoin mentioned around Reddit: lua-basex: base encoding/decoding of any given alphabet using bitcoin style leading zero compression (e.g., Base58) /lua submitted by BitcoinAllBot to BitcoinAll [link] [comments]

Quick list of different key formats

Key forms that most people are familiar with are as follows:

BIP32 private key

This is a base58 encoding. If you decode this key back to binary, the important bits are the chain code and key-data. They are at the following offsets
chain_code = xprv[13:45] key_data = xprv[46:78]
where xprv[45] is 0x00 for a private key and either 0x02 or 0x03 for a public key. You can experiment with this by plugging the xprv into the "BIP32 Root Key" section of Ian's BIP39 utility.

BIP39 Mnemonic

saddle celery child artwork learn dignity silver enable build mouse field fence
These can be (technically) any multiple of three words from 3 to 24. Electrum will also use a close relation to this form but the two are not compatible. The BIP39 form is used to encode the words into a number (entropy) which is hashed to create a BIP32 seed. You can experiment with this by plugging the mnemonic into Ian's BIP39 utility.

SLIP39 Mnemonic

best pink academic academic easel lying holy rumor injury crystal plastic fancy inform disease step artwork unfair client beyond demand
These are generally 20 or 33 words. The are used with a sharing algorithm to combine into a BIP32 seed. These are used by the Trezor HW wallets. You can experiment with this by plugging the mnemonic into the "Combine" section of Ian's SLIP39 utility.

WIF format

This is a base58 encoding. If you decode this key back to binary, the private key is at wif[1:33] which encodes 128 bits of data. This is used by many wallet exports for a single bitcoin key pair. Bitcoin Core will also use this format to encode the BIP32 seed hdseed used in the sethdseed command. You can experiment with this by plugging the WIF into CoinBin's Verify Utility.

Raw BIP32 seed data

I've actually never seen a wallet use this form. It can encode between 128 bits (32 hex chars) and 512 bits (128 hex chars). This data is hashed to generate the BIP32 chain_code and key_data. You can experiment with this by plugging the right number of hex digits in the "BIP39 Seed" field on Ian's BIP39 utility.

Technically this is called a GUID and encodes 16 bytes (128 bits). I have no idea how that company goes from there to an address.
submitted by brianddk to Bitcoin [link] [comments]

Cash Address Progress Report: Bitcoin ABC has it. Electron Cash waiting to be released. Python, C, Go, PHP implementations available. Blockchair working on it. Two independently developed JS implementations have just been developed. Two online address translators have arrived.
submitted by uMCCCS to btc [link] [comments]

BIP39 words for a public key/address

I would like to tell someone 12 words, that could be decoded into a receive only bitcoin address (NOT A PRIVATE KEY). Basically an easier way to voice, over a phone perhaps, an address instead of speaking 33-34 base58 characters.
Does such a tool for conversion exist?
submitted by BannedNext26 to Bitcoin [link] [comments]

Monero PHP help

I had 2 quick ques. I'm trying to use the monero PHP library to decrypt a transaction pulled from a block explorer so that I can avoid sending my private view key to 3rd parties.
use MoneroIntegrations\MoneroPhp\Cryptonote;
use MoneroIntegrations\MoneroPhp\ed25519;

$cn = new Cryptonote();
$tx = json_decode(file_get_contents(' txid here'), true);
$extra = implode(array_map(function($x){ return str_pad(dechex($x), 2, '0', STR_PAD_LEFT); }, $tx['transaction_data']['extra']));

$derived = $cn->gen_key_derivation($cn->txpub_from_extra($extra), 'insert private view key here');

if( $cn->derive_public_key($derived, 'transaction ioutput index', 'insert public spend key here') == $tx['transaction_data']['vout'][0]['target']['key']){
`$sec1 = $cn->derivation_to_scalar($derived, 'transaction ioutput index');` `$sec2 = $cn->hash_to_scalar($sec1);` `$ec = new ed25519();` `echo bcsub($ec->decodeint(hex2bin($tx['transaction_data']['rct_signatures']['ecdhInfo'][0]['mask'])), $ec->decodeint(hex2bin($sec1)));` `echo bcsub($ec->decodeint(hex2bin($tx['transaction_data']['rct_signatures']['ecdhInfo'][0]['amount'])), $ec->decodeint(hex2bin($sec2)));` 

1- How are subaddresses handled? From this code so far my best guess is just looping through the public spend keys of all subaddresses but I assume that isn't correct.
2- How do I decode amounts? It seems like there's a few variations of it, I'd want to support both the 64 character long mask/amount as well as the 16 character long amount; most examples I've seen seem to be incomplete or missing portions of the code.
3- Is there a good way to sanity check the received transactions? (so we limit the 3rd party API to only possibly omitting transactions, but make sure they aren't able to send fake transactions). I'm assuming trying to validate the signatures will be impractical without just using the official client, but not sure if something simpler like Bitcoin's merkle hash validation exists.
submitted by EnvironmentalSpeech3 to Monero [link] [comments]

What happens after the Bitcoin Cash Address change?

Somewhen in January the address format for Bitcoin Cash changes to "bech32".
What will happen after the change? Will all the addresses used right now be changed as well? Will I still be able to use my BCH with my private key after the change?
submitted by PoopIsYum to btc [link] [comments]

BlockParser - A way to get the balance of all bitcoin addresses

For same time, I was searching for a way to get the balance of all bitcoin addresses in order to do statistical analysis of the wealthy distribution. If finally found a way to do it without using an external API such as This method will allow you to create a list of all bitcoin addresses ordered by balance, excluding empty ones. This does not work properly for addresses involved in multisignature transactions.
Step 1 – Parse all blocks using this small program
#!/usbin/perl # File: # Author: Saulo Fonseca # Licence: GNU GPLv3 use warnings; use strict; use JSON; # Get argument as block number my $blockNumber = $ARGV[0] + 0; # Convert to int # Get all transactions my $blockHash = `bitcoin-cli getblockhash $blockNumber`; chomp($blockHash); my $out = `bitcoin-cli getblock $blockHash`; my $json = decode_json($out); if (defined $json->{'tx'}) { my $txs = $json->{'tx'}; foreach my $txHash (@$txs) { $out = `bitcoin-cli getrawtransaction $txHash 1`; $json = decode_json($out); if (defined $json->{'vin'}) { # Get all input transactions my $vins = $json->{'vin'}; foreach my $vin (@$vins) { if (defined $vin->{'txid'}) { my $tx = $vin->{'txid'}; my $index = $vin->{'vout'}; printf("%s\t%d\tdel\n",$tx,$index); } } } if (defined $json->{'vout'}) { # Get all output addresses my $vouts = $json->{'vout'}; foreach my $vout (@$vouts) { if (defined $vout->{'scriptPubKey'}->{'addresses'}) { my $keys = $vout->{'scriptPubKey'}->{'addresses'}; my $value = $vout->{'value'}; my $index = $vout->{'n'}; foreach my $key (@$keys) { printf("%s\t%d\t%s\t%.8f\n",$txHash,$index,$key,$value); } } } } } } 
This program will get the height of the block as an argument and return a tab separated output with the following columns:
Here is an example of the output for the block 100000 (with cropped TXIDs in order to fit the reddit width):
8c14f0...d06d87 0 1HWqMzw1jfpXb3xyuUZ4uWXY4tqL2cW47J 50.00000000 87a157...382e03 0 del fff252...9702c4 0 1JqDybm2nWTENrHvMyafbSXXtTk5Uv5QAn 5.56000000 fff252...9702c4 1 1EYTGtG4LnFfiMvjJdsU7GMGCQvsRSjYhx 44.44000000 cf4e29...bf3ec3 1 del 6359f0...236ec4 0 1H8ANdafjpqYntniT3Ddxh4xPBMCSz33pj 0.01000000 6359f0...236ec4 1 1Am9UTGfdnxabvcywYG2hvzr6qK8T3oUZT 2.99000000 f4515f...72600b 0 del e9a668...b80c1d 0 16FuTPaeRSPVxxCnwQmdyx2PQWxX6HWzhQ 0.01000000 
You should process all blocks using this program and send the output to a text file. The command in bash that does it is:
seq -w 1 555000 | while read i; do (./ $i >> blocks.txt); done 
This will take a while depending on the performance of your system. However, it must be done only one time.
Step 2 – Export the list of all spent transactions
Use the following command to export all spent transactions on all processed blocks on step 1:
grep -h del blocks.txt | cut -f1,2 > spent.txt 
The lower cap letter L in “del” will not match any entry on a hex string nor on an address, as it is not allowed in base58.
Step 3 – Get the list of all UTXO
By removing all spent transactions, you have the list of all UTXO (unspent transactions output). Do it by running:
grep -v -f spent.txt blocks.txt > utxo.txt 
Step 4 – List all addresses balances
Using the UTXO list, you can get the balances of all addresses by running:
cat utxo.txt | cut -f3,4 | awk '{ seen[$1] += $2 } END { for (i in seen) printf "%.8f\t%s\n", seen[i], i }' | sort -n -r > anyBTC.txt 
You can import this last file on your favorite analysis program in order to have a better idea how the distribution of bitcoins over the addresses is.
PS: After the arrival of new blocks by the network, you only need to process the step 1 for the new blocks and repeat all the other steps in order to have an updated version of the files.
submitted by sauloqf to Bitcoin [link] [comments]

How many bits is a private key?

Here's what I don't understand. A private key is 256 bits which is 32 bytes.
However, when I look at my private key in Electrum, each is 52 characters. They start with "K" or "L" since they are WIF-Compressed.
I assume that 1 byte = 1 character (unless it's hex which these keys are not in).
What am I not understanding here? Thanks!
submitted by bintytinty to Bitcoin [link] [comments]


LTO Network claims to be a toolkit for private permissionless chains. Main idea is that for every business process there’s a fairly simple workflow (that can be expressed as a state machine) that happens in private and is shared between participants only. Every step in that process is logged, and logs are anchored to a public blockchain regularly. If there is a conflict between participants that has to be escalated, arbitration happens in court using anchored logs; public blockchain is used as a zero knowledge notary. You can compare it to ad-hoc private plasma chains with legal arbitration (instead of onchain challenge). Let’s check out if the code lives up to the promise.
LTO Network’s github has 98 repositories. Many of them are not important for the review purposes: helper libraries (i.e. base58-php-ext: PHP extension for base58 encoding and decoding using the Bitcoin alphabet), project page sources, in-joke. Still, there is a lot of code to check out.
Most important are following repositories:
  1. legalflow
  2. iam
  3. legalevents
  4. anchor
  5. project-orange
  6. lto-api.js
  7. livecontracts-specs
Around a dozen developers worked on those, including jasny (Arnold Daniels). Commit history runs as deep as 2014 (though some code was clearly written even earlier), it’s a clean, tidy history, commits are fairly large and well-defined by their commit message. I’d recommend the team to step up their game when they’re going to open source it: things should be described and discussed explicitly in issues and pull requests, there should be at least a contribution guide and a better, longer description for all the open repositories. I can see by commit history the team is working in that direction: dev branches are definitely more developer-friendly than master.
There is a number of tests for every important piece of software. Tests are good but not extensive: something that can also be improved, given that LTO is essentially a solution to enforce security in a byzantine setting. There is a Travis-based CI process that is hooked up to github. Overall, an imperfect but decent development process.
Full review in:
Thanks to
submitted by EnriqueZGZ to ico [link] [comments]

Great interview questions for bitcoin engineers

From here...
Questions. Chapter 1: Introduction 1. What are the main Bitcoin terms? 2. What is a Bitcoin address? 3. What is a Bitcoin transaction? 4. What is a Bitcoin block? 5. What is a Bitcoin blockchain? 6. What is a Bitcoin transaction ledger? 7. What is a Bitcoin system? What is a bitcoin (cryptocurrency)? How are they different? 8. What is a full Bitcoin stack? 9. What are two types of issues that digital money have to address? 10. What is a “double-spend” problem? 11. What is a distributed computing problem? What is the other name of this problem? 12. What is an election? 13. What is a consensus? 14. What is the name of the main algorithm that brings the bitcoin network to the consensus? 15. What are the different types of bitcoin clients? What is the difference between these clients? Which client offers the most flexibility? Which client offers the least flexibility? Which client is the most and least secure? 16. What is a bitcoin wallet? 17. What is a confirmed transaction and what is an unconfirmed transaction? Chapter 2: How Bitcoin works. 1. What is the best way to understand transactions in the Bitcoin network? 2. What is a transaction? What does it contain? What is the similarity of a transaction to a double entry ledger? What does input correspond to? What does output correspond to? 3. What are the typical transactions in the bitcoin network? Could you please name three of such transactions and give examples of each type of the transaction? 4. What is a QR and how it is used in the Bitcoin network? Are there different types of QRs? If so, what are the different types? Which type is more informational? What kind of information does it provide? 5. What is SPV? What does this procedure check and what type of clients of the Bitcoin network usually use this procedure? Chapter 3: The Bitcoin client. 1. How to download and install the Core Bitcoin client? 2. What is the best way to test the API available for the Core Bitcoin client without actually programming? What is the interface called? 3. What are the major areas of operations in the Bitcoin client? What can we do with the client? 4. What are the available operations for the Bitcoin addresses? 5. What are the available read operations for the Bitcoin transactions? How is a transaction encoded in the Bitcoin network? What is a raw transaction and what is a decoded transaction? 6. If I want to get information about a transaction that is not related to any address in my own wallet, do I need to change anything in the Bitcoin client configuration? If yes, which option do I need to modify? 7. What are the available read operation for the Bitcoin blocks? 8. What are the available operations for the creation of the transactions in the Bitcoin network? 9. How do you normally need to address the unspent output from the previous transaction in order to use it as an input for a new transaction? 10. What is the mandatory operation after creating a new transaction and before sending this new transaction to the network? What state does the wallet have to be in order to perform this operation? 11. Is the transaction ID immutable (TXID)? If not why, if yes, why and when? 12. What does signing a transaction mean? 13. What are the other options for Bitcoin clients? Are there any libraries that are written for some specific languages? What types of clients do these libraries implement? Chapter 4: Keys, Addresses and Wallets. 1. What is a PKC? When it was developed? What are the main mathematical foundations or functions that PKC is using? 2. What is ECC? Could you please provide the formula of the EC? What is the p and what is the Fp? What are the defined operations in ECC? What is a “point to infinity”? 3. What is a Bitcoin wallet? Does this wallet contain coins? If not, what does it contain then? 4. What is a BIP? What it is used for? 5. What is an encrypted private key? Why would we want to encrypt private keys? 6. What is a paper wallet? What kind of storage it is an example of? 7. What is a nondeterministic wallet? Is it a good wallet or a bad wallet? Could you justify? 8. What is a deterministic wallet? 9. What is an HD wallet? 10. How many keys are needed for one in and out transaction? What is a key pair? Which keys are in the key pair? 11. How many keys are stored in a wallet? 12. How does a public key gets created in Bitcoin? What is a “generator point”? 13. Could you please show on a picture how ECC multiplication is done? 14. How does a private key gets created in Bitcoin? What we should be aware of when creating a new private key? What is CSPRNG? What kind of input should this function be getting? 15. What is a WIF? What is WIF-Compressed? 16. What is Base58 encoding and what is Base58Check encoding? How it is different from Base64 encoding? Which characters are used in Base58? Why Base58Check was invented? What kind of problems does it solve? How is Base58Check encoding is created from Base58 encoding? 17. How can Bitcoin addresses be encoded? Which different encodings are used? Which key is used for the address creation? How is the address created? How this key is used and what is the used formula? 18. Can we visually distinguish between different keys in Base58Check format? If yes, how are they different from each other? What kind of prefixes are used? Could you please provide information about used prefixes for each type of the key? 19. What is an index in HD wallets? How many siblings can exist for a parent in an HD wallet? 20. What is the depth limitation for an HD wallet key hierarchy? 21. What are the main two advantages of an HD wallet comparing to the nondeterministic wallets? 22. What are the risks of non-hardened keys creation in an HD wallet? Could you please describe each of them? 23. What is a chain code in HD wallets? How many different chain code types there are? 24. What is the mnemonic code words? What are they used for? 25. What is a seed in an HD wallet? Is there any other name for it? 26. What is an extended key? How long is it and which parts does it consist of? 27. What is P2SH address? What function are P2SH addresses normally used for? Is that correct to call P2SH address a multi-sig address? Which BIP suggested using P2SH addresses? 28. What is a WIF-compressed private key? Is there such a thing as a compressed private key? Is there such a thing as a compressed public key? 29. What is a vanity address? 30. What is a vanity pool? 31. What is a P2PKH address? What is the prefix for the P2PKH address? 32. How does the owner prove that he is the real owner of some address? What does he have to represent to the network to prove the ownership? Why a perpetrator cannot copy this information and reuse it in the next transactions? 33. What is the rule for using funds that are secured by a cold storage wallet? How many times you can send to the address that is protected by the private key stored in a cold storage? How many times can you send funds from the address that is protected by the private key stored in a cold storage? Chapter 5: Transactions. 1. What is a transaction in Bitcoin? Why is it the most important operation in the Bitcoin ecosystem? 2. What is UTXO? What is one of the important rules of the UTXO? 3. Which language is used to write scripts in Bitcoin ecosystem? What are the features of this language? Which language does it look like? What are the limitations of this language? 4. What is the structure of a transaction? What does transaction consists of? 5. What are the standard transactions in Bitcoin? How many standard transactions there are (as of 2014)? 6. What is a “locking script” and what is an “unlocking script”? What is inside these scripts for a usual operation of P2PKH? What is a signature? Could you please describe in details how locking and unlocking scripts work and draw the necessary diagrams? 7. What is a transaction fee? What does the transaction fee depend on? 8. If you are manually creating transactions, what should you be very careful about? 9. Could you please provide a real life scenario when you might need a P2SH payment and operation? 10. What is the Script operation that is used to store in the blockchain some important data? Is it a good practice? Explain your answer. Chapter 6: The Bitcoin Network. 1. What is the network used in Bitcoin? What is it called? What is the abbreviation? What is the difference between this network architecture and the other network architectures? Could you please describe another network architecture and compare the Bitcoin network and the other network architectures? 2. What is a Bitcoin network? What is an extended Bitcoin network? What is the difference between those two networks? What are the other protocols used in the extended Bitcoin network? Why are these new protocols used? Can you give an example of one such protocol? What is it called? 3. What are the main functions of a bitcoin node? How many of them there are? Could you please name and describe each of them? Which functions are mandatory? 4. What is a full node in the Bitcoin network? What does it do and how does it differ from the other nodes? 5. What is a lightweight node in the Bitcoin network? What is another name of the lightweight node? How lightweight node checks transactions? 6. What are the main problems in the SPV process? What does SPV stand for? How does SPV work and what does it rely on? 7. What is a Sybil attack? 8. What is a transaction pool? Where are transaction pools stored in a Bitcoin network client? What are the two different transaction pools usually available in implementations? 9. What is the main Bitcoin client used in the network? What is the official name of the client and what is an unofficial name of this client? 10. What is UTXO pool? Do all clients keep this pool? Where is it stored? How does it differ from the transaction pools? 11. What is a Bloom filter? Why are Bloom filters used in the Bitcoin network? Were they originally used in the initial SW or were they introduced with a specific BIP? Chapter 7: The Blockchain. 1. What is a blockchain? 2. What is a block hash? Is it really a block hash or is it a hash of something else? 3. What is included in the block? What kind of information? 4. How many parents can one block have? 5. How many children can one block have? Is it a temporary or permanent state of the blockchain? What is the name of this state of the blockchain? 6. What is a Merkle tree? Why does Bitcoin network use Merkle trees? What is the advantage of using Merkle trees? What is the other name of the Merkle tree? What kind of form must this tree have? 7. How are blocks identified in the blockchain? What are the two commonly used identities? Are these identities stored in the blockchain? 8. What is the average size of one transaction? How many transactions are normally in one block? What is the size of a block header? 9. What kind of information do SPV nodes download? How much space do they save by that comparing to what they would need if they had to download the whole blockchain? 10. What is a usual representation of a blockchain? 11. What is a genesis block? Do clients download this block and if yes – where from? What is the number of the genesis block? 12. What is a Merkle root? What is a Merkle path? Chapter 8: Mining and Consensus. 1. What is the main purpose of mining? Is it to get the new coins for the miners? Alternatively, it is something else? Is mining the right or good term to describe the process? 2. What is PoW algorithm? 3. What are the two main incentives for miners to participate in the Bitcoin network? What is the current main incentive and will it be changed in the future? 4. Is the money supply in the Bitcoin network diminishing? If so, what is the diminishing rate? What was the original Bitcoin supply rate and how is it changed over time? Is the diminishing rate time related or rather block related? 5. What is the maximum number of Bitcoins available in the network after all the Bitcoins have been mined? When will all the Bitcoins be mined? 6. What is a decentralized consensus? What is a usual setup to clear transactions? What does a clearinghouse do? 7. What is deflationary money? Are they good or bad usually? What is the bad example of deflationary spiral? 8. What is an emergent consensus? What is the feature of emergent consensus? How does it differ from a usual consensus? What are the main processes out of which this emergent decentralized consensus becomes true? 9. Could you please describe the process of Independent Transaction Verification? What is the list of criteria that are checked against a newly received transaction? Where can these rules be checked? Can they be changed over time? If yes, why would they be changed? 10. Does mining node have to be a full node? If not, what are the other options for a node that is not full to be a mining node? 11. What is a candidate block? What types of nodes in the Bitcoin network create candidate blocks? What is a memory pool? Is there any other name of the memory pool? What are the transactions kept in this memory pool? 12. How are transactions added to the candidate block? How does a candidate block become a valid block? 13. What is the minimum value in the Bitcoin network? What is it called and what is the value? Are there any alternative names? 14. What is the age of the UTXO? 15. How is the priority of a transaction is calculated? What is the exact formula? What are the units of each contributing member? When is a transaction considered to be old? Can low priority transactions carry a zero fee? Will they be processed in this case? 16. How much size in each block is reserved for high priority transactions? How are transactions prioritized for the remaining space? 17. Do transactions expire in Bitcoin? Can transactions disappear in the Bitcoin network? If yes, could you please describe such scenario? 18. What is a generation transaction? Does it have another name? If it does, what is the other name of the transaction? What is the position of the generation transaction in the block? Does it have an input? Is the input usual UTXO? If not – what is the input called? How many outputs there are for the generation transaction? 19. What is the Coinbase data? What is it currently used for? 20. What is little-endian and big-endian formats? Could you please give an example of both? 21. How is the block header constructed? Which fields are calculated and added to the block header? Could you please describe the steps for calculation of the block header fields? 22. What is a mantissa-exponent encoding? How is this encoding used in the Bitcoin network? What is the difficulty target? What is the actual process of mining? What kind of mathematical calculation is executed to conduct mining? 23. Which hash function is used in the Bitcoin mining process? 24. Could you describe the PoW algorithm? What features of the hash function does it depend on? What is the other name of the hash function? What is a nonce? How can we increase the difficulty of the PoW calculation? What do we need to change and how do we need to change this parameter? 25. What is difficulty bits notation? Could you please describe in details how it works? What is the formula for the difficulty notation? 26. Why is difficulty adjustable? Who adjusts it and how exactly? Where is the adjustment made? On which node? How many blocks are taken into consideration to predict the next block issuance rate? What is the change limitation? Does the target difficulty depend on the number of transactions? 27. How is a new block propagated in the network? What kind of verification does each node do? What is the list of criteria for the new block? What kind of process ensures that the miners do not cheat? 28. How does a process of block assembly work? What are the sets of blocks each full node have? Could you please describe these sets of blocks? 29. What is a secondary chain? What does each node do to check this chain and perhaps to promote it to the primary chain? Could you please describe an example when a fork occurs and what happens? 30. How quickly forks are resolved most of the time? Within how many new block periods? 31. Why the next block is generated within 10 minutes from the previous? What is this compromise about? What do designers of the Bitcoin network thought about when implementing this rule? 32. What is a hashing race? How did Bitcoin hashing capacity has changed within years from inception? What kind of hardware devices were initially used and how did the HW utilization evolved? What kind of hardware is used now to do mining? How has the network difficulty improved? 33. What is the size of the field that stores nonce in the block header? What is the limitation and problem of the nonce? Why was an extra nonce created? Was there any intermediate solution? If yes, what was the solution? What are the limitations of the solution? 34. What is the exact solution for the extra nonce? Where does the new space come from? How much space is currently used and what is the range of the extra nonce now? 35. What is a mining pool? Why was it created? How are normally such pools operated? Do they pay regularly to the pool participants? Where are newly created Bitcoins distributed? To which address? How do mining pools make money? How do the mining pools calculate the participation? How are shares earned calculated? 36. What is a managed pool? How is the owner of the pool called? Do pool members need to run full nodes? Explain why or why not? 37. What are the most famous protocols used to coordinate pool activities? What is a block template? How is it used? 38. What is the limitation of a centralized pool? Is there any alternative? If yes, what is it? How is it called? How does it work? 39. What is a consensus attack? What is the main assumption of the Bitcoin network? What can be the targets of the consensus attacks? What can these attacks do and what they cannot do? How much overall capacity of the network do you have to control to exercise a consensus attack? Chapter 9: Alternative Chains, Currencies and Applications. 1. What is the name of alternative coins? Are they built on top of the Bitcoin network? What are examples of them? Is there any alternative approach? Could you please describe some alternatives? 2. Are there any alternatives to the PoW algorithm? If yes – what are the alternatives? Could you please name two or three? 3. What is the operation of the Script language that is used to store a metadata in Bitcoin blockchain? 4. What is a coloured coin? Could you please explain how it is created and how it works? Do you need any special SW to manage coloured coins? 5. What is the difference between alt coins and alt chains? What is a Litecoin? What are the major differences between the Bitcoin and Litecoin? Why so many alt coins have been created? What are they usually based on? 6. What is Scrypt? Where is it used and how is it different from the original algorithm from which it has been created? 7. What is a demurrage currency? Could you please give an example of one blockchain and crypto currency that is demurrage? 8. What is a good example of an alternative algorithm to PoW? What is it called and how is it different from the PoW? Why the alternatives to Bitcoin PoW have been created? What is the main reason for this? What is dual-purpose PoW algorithms? Why have they been created? 9. Is Bitcoin “anonymous” currency? Is it difficult to trace transactions and understand someone’s spending habits? 10. What is Ethereum? What kind of currency does it use? What is the difference from Bitcoin? Chapter 10: Bitcoin security. 1. What is the main approach of Bitcoin security? 2. What are two common mistakes made by newcomers to the world of Bitcoin? 3. What is a root of trust in traditional security settings? What is a root of trust in Bitcoin network? How should you assess security of your system? 4. What is a cold storage and paper wallet? 5. What is a hardware wallet? How is it better than storing private keys on your computer or your smart phone?
submitted by 5tu to BitcoinTechnology [link] [comments]

Export transaction history from ledger with

Hi !
for the accounting of my company, i try to export all my transaction from Segwit btc ledger adress.
ledger live xpub is in wrong format and has incorrect prefix
Thanks to Shiva from here is the solution :
-the solution is either to use ledger chrome app in legacy mode
Or -You have to convert xpub to ypub !

With that py script :
import base58
import sys
def main():
xpub = sys.argv[1]
bin_ypub=prefix + bin_ypub[4:]
print ypub

if __name__=="__main__":
Thanks Shiva & !
submitted by Skaramasov to Bitcoin [link] [comments]

Public Key Derivation

Hi Guys,
I have decoded the way the EOS key pair works. Instead of using the generated key pair, you may use (AT YOUR OWN RISK) your own private key and then generate the EOS public key as follows:
  1. Go to > wallet details (Bitcoin) and paste your private key. The UNCOMPRESSED private WIF key will be your EOS private key.
  2. Copy the generated Compressed Public Key (66 hex characters) and paste in a text file (say, temp.txt).
  3. Using EDXOR or some good Hex convertor, convert temp.txt file from hex to raw ANSI characters (binary format) and save the file.
  4. Find Ripemd160 of the temp.txt file.
  5. Copy first 8 hex characters of the Ripemd160 hash and concatenate to the Compressed public key obtained in step2.
  6. Using (now removed, google it to find old archives) convert the hex string obtained in step 5 to Base58 format.
  7. Prefix EOS to the code obtained in step 6.
Voila, you obtained the corresponding EOS Public key.
Vote up if you liked.
Please also visit my website > Suncryt v1 and post comments there.
Thanks in advance.
Sunny Saini
submitted by www_SunnySaini_com to eos [link] [comments]

Electrum 3.0 release | Thomas Voegtlin | Nov 02 2017

Thomas Voegtlin on Nov 02 2017:
Electrum 3.0 was tagged and released yesterday night.
Release notes:

Release 3.0 - Uncanny Valley (November 1st, 2017)

Electrum Technologies GmbH / Waldemarstr 37a / 10999 Berlin / Germany
Sitz, Registergericht: Berlin, Amtsgericht Charlottenburg, HRB 164636
Geschäftsführer: Thomas Voegtlin
submitted by dev_list_bot to bitcoin_devlist [link] [comments]

exercise - crack privatekey Wif with python

I should crack the privatekey WIF the following data:
***(uncompressed) Public Key 04 b187b254eed8d....
*** message hash and its signature h1: 9788fd... r1: efc4 s1: 618ce
***another message hash and its signature h2: 7adb9... r2: efc4f.... s2: d8e7c8....
The following is the python code:
 #! python2 """encode/decode base58 in the same way that Bitcoin does""" __b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' __ b58base = len(__b58chars) def b58encode(v): """ encode v, which is a string of bytes, to base58. """ long_value = 0L for (i, c) in enumerate(v[::-1]): long_value += ord(c) << (8*i) # 2x speedup vs. exponentiation result = '' while long_value >= __b58base: div, mod = divmod(long_value, __b58base) result = __b58chars[mod] + result long_value = div result = __b58chars[long_value] + result # Bitcoin does a little leading-zero-compression: # leading 0-bytes in the input become leading-1s nPad = 0 for c in v: if c == '\0': nPad += 1 else: break return (__b58chars[0]*nPad) + result def b58decode(v, length): """ decode v into a string of len bytes """ long_value = 0L for (i, c) in enumerate(v[::-1]): long_value += __b58chars.find(c) * (__b58base**i) result = '' while long_value >= 256: div, mod = divmod(long_value, 256) result = chr(mod) + result long_value = div result = chr(long_value) + result nPad = 0 for c in v: if c == __b58chars[0]: nPad += 1 else: break result = chr(0)*nPad + result if length is not None and len(result) != length: return None return result import hashlib # print; print "****** Private key to WIF ******" print; print "*** [1] Private Key:" PrivateKey = 0xC28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1DL print hex(PrivateKey)[2:-1].zfill(64) print; print "*** [2] Extended Key:" extKey = ('80' + hex(PrivateKey)[2:-1].zfill(64)).decode('hex') print extKey.encode('hex') print; print "*** [3] SHA-256 hashing of the Extended Key:" h1 = hashlib.sha256(extKey).digest() print h1.encode('hex') print; print "*** [4] SHA-256 hashing of the SHA-256:" h2 = hashlib.sha256(h1).digest() print h2.encode('hex') print; print "*** [5] First 4 bytes of the second SHA-256 hash used as address checksum:" print h2[0:4].encode('hex') print; print "*** [6] checksum added at the end of extended key:" addr = extKey + h2[0:4] print addr.encode('hex') print; print "*** [7] Base58 encoding" wif = b58encode(addr) print wif print; print "****** WIF to private key ******" print; print "*** [1] Base58 WIF" print wif print; print "*** [2] Base58 decoding" addr = b58decode(wif, 37) print addr.encode('hex') print; print "*** [3] Extended key (checksum verified)" extKey = addr[0:-4] checksum = addr[-4:] verified = hashlib.sha256(hashlib.sha256(extKey).digest()).digest()[0:4]==checksum print extKey.encode('hex') + " (" + ("true" if verified else "false") + ")" print; print "*** [4] Private key" print extKey[1:].encode('hex') 
submitted by topo92 to Bitcoin [link] [comments]

BIP for PoP URI scheme | Kalle Rosenbaum | Jun 06 2015

Kalle Rosenbaum on Jun 06 2015:
Following earlier posts on Proof of Payment I'm now proposing the following
BIP for a Proof of Payment URI scheme (To read it formatted instead, go to
Kalle Rosenbaum
Title: Proof of Payment URI scheme
Author: Kalle Rosenbaum <kalle at>
Status: Draft
Type: Standards Track
== Abstract ==
This is a proposal for a URI scheme to be used in the Proof of Payment
== Motivation ==
To make a Proof of Payment, the party that wants the proof needs to
transfer a Proof of Payment request to the wallet software of the
other party. To facilitate that transfer, a new URI scheme
representing the PoP request is proposed. This URI can then be encoded
in QR images or sent over NFC in order to transfer it to the wallet.
== Specification ==
The specification is the same as BIP0021, with the following
the PoP. This could for example be a https: URL or a mailto:
the transaction to prove.
Just as in BIP0021, elements of the query component may contain
characters outside the valid range. These must first be encoded
according to UTF-8, and then each octet of the corresponding UTF-8
sequence must be percent-encoded as described in RFC 3986.
All parameters except p and n are hints to the
wallet on which transaction to create a PoP for.
The extensibility of BIP0021 applies to this scheme as well. For
example, a date parameter or a toaddr parameter
might be useful. req-* parameters are also allowed and obey
the same rules as in BIP0021, clients not supporting a req-*
parameter must consider the URI invalid.
=== Keep URIs short ===
Implementations should keep the URIs as short as possible. This is
because it makes QR decoding more stable. A camera with a scratched
lens or low resolution may run into problems scanning huge QR
codes. This is why the txid parameter is encoded in Base58
instead of the classic hex encoded string. We get away with 44
characters instead of 64. Also, the nonce parameter is Base58
encoded for the same reason.
== Interpretation ==
=== Transaction hints ===
The wallet processing the URI must use the hints in the PoP request to
filter its transaction set. The label, amount and
message parameters must, if present in the URI, exactly match
the data associated with the original payment according to the
following table:
| btcpop: URI parameter || bitcoin: URI parameter ||
BIP70 PaymentDetails data
| label || label ||
| amount || amount ||
sum of outputs.amount
| message || message ||
The txid parameter value must match the transaction hash of
the payment.
After filtering, the resulting transaction set is displayed to the
user who selects one of them to prove. An implementation could also
automatically select a transaction in the filtered set, but
there must still be a way for the user to select freely among the
matching transactions. If the filtered set is empty, no transaction
fits the hints and a message about that is presented to the user. If
the filtered set contains exactly one transaction, which is
preferable, that transaction can be automatically selected.
As a fallback, there must also be a way for the user to select any
transaction from the wallet regardless of the transaction hints. This
can be useful if the metadata of the wallet is lost, possibly due to a
restore from backup.
=== PoP destination p ===
The p parameter value is the destination where to send the
PoP to. This destination is typically a https: URL or a
http: URL, but it could be any type of URI, for example
mailto:. To keep btcpop: URIs short, users should
not make their p parameter unneccesarily long.
==== http: and https: URLs ====
Wallet implementations must support the http: and
https: schemes in which case POST method must be
used. The content type of the POST request must be set to
Content-Type: application/bitcoin-pop
Content-Transfer-Encoding: binary
== Examples ==
Send PoP for a transaction with label "video 42923" to>, using nonce 0x73 0xd5
0x1a 0xbb 0xd8 0x9c:
btcpop:?p= 42923
Send PoP through mail using
mailto:pop at, amount is 13370000
satoshis, nonce is 0x6f 0xe 0xfb 0x68 0x92 0xf9. Note that
the ? before subject is OK according to RFC3986,
since the query part starts from the first ?:
btcpop:?p=mailto:pop at;=xJdKmEbr&amount;=0.1337
Send PoP for transaction with id
to pizza place at>
using nonce 0xfc 0xcc 0x2c 0x35 0xf0 0xb8
== Reference implementation ==
[ poppoc on GitHub]
[ Mycelium fork on GitHub]
== References ==
[ BIP21]: URI
[[Proof of Payment BIP]]
[ RFC3986]: Uniform Resource Identifier
(URI): Generic Syntax
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
submitted by bitcoin-devlist-bot to bitcoin_devlist [link] [comments]

BEEF bei IOTA  Bitcoin: endlich ETF-Entscheidung?  b58-Update KW 32/18 Base58 encoding in python (bitcoin) How To Convert Bitcoin Cash Address from Base58 to Bech32 ... Base58 - YouTube Base58Check to Hash160 conversion with Python

Any wallet software can then take this address and decode it from base58 to get the public key hash, ... I think Satoshi ultimately had usability in mind for Bitcoin, and that’s why we have P2PKH. Would we still use P2PKH if Satoshi knew about compressed public keys? Maybe, maybe not. Good question. If you base58 encoded a compressed public key you would get an address that is 51 characters ... The code for these procedures can be found here: Base58 Validator/Decoder/Encoder in Perl. To generate a Bitcoin QR-Code for your Bitcoin Address, use https ... Base58 in Bitcoin. Base58 is used when you want to convert commonly used things in bitcoin in to an easier-to-share format. For example: WIF Private Keys. A private key is like a “master password”, and you can use it when you want to import bitcoins in to a new wallet. For this occassion, there is such a thing as a WIF Private Key, which is basically a private key in base58. Base58 Decoder Online Free . Base58 is a group of binary-to-text encoding schemes used to represent large integers as alphanumeric text, introduced by Satoshi Nakamoto for use with Bitcoin. It has since been applied to other cryptocurrencies and applications. It is similar to Base64 but has been modified to avoid both non-alphanumeric ... Base58 Encoder / Decoder is a free online developer tool to encode either text or HEX to Base58 or decode Base58 to text or HEX. This tool is split into two modes: Base58 Encoder and Base58 Decoder. Base58 Encoder - Converts either text or HEX to Base58. The input can be either text or HEX according to your preference. You can set it via the input type option.

[index] [16232] [33339] [51519] [47515] [18016] [19480] [25598] [25098] [25369] [29538]

BEEF bei IOTA Bitcoin: endlich ETF-Entscheidung? b58-Update KW 32/18

Here the links: Bitcoin Cash Address Converter: Bitcoin Cash (BCH) explorer: TREZOR Wiki Page:... This is part 13.1 of the Blockchain tutorial demonstrating how to do base-58 encoding. This tutorial is an extension to tutorial part 13. In this video serie... Base58 Decoding Blockchain Base58 ist ein Newsoutlet, welches blockchainrelevante Themen aufgreift und dabei die Möglichkeit bietet, diese mit technischem Hintergrund zu verstehen. In this video, we will continue a new series - coding bitcoin wallet in python. Using python3 I am going through the algorithm to encode any string of data to base58 characters. It is the encoding ... Base58 encoding in python (bitcoin) - Duration: ... Math Behind Bitcoin and Elliptic Curve Cryptography (Explained Simply) - Duration: 11:13 . Aimstone 17,306 views. 11:13. Public Key Cryptography ...