Bitcoin Forum
May 08, 2024, 07:39:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Hardware wallets / Re: Question about Ledger nano s creates new addresses mechanism on: July 18, 2019, 07:17:51 PM
Thank you all very much for answers. I think I understand now.

Another question about Ledger nano s is what is the mechanism of "attach to pin"?

I have tested with restoring a new HW wallet with my seed and successfully get back with the secret phrase attached to pin.

My question is if this can work on different HW wallets, will it also work on Electrum?

For example, if I import my private seed to Electrum, and then I should also input the secret phrase.

Does it work like BIP38?
2  Bitcoin / Hardware wallets / Re: Question about Ledger nano s creates new addresses mechanism on: July 17, 2019, 08:21:46 AM
Seems like you got a little confused there... I'll leave the technical aspects behind and try to explain it as simple as i can Wink
There's some oversimplifacation, but the basic idear behind the rest of this post is correct.

When you initialised your ledger, you were shown a seed phrase.
This seed phrase is used to create an xprv (a master private key)
From this xprv, your ledger can derive other private keys.
Each private key can be used to calculate a public key, the hash of the public key is your address (valid for P2PKH)

Each private key can be used to sign transactions spending unspent outputs funding one address. If one address is funded with multiple unspent outputs, the same private key will be used when you spend those unspent outputs.
So, in fact, each address has a unique private key (or, more correct, each private key results in 1 single address).

If you spend 3 unspent outputs funding 3 addresses controlled by the same HW wallet, 3 private keys derived from the same xprv will be used to sign the final transaction.

So if there are three private keys controlled by my xprv. And when I spend all my unspent outputs (all my BTC on HW wallet) in one transaction, it actually using three private keys for signing? So it's actually three transactions?
3  Bitcoin / Hardware wallets / Question about Ledger nano s creates new addresses mechanism on: July 17, 2019, 07:52:28 AM
I'm not sure if there is a similar topic, if so, I apologize. I could not find the answer.

I have one question about creating new addresses on Ledger nano s:

For example, I have 10 BTC on address A, which is generated as a deposit address on Ledger nano s.

(Let's just pretend there is no tx fee for simple)

Now I send 1 BTC to address B. But what Ledger nano s actually does is, it sends 1 BTC to address B and sends 2 BTC to address C.

Then I send 4 BTC to address D, and Ledger nano s sends 4 BTC to address D and sends 1 BTC to address E.

Now I can see that I have 5 BTC on my account using Ledger app.

But on address A I only have 2 BTC. I also have 2 BTC on address C and 1 BTC on address E.

Though I have the same private key that can spend BTC on address A, C and E. But I cannot see the addresses of C or E on app.

Here's the question:

1. What if I want to send 3.5 BTC to address Z? How will ledger nano s spend my BTC from these three addresses?
2 BTC from A and 1.5 BTC from C? 2 BTC from C and 1 BTC from E and 0.5 BTC from A? Seems random.

2. And in this creating new addresses mechanism, we protect our privacy better, but does it cause more transaction fee?
For example, if I want to spend all 5 BTC and send to address Z. Ledger nano s has to send all my BTC from three addresses, it seems more fee than sending from one address. I'm not sure if I'm right.

3. If I send 10 BTC to address C or E, can I spend them? I think so but I cannot spend from a specific address, right?

Thank you in advance.

4  Bitcoin / Hardware wallets / Re: Is Ledger Nano S REALLY SAFE ?? Best Hardware Wallet ? on: January 20, 2018, 07:12:41 AM
Hi, guys! I got three Ledger nano s and I got this very interesting question one day when I using it.

What if the manufacturer did something evil? I mean of course you can always wipe the ledger nano as much as you like, and of course, the code of it is open-source online. What if the manufacturer only provides a certain range of words to generate a weak private key, which can be gained by exhaustive attack method? After all, you can only comply with the seed words it provides.

How can we know for sure the ledger nano we have is not provided by evil manufacturers? I mean, you cannot open it and check it thoroughly. I just really curious about this question and it haunted me. Is it possible? And is it possible for some hacker to gain interest with any bug that hides inside this hardware wallet?

Please correct me if wrong. Really appreciated!
 
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!