 In this video, we're going to talk about the basics of the blockchain as a technology. On its most basic level, the blockchain can be understood as a new kind of database, at least this was its original design. What's different about this database is that it's distributed. Digital databases have been around for a while now, but until recently they've been designed to centralize information on one computer or within one organization. The blockchain, though, uses a distributed network of computers to maintain a shared database. The blockchain is then a set of protocols and encryption methods that enable a network of computers to work together in securely recording data within a shared open database. This database consists of a series of encrypted blocks that contain the data. The blockchain is a continuously growing list of these blocks of data, which are linked and secured using cryptography. This makes it a trusted database, with this trust being maintained by open secure computer code and encryption instead of any single institution. The database stores information in blocks that are linked together through hash values, with entries to this database being made by computers that all have a copy of the database and all must come to consensus about its state before they can update it. So these are three central concepts to understanding the system's workings. That of blocks and hashing, mining and proof of work, and distributed consensus, will go over each of these separately. In terms of its structure, a blockchain may be considered as a series of blocks of data that are securely chained together. New blocks are formed as participants create new data or wish to update existing data. These blocks are encrypted and given a hash value that represents a unique identifier of the data within that block. This hashing works by a standard algorithm being run over the block's data to compress it into a code which is called the hash, which is unique to that document. No matter how large the file or what information is contained, it is compressed into a 64 character secure hash. This hash value can be recalculated from the underlining file, confirming that the original contents have not changed but the reverse is not possible. Given just the hash value, you cannot recreate the block's data contained within it which is encrypted. All blocks of data which are formed after the first block are securely changed to the previous one. This means that the hash value of the next block in the chain is dependent upon the previous one. Thus once recorded, the data in any given block cannot be altered afterwards without the alteration of all subsequent blocks. As well as this hash pointer linking to the previous block, each block typically contains as well a timestamp so that we know what happened and when it happened. This hashing and linking of blocks makes them inherently resistant to the modification of their data, making them immutable records. You can only write data to the database and once it's there, it's very hard to change, almost impossible. Thus data stored on the block chain is generally considered incorruptible. Blockchain security methods include the use of what we call public key cryptography. A public key, which is a long, random looking string of numbers, is an address on the blockchain. Value tokens sent across the network are recorded as belonging to that address. A private key is like a password that gives its owner access to their digital assets or the means to otherwise interact with the corresponding data. A public key is associated with the private key so that anyone can make an encrypted transaction to the public key address, but that encrypted message can only be deciphered with the private key that corresponds to that public key. In such a way, effective security only requires keeping the private key private. The public key can be openly distributed without compromising security. For example, on the Bitcoin blockchain, to receive funds from another person, you use a piece of software called a wallet, which creates a public key that you give to someone else for them to send bitcoins to that address. With your corresponding private key, you can then access that address with those bitcoins on it. The blockchain is a distributed system. This means there is no centralized organization to maintain and verify the entries on the database. This database is instead maintained by a large number of computers that are incentivized to provide computing resources by earning some form of tokens in exchange. But these computer nodes in the network themselves cannot be trusted individually. Thus it is required that the system provide a mechanism for creating consensus between scattered or distributed parties that do not need to trust each other but just need to trust the mechanism by which their consensus has been arrived at. Any computer that is connected to the blockchain network and using a client can perform the task of validating and relaying transactions. Each of these so-called minor computers gets a copy of the blockchain, which gets downloaded automatically upon joining the network. When new entries into the database are made, these changes are automatically broadcast across the network. Mining nodes validate transactions, add them to the block they're building, and then broadcast the state of the complete block to other nodes on the network. In order to randomize the processing of blocks across the nodes and to avoid certain service abuses, blockchains use various time-stamping schemas such as proof of work. Proof of work describes a system that requires a certain amount of resources or effort to complete an activity, typically this resource is computing time. As in the case of the Bitcoin blockchain, this is realized on some form of challenge such that no one actor on the network is able to solve this challenge consistently more than everyone else on the network. Miners compete to add the next block in the chain by racing to solve a very difficult cryptographic puzzle. The first to solve the puzzle wins the lottery. As a reward for his or her efforts, the miner receives a small amount of newly minted bitcoins and a small transaction fee. A consensus algorithm like Bitcoin's proof of work functions to ensure that the next block in the blockchain is the one and only version of the truth and it keeps powerful adversaries from derailing the system. Blockchains are trying to create a secure, trusted, shared database and they do this through encryption and hashing, proof of work and network consensus. The hashing and linking of blocks makes it difficult to go back and change a previous block once it's entered, but this alone would not be suffice to ensure that the data is truly tamper proof, so then the proof of work system intentionally makes it computationally more difficult to alter the database, thus making it extremely difficult to alter all the blocks. On top of this, it places a distributed consensus mechanism so that even if someone did manage to do this, their record would not match that of others and thus would not be accepted as a valid record. So to successfully tamper with the blockchain, you would need to alter all the blocks on the chain, redo the proof of work for each block and take control of more than 50% of the peer-to-peer network. Only then would your altered block become accepted by everyone else. On a blockchain of almost any size, this would be almost impossible to do. Indeed, the Bitcoin blockchain is very good proof of this given that it now secures hundreds of billions of dollars using this method, without the network having yet been compromised. At the end of the day, what this technology enables is a database that is secure with automatic trusts that is enabled by open source code and encryption. The data is tamper proof. Once information is put into the database, it cannot be altered afterwards. It is a shared database as many people across the network have a copy which is continuously being updated so that all have a single source of truth. Likewise, it is transparent, meaning that everyone can see all of the transactions and alterations made to the database if needed. Data quality and the resilience of the network is maintained by massive database replication across many different nodes on the network. Those centralized official copy exists and no user is trusted more than any other. Having started out life as simply a mechanism to enable Bitcoin, it has become increasingly recognized that this system is secure enough to work as a ledger for the recording and exchange of any value what we now call a distributed ledger.