NVD - CVE-2018-1000022

[PSA] Electrum and Eclair both support Testnet-LN to learn about LN

Update

I rewrote this post to clean it up a bit and add more context.
With the last few drops of Electrum it's been much easier to use LN. I've played around with Electrum-desktop on testnet. Everything worked great, and it is a great way to learn about channel capacity and invoices without having to put real money at risk. Electrum has a "swap" button to adjust capacity but I think it may be broken on testnet presently. There are a few ways to adjust capacity / liquidity that I'll discuss below.

Get Electrum running

  1. Install Electrum 4.0.2 and run it on testnet enabling LN.
  2. Get testnet BTC and send it to Electrum
  3. Open a channel in Electrum with either a known entity, or use their channel suggestion
  4. Wait an hour or so for the channel to open.
  5. Perform a submarine-swap operation to give you a 50/50 capacity
  6. Wait for the swap to complete

Balance capacity

LN channels have a (local) sending capacity and a (remote) receiving capacity. To verify your local/remote capacity click on the channel and view "Details". New channels default to 100%/0% local/remote capacity, meaning you can send, but not receive. There is also some rule that requires you to be below 90% local before you can receive anything. So if you need to receive payments on LN before you spend 10% of your local capacity you will need to find a way to balance local/remote. As mentioned before, the easiest is just to spend (try starblocks), but if you don't have anything to spend on there are some other options

Test Node Visibility

Once you free up some receive capacity, you also need to ensure that your node is reachable. In the default config your node will not be publicly visible. Electrum will handle the last hop for you, but your sender still need to at least be able to route to one of the nodes you have receive capacity on. This may occationally fail causing "Path not found" errots when sending, or when others send to you. In the Electrum preferences there are some options to run local watchtowers and keep the app resident. This will help since your wallet needs to be running for it to receive payments. But even if you enable all options sometimes you will just end up on an isolated node. If this happens, take care to ensure you connect to nodes that are highly connected to others (view 1ml highly connect list).
If you want to test your visibility, just paste an invoice in this thread and hopefully someone can try to send you some tBTC-LN.
submitted by brianddk to Bitcoin [link] [comments]

Beginner guide to Electrum on Testnet-LN allowing you to learn without cost.

Update

I rewrote this post to clean it up a bit and add more context. The original can still be found here
With the last few drops of Electrum it's been much easier to use LN. I've played around with Electrum-desktop on testnet. Everything worked great, and it is a great way to learn about channel capacity and invoices without having to put real money at risk. Electrum has a "swap" button to adjust capacity but I think it may be broken on testnet presently. There are a few ways to adjust capacity / liquidity that I'll discuss below.

Get Electrum running

  1. Install Electrum 4.0.2 and run it on testnet enabling LN.
  2. Get testnet BTC and send it to Electrum
  3. Open a channel in Electrum with either a known entity, or use their channel suggestion
  4. Wait an hour or so for the channel to open.
  5. Perform a submarine-swap operation to give you a 50/50 capacity
  6. Wait for the swap to complete

Balance capacity

LN channels have a (local) sending capacity and a (remote) receiving capacity. To verify your local/remote capacity click on the channel and view "Details". New channels default to 100%/0% local/remote capacity, meaning you can send, but not receive. There is also some rule that requires you to be below 90% local before you can receive anything. So if you need to receive payments on LN before you spend 10% of your local capacity you will need to find a way to balance local/remote. As mentioned before, the easiest is just to spend, but if you don't have anything to spend on there are some other options

Test Node Visibility

Once you free up some receive capacity, you also need to ensure that your node is reachable. In the default config your node will not be publicly visible. Electrum will handle the last hop for you, but your sender still need to at least be able to route to one of the nodes you have receive capacity on. This may occationally fail causing "Path not found" errots when sending, or when others send to you. In the Electrum preferences there are some options to run local watchtowers and keep the app resident. This will help since your wallet needs to be running for it to receive payments. But even if you enable all options sometimes you will just end up on an isolated node. If this happens, take care to ensure you connect to nodes that are highly connected to others.
If you want to test your visibility, just paste an invoice in this thread and hopefully someone can try to send you some tBTC-LN.
submitted by brianddk to brianddk [link] [comments]

Calculate txn_id from raw txn_hex

I'm trying to calculate a txn_id from raw txn_hex. The procedure works fine for legacy TXNs but gets non-expected results on Segwit TXNs. I compared this snippet of code to what txn_id was produced by Electrum and the blockchain.com TXN decoder:
  1. Take in TXN in hex
  2. Convert the hex to binarray
  3. Double hash binarray
  4. Reverse the resultant digest because of endianness
  5. Display in hex.
t0 is my legacy testnet TXN and t1 is my segwit testnet TXN.
Thoughts?

UPDATE

Found the relevant source in Electrum transaction.py:1036
Basically you strip the flags and tx_witnesses listed in the wiki spec
```python

!/usbin/env python3

[repo] https://github.com/brianddk/reddit ... python/txn_hash.py

[ref] https://www.reddit.com/g4hvyf

from hashlib import sha256
def txid(tx): bin = bytes.fromhex(tx) txid = sha256(sha256(bin).digest()).digest()[::-1].hex() return txid

Raw Legacy

t0 = ('0200000001cd3b93f5b24ae190ce5141235091cd93fbb2908e24e5b9ff6776ae' 'c11b0e04e5000000006b4830450221009f156db3585c19fe8e294578edbf5b5e' '4159a7afc3a7a00ebaab080dc25ecb9702202581f8ae41d7ade2f06c9bb9869e' '42e9091bafe39290820438b97931dab61e140121030e669acac1f280d1ddf441' 'cd2ba5e97417bf2689e4bbec86df4f831bf9f7ffd0fdffffff010005d9010000' '00001976a91485eb47fe98f349065d6f044e27a4ac541af79ee288ac00000000')

Raw Segwit

t1 = ('0200000000010100ff121dd31ead0f06e3014d9192be8485afd6459e36b09179' 'd8c372c1c494e20000000000fdffffff013ba3bf070000000017a914051877a0' 'cc43165e48975c1e62bdef3b6c942a38870247304402205644234fa352d1ddbe' 'c754c863638d2c26abb9381966358ace8ad7c52dda4250022074d8501460f4e4' 'f5ca9788e60afafa1e1bcbf93e51529defa48317ad83e069dd012103adc58245' 'cf28406af0ef5cc24b8afba7f1be6c72f279b642d85c48798685f86200000000')

UPDATE Raw Segwit with flags and tx_witnesses stripped

t2 = ('02000000' '0100ff121dd31ead0f06e3014d9192be8485afd6459e36b09179' 'd8c372c1c494e20000000000fdffffff013ba3bf070000000017a914051877a0' 'cc43165e48975c1e62bdef3b6c942a3887' '00000000')
print(f"t0: {txid(t0)}\nt1: {txid(t1)}\nt2: {txid(t2)}")

TXN_IDs from the above python

t0: cb33472bcaed59c66fae30d7802b6ea2ca97dc33c6aad76ce2e553b1b4a4e017

t1: b11fdde7e3e635c7f15863a9399cca42d46b5a42d87f4e779dfd4806af2401ce

t2: d360581ee248be29da9636b3d2e9470d8852de1afcf3c3644770c1005d415b30

TXN_IDs from Electrum

t0: cb33472bcaed59c66fae30d7802b6ea2ca97dc33c6aad76ce2e553b1b4a4e017

t1: d360581ee248be29da9636b3d2e9470d8852de1afcf3c3644770c1005d415b30

```
submitted by brianddk to Bitcoin [link] [comments]

How Secure is Electrum?

Please show me how I'm wrong, because I rather liked Electrum a lot until I found this out.
Try restoring a wallet in Electrum by seed words, and try to choose 12 words that are NOT on the following list:
https://github.com/spesmilo/electrum/blob/mastelib/mnemonic.py
You'll get a "Bad Seed" error and it won't let you proceed. Electrum only generates a 12 word seed from this ~1600ish predefined word list. Period. No ifs, ands, or buts.
So, basically, the way I see it is that a hacker could write a script that loops through making random 12-word phrases from the ~1600ish word list that Electrum uses. Then, it can use the actual Python open source code of Electrum to determine how it converts the 12-word phrases into the private key for the account. From there, it could keep trying private keys until it finds a wallet balance somewhere on the blockchain. At that point, a hacker could go in and collect the coins for himself. Might take a room of 10 home PCs to do it in a loop, but eventually I think one might get lucky and get $1M USD in bitcoins this way.
Wrong? If not, how so?
Check out what this Redditor calculated: http://www.reddit.com/Bitcoin/comments/1s22uz/couldnt_an_idiot_just_pick_12_words_in_electrum/cdt655t
submitted by volomike to BitcoinWallet [link] [comments]

CARDANO $ADA$ STAKING CALCULATOR & PASSIVE INCOME COINS PART 1- HINDI/URDU How to Use Bitcoin Calculator What Do YOU Need to MINE ONE BITCOIN In 2020?! UPDATED ... How To Mine 1 Bitcoin in 10 Minutes - Blockchain BTC Miner ... VirWOX Calculator

A Bitcoin ATM is a kiosk that allows a person to purchase Bitcoin by using cash or debit card. Some Bitcoin ATMs offer bi-directional functionality enabling both the purchase of Bitcoin as well as the sale of Bitcoin for cash. In some cases, Bitcoin ATM providers require user… Bitcoin ATM Map – Find Bitcoin ATM, Online Rates Browse The Most Popular 486 Bitcoin Open Source Projects Contributed to jlopp/lopp.net, nvk/wallets-recovery, jlopp/bitcoin-transaction-size-calculator and 5 other repositories Contribution activity September 2020 Pages in category "Open Source" The following 93 pages are in this category, out of 93 total. A C++ Bitcoin toolkit library for asynchronous apps Libbitcoin is a multipurpose bitcoin library targeted towards high end use. An ideal backend to build fast implementations on top: mobile apps, desktop clients and server API's. The library places a heavy focus around asychronicity, speed and availability. It's enabl

[index] [29330] [23123] [29071] [23116] [27114] [12895] [484] [23273] [28763] [4589]

CARDANO $ADA$ STAKING CALCULATOR & PASSIVE INCOME COINS PART 1- HINDI/URDU

SUBSCRIBE AND PARTICIPATE IN MY GIVE AWA'S THANK YOU FOR WATCHING https://youtu.be/nQJrgYhQpLg ----- 👇👇👇👇👇👇👇👇👇👇👇👇 https://youtu.be ... If you use responsible risk management, you won't be stressed out if a trade doesn't go your way, and you won't feel the need to stay glued to your computer ... MY PASSIVE TRADES COMPOUNDING CALCULATOR GUIDE Beating Crypto. Loading... Unsubscribe from Beating Crypto? ... AA Lobby, bitcoin,crypto,passive income,ethereum, how to make money from cryptos ... Phone Farm & Chill, 4 new apps for passive income, bitcoin mining & cashing out $100 to paypal. Every month there will be a giveaway all you have to do is co... What it really takes to mine a Bitcoin in 10 Minutes. Firstly I'll show you a special free method to mine Bitcoin and send funds directly to your wallet in 1...

#