Bitcoin Forum

Other => Beginners & Help => Topic started by: a298b112 on August 21, 2023, 12:37:48 PM



Title: Ledger Live generates different address for each transaction. How does it work?
Post by: a298b112 on August 21, 2023, 12:37:48 PM
So I've learned that every time when I want to receive BTC to my Ledger Live a new address will be generated. Now I know that this is Native SegWit address and it saves on transaction fees. The question is, how does this work? I always thought that an address is public key and since I have a private key, I can spend the BTC on that particular address. Now it turns out there could be many addresses on the same wallet. Is there any resources I can read or watch that explains how this works?


Title: Re: Ledger Live generates different address for each transaction. How does it work?
Post by: OmegaStarScream on August 21, 2023, 12:39:22 PM
Your private keys are all generated from the seed phrase you have[1]. As to why your wallet is generating a different address each time you receive a transaction, then that's for privacy reasons. You can read this article for better understanding[2]

[1] https://support.ledger.com/hc/en-us/articles/360034336713-Receiving-address-changed?support=true
[2] https://en.bitcoin.it/wiki/Address_reuse


Title: Re: Ledger Live generates different address for each transaction. How does it work?
Post by: Charles-Tim on August 21, 2023, 12:41:09 PM
Read this: https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc

The seed phrase can generate the individual private keys, public keys and their corresponding addresses.


Title: Re: Ledger Live generates different address for each transaction. How does it work?
Post by: tranthidung on August 21, 2023, 12:57:37 PM
Ledger wallet is a HD wallet (hierarchical deterministic) and it uses BIP32 for key generation. New addresses generated because address reuse is a bad practice for privacy.
  • Ledger - HD key generation (https://developers.ledger.com/docs/embedded-app/psd-keys/)
  • Who needs Bitcoin change addresses anyway (https://bitzuma.com/posts/who-needs-bitcoin-change-addresses-anyway/)

Quote
The process for HD key generation used by all Ledger devices (and many other HD wallets) is defined by BIP 32.

HD Wallets (BIP-32/BIP-44)

Deterministic wallets were developed to make it easy to derive many keys from a single "seed". The most advanced form of deterministic wallets is the HD wallet defined by the BIP-32 standard. HD wallets contain keys derived in a tree structure, such that a parent key can derive a sequence of children keys, each of which can derive a sequence of grandchildren keys, and so on, to an infinite depth. This tree structure is illustrated in Type-2 HD wallet: a tree of keys generated from a single seed.


Title: Re: Ledger Live generates different address for each transaction. How does it work?
Post by: DdmrDdmr on August 21, 2023, 01:34:36 PM
<...> Now I know that this is Native SegWit address <...>
Native Segwit is the default bitcoin address type generated by Ledger Live, but you can also opt for any of the other types, as depicted here:
https://support.ledger.com/hc/en-us/articles/9068401160221-How-to-add-different-formats-of-Bitcoin-accounts-in-Ledger-Live?docs=true

One way to take a closer look at Ledger Live Accounts (that’s the logical unit Ledger Live manages) is to hook it up to Electrum, learning to map each Account to the corresponding derivation path (each Account has a different derivation path):
https://support.ledger.com/hc/en-us/articles/115005161925-Set-up-and-use-Electrum?docs=true



Title: Re: Ledger Live generates different address for each transaction. How does it work?
Post by: dkbit98 on August 21, 2023, 08:13:44 PM
So I've learned that every time when I want to receive BTC to my Ledger Live a new address will be generated. Now I know that this is Native SegWit address and it saves on transaction fees. The question is, how does this work?
Magic  :D
All modern wallets work like that to preserve some privacy with good address management.
One seed phrase can generate almost unlimited number of addresses, but you can still use previous address for receiving coins if you are getting regular payments from same source.
btw Ledger Live is bad piece software and I wouldn't use it anymore.

I always thought that an address is public key and since I have a private key, I can spend the BTC on that particular address. Now it turns out there could be many addresses on the same wallet. Is there any resources I can read or watch that explains how this works?
This is outdated model that is not used today, except maybe with paper wallets.


Title: Re: Ledger Live generates different address for each transaction. How does it work?
Post by: Coyster on August 21, 2023, 08:55:40 PM
Is there any resources I can read or watch that explains how this works?
In simple terms, all you basically need is just the seed phrase which gives you access to all of the addresses on that wallet, in other words, there is no need for you to export the private keys of your wallet, back up only your seed phrase. As for your wallet generating new addresses for you, using the same addresses too many times gives you away, thus it is not the best thing to do if you are privacy conscious, but you can keep the same address if you wish to do so.


Title: Re: Ledger Live generates different address for each transaction. How does it work?
Post by: mk4 on August 22, 2023, 07:58:20 AM
Just to add: while it's not recommended due to privacy issues as mentioned by people before me, even if the address shown to you changes after every transaction, you can still use the older addresses that's been shown. People do this a lot especially when whitelisting bitcoin wallet addresses on exchanges for quicker withdrawals.