Receive Address Changed? Hardware Wallet Capacity? How your Crypto Wallet Works (Ledger, Trezor)

Jun 3, 2020 16:22 · 2054 words · 10 minute read starting point entire blockchain often

They all existed long before you were born and they will continue to exist long after you have died. It sounds a bit philosophical or even theological but what we’re talking about here are crypto addresses, the addresses that are generated every time you hit receive in your crypto wallet. Because if you’ve been using Bitcoin wallets are very long you’ll notice that every time you receive you are given a new address so what happens if you send your crypto to an old address? This can freak a lot of people out because in a lot of services we use we’re used to addresses and links and all that sort of stuff only becoming valid when we request them and then expiring after length of time. The other question I often see is people say you know is there a limit to how much crypto I can store on a hardware wallet? So what I’m gonna be looking at in this video is how hierarchical deterministic wallets work and if you haven’t already done so hit subscribe and that way you can stay in the loop for content I make helps you find your way in the crazy and often hostile environment those crypto currency. So the key thing to know is that your private keys your addresses all of these things in Bitcoin and crypto are just numbers and the relationships between these things are just maths and in the same way that two plus two equals four even before I said that or before I even thought of that the same can be said for your addresses and your private keys.

01:14 - Your wallet is also hierarchical and deterministic and what that means is that your wallet has a master private key, again that’s just a really big number, that is used to derive all the private keys that wallet will produce including other sort of master keys that can be used to derive other child keys. Your wallet is deterministic in that these child keys including these sort of child master keys aren’t just produced randomly and independently from each other they follow a set of rules where if you start with the same seed phrase the same master private key they will always generate exactly the same private keys every time in a predictable way but what makes this secure is that even though it is predictable for someone who has the master private key for an outside observer that is someone who is looking at the addresses that your wallet generates it looks as though every key is totally independent and totally random from everything else. You can think about your private he’s kind of like coordinates to a hidden location that could be anywhere in the universe and that your master private key is kind of like a starting point from which you would follow a set of instructions that would lead you from one location to the next with each location being kind of a place where some cryptocurrency is stashed you know that location existed before you had that map but again unless someone has the starting point it’s impossible for them to know where any of the locations are even if they know the pattern you would be using to go from one location to the next. So let’s just have a look and see what this looks like in terms of an actual Bitcoin wallet so what I’ve got here is a Bitcoin wallet in Electrum and the good thing about Electrum is it allows you to use an addresses tab and to see not only the next receiving address for your wallet but also lets you see all of the past addresses and all of the future ones now where things get interesting is that because bitcoin addresses are just numbers we can actually graph them and what I’ve got here is a graph that represents what it looks like to see the first address in this wallet the second third fourth and fifth all the way down to ten and you’ll see that it basically just looks like a line that is just moving randomly all over the place. That looks random to everyone outside but because we know the master seed this path that it is tracking is actually known to us and will be the same for every wallet that we use this seed in.

Where it gets interesting is that even for the same 03:45 - master key if we use multiple accounts on that device it actually generates completely separate and completely independent sets of dresses and we can see them all graphed here and again it just looks like a random mess and the important thing to consider is that while it looks like some of these numbers are close together those dots are close together the scale of this graph from the bottom to the top you could probably think of it in terms of the entire width of the known universe okay so if you can even see any gap whatsoever between any of these dots in terms of you know measuring space there would be galaxies apart just because the potential address space of Bitcoin is like inconceivably large and honestly you know cosmic scales are probably the best thing you can do to try and imagine that in some semi sensible way. What your wallet software will do is essentially to work out the balance for something like Bitcoin it will track through all of the potential addresses that your wallet has used in the past looking for transactions to work out what your balance is at the same time your wallet will also look past the most recently used address into the future a little bit just so that it can see if any new transactions come in so this way that your wallet will scan past addresses and future addresses is also why you can have the same seed in different wallets so for example I have the same seed right now in both ledger live and in Coinomi and you can see that both of them produce the same receive address when I hit receive whereas if I’m using a lot like electrum I can actually enable the addresses tab and see not only the next address which is the one that both Coinomi and ledger live give to me but all of the addresses that come after that I can even manually request payment at one of these future addresses and that will be detected by my wallet so there are limits into how far different wallets can forward in terms of new addresses by the way most wallets are designed is they will still give you the next unused address even if the one after that has actually already been used like in this example here in the same way my wallet will also happily detect funds that are sent to previous addresses though the catch with reusing an address like this is it’s very bad for privacy and it makes it much easier for a potential adversary to basically look at all the transactions coming in and out of your wallet and link them all together but both of your privacy and for the person who is paying you if we compare this to a normal bank accounts and things work this would almost be like everyone who either pays you money or you receive money from also being able to the full balance of your bank account something that many would see as an unnecessary invasion of their privacy and this is probably a good place to mention that if you’re using a Bitcoin wallet that doesn’t generate a new address every time you hit receive because there are still some out there it’s probably a really good time to consider moving to a better when it comes to sending a transaction your wallet will basically automatically bundle up different balances that are different addresses and use them as inputs to pay the person you are paying which will be the output again if we’re using electrum we can actually see what’s going on behind the scenes by clicking show coins and we can see here all these unspent outputs the whole idea of the way that addresses are generated in a deterministic way is something that’s a bit tricky to get your head around but again the thing to understand is it’s just numbers and it’s just math so in the same way that two plus two equals four even before I just said that the addresses that your wallet will produce into the future aren’t random and unknown this is also why your hardware wallet doesn’t have like a limit in terms of the number of private keys it can have people will often ask you know how many private keys can a ledger or a Trezor actually hold and that question really is a lot like asking someone what’s the biggest number you can count to in that while there might be some hard limits that you start to hit once you start to get two really really large numbers there is no limits the amount of crypto you can store and for the vast vast vast majority of users there is no real limit to the number of addresses that your wallet can generate never mind the fact of a cryptocurrencies your private keys are the same whether you’re storing one cent or one billion dollars it’s not like they get bigger and more complex the more money you have at the end of the day we’re just moving around numbers the only real limit for this stuff actually starts to come from the servers that are giving the balance to your wallet software in that they have to scan the entire blockchain to work out the balance of all the addresses that your wallet is requesting and eventually they’ll get to a point where the number of requests will start to either lag and take ages for your wallet balance to come or your wallet provider may simply no longer serve that data up anymore it might just sit loading forever or throw an error or something like that and if you find yourself in this situation maybe you’re a commercial entity of merchants what you’re receiving you know thousands of transactions every day you’ll pretty much need to run your own electrum server or your own full node and I explain that more in my video that looks at choosing a wallet back in the bad old days before hierarchical deterministic wallets your wallet would generate a whole bunch of private keys and then once you’d use them up it generate some more but the thing is you then had to redo your backups of your wallet file because the private keys weren’t being generated in the deterministic way this is also why you only need to make one backup of your seed phrase and it will stay valid forever in that all of the addresses of your wallet will ever produce no matter how many cryptos it holds no matter how many different funds you receive can all be derived from the single seed phrase and that will never change though it is important to say there is quite a bit of inconsistency between different wallets in terms of how they derive these addresses so are taking your seed from one wallet and using in another I will not always be a straightforward matter though the catch for this is it also means that if someone gets your seed phrase they can access all of your crypto so it makes it extremely important that you keep that seed backup safe thanks for watching I hope that was helpful hit like if you think that other people would find this video useful and hit subscribe if you’d like to be kept in the loop about future content I make that helps people stay safe in the crypto space and to recover if they get into trouble if you have any questions about this video or a topic that you’d like me to cover just leave a reply .