![]() Once a past transaction has been used as an input, it can never again be used for future transactions: Used inputs are effectively “spent”. The short answer is that every single cryptocurrency transaction needs to reference past transactions, known as inputs, in order to prove that the sender has enough money to cover the desired transaction. But what’s to stop someone from posting a transaction for more money than they have? You know how records are kept, and how fraudulent transactions are prevented. Who keeps track of crypto account balances? In cryptocurrency networks, public keys, or algorithmically shortened versions of public keys, are used as sender and receiver addresses in the transactions published to the network (people aren’t really sending messages that say “Person A”, or using their real names). If you want to check the validity of a given message, and you have both the public key and a digital signature, you can use a special algorithm to test whether or not the digital signature was created with the private key belonging to the public key that sent the message. This mathematical linkage also lets a sender digitally “sign” a message using their private key, so that other people can verify that they really sent the message. The fact that the two numbers are mathematically entwined means that the public key can be used to encrypt messages that only the corresponding private key can decrypt. The public key can be given out freely the private key must be kept secret.Ĭrucially, the algorithm used to create public–private key pairs is “one-way” only, meaning that even if you know someone’s public key, you won’t be able to figure out the private key linked to it - which is why it’s safe to give out your public key! In public key cryptography, a cryptographic algorithm generates a pair of very large, mathematically linked numbers: a public key and a private key. ![]() ![]() This is where cryptography comes in - specifically, a form of cryptography called “public key cryptography”. If anyone can write a transaction and broadcast it to the network, how can fraud be prevented? What’s to stop Person A from sending someone else’s money to themselves - for example, writing a transaction that says “Person B gives $100 to Person A” and then posting it to the network? In other words, the network as a whole keeps track of how much money everyone has.Īs you may have noticed, there is a fundamental problem here. If the transaction is determined to be valid, then the other network nodes will include it in their copies of the ledger (more on how a transaction is deemed valid or invalid below). Anyone on the network can write a transaction and broadcast it for everyone else to see. The answer is something called a “distributed ledger”, which is exactly what it sounds like: a record of transactions (a ledger) which is not controlled by an institution, but instead is spread out (distributed) over a computer network and maintained by many different people.Įvery node on the network has its own copy of the ledger, which is updated as new transactions are posted to the network. In traditional banking, if Person A requests a wire transfer of $20 to Person B, the bank checks Person A’s account to make sure they have sufficient funds, debits the money from their account, credits $20 to Person B’s account, and keeps a record of the transaction.īut how can this be accomplished when there is no bank? The “crypto” in cryptocurrency refers to cryptography, and is the key to understanding how all of this is possible. So, how can cryptocurrency networks keep records without a central authority like a bank?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |