Blockchain for Self-Driving Cars | Straighttalk

Newsletter Subscription

Keep up with new content on the site, receive exclusive content and commentary, and learn about activities within the Straight Talk community.

By Lance Eliot, CIO and CTO, Techbrium

This article is by Featured Blogger Lance Eliot from his AI Trends column. Republished with the author’s permission.

If you’ve heard anything at all about “blockchain” it probably would be the voluminous and breathless exclamations that it is a disruptive innovation that will change society and the world. It is one of the hottest emerging technologies and as is usually the case with something “new and hot” has garnered some fanatical fans. Or, you might vaguely be aware that blockchain somehow relates to bitcoins. You are likely to have seen or heard that bitcoins are some kind of curious new currency that is available in the online realm.  You might be unsure about bitcoins, whether they are trustworthy or not, and whether to maybe get yourself some bitcoins or let the whole thing shake out first. Seems like blockchain and also bitcoins are in the midst of the unsettled, wild-wild-west of technology that maybe or maybe not will eventually calm down into something beyond those that are at the fringe of high-tech. Let’s go through the fundamentals of what this is all about, and then take a serious look at what this has to do with self-driving cars.

At the Cybernetics Self-Driving Cars Lab, we are making use of blockchains for self-driving cars. We are exploring and proving out the mettle of blockchain.

We are not the only ones integrating blockchain and self-driving cars as there is interest on this topic by others in the self-driving car industry. Indeed, a recent announcement by the Toyota Research Institute (TRI) illustrates the intense interest in figuring out how to best exploit blockchains for self-driving cars.  TRI announced that they are “exploring blockchain and distributed ledger technology (BC/DL) for use in the development of a new mobility ecosystem that could accelerate development of autonomous driving technology.”  Partnering up with MIT’s Media Lab, TRI has also indicated they are working with several start-up’s including BigChainDB, Oaken Innovation, CommuterZ, and Gem.

Let’s start at the beginning.  What is blockchain? What are bitcoins?  I’ll first explain what blockchain is. Then, we’ll discuss bitcoins.

Simply stated, blockchain is a distributed database, meaning that it is just like a normal database that you are already used to except that it is setup to have lots of copies of the database that are floating around among many computers in a distributed manner. I might put my database on a hundred different computers around the world and ask them all to keep it handy in case I need to access it. This is convenient for me because it ensures that my database is redundant and so if somehow one of those computers loses it that I could go to another one that still has it and be able to get access to my database.

You might be wondering whether I am worried that my database which is distributed all around the world will be seen by others and they could read whatever is in my database.  I would in fact be concerned about that.  Thus, another aspect of blockchain is that the distributed database is encrypted. Using data security aspects, the database is encrypted and only with the proper keys can anyone actually read it.

Okay, so far, we are agreed that blockchain is a distributed database, in which my data is placed at perhaps hundreds or even thousands of computers all around the world.  It has redundancy because of this. It also is encrypted so that only someone with the proper encryption keys can actually read it.  You might next be wondering how could I make changes to the database, assuming that I wanted to say add some further data to the database.  If I do so, how would I make sure that all hundreds or thousands of the copies of my database are equally updated.  I don’t want to end-up in a situation where some of those copies of my database are outdated and other copies are updated. This would certainly be confusing because then I wouldn’t know which copy of the database is accurate.

The way in which changes to the database are handled involves the aspect that the database has already been subdivided into what are called blocks, essentially chunks of data. When I want to add more data to my database, I add another block to it. Suppose that my database already has five blocks of data, and those five blocks (considered collected together and intact as my current database) are distributed across hundreds or thousands of computers, and I decide that I want to add more data. I would place a new block into one copy of database and ask all the others that have a copy of my database to likewise add that new block to their copy. This request would promulgate across a wide network connecting those computers and one-by-one each of them that has a copy of my database would add the new block to it.  This might seem like it would take a while to do, but in normal everyday aspects it can be relatively fast, depending upon the speeds of the computers and the speed of the network.

Voila, we now are to a juncture of this discussion to point out that this approach is called “blockchain” and this is due to the aspect that the database is composed of a series of blocks of data, and furthermore they are “chained” together. Let me explain the chaining aspect. For my database which now has six blocks, the newest block that I had just added has a link to the fifth block. The fifth block already has a link to the fourth block. The fourth block links to the third block, the third block links to the second block, and the second block links to the first block. All the blocks of the database have a link, of which, the link in the latest block links to the block that preceded it.  They are like a chain, with each block being connected to each other in a linear, serial way.

Linking together the blocks is helpful to make sure that you can always find all the blocks of the database, though realize that you can only figure out the other blocks that preceded whichever block you are looking at. If I look at the sixth block, I can traverse all the way to the first block.  But, if I am looking only at the third block, say, it links just to the second block and the first block. So, when I get ahold of a copy of my database, I would want to start with the latest block in order to walk back through all other blocks.

Each block usually has a timestamp that indicates the date and time when it was added to the database. It also has a special encryption-like “hash” code that helps to make sure that it is legitimately part of my database. The hash code for block six is based on the hash code of block five, and block five’s hash code is based on block four, and so on. Here’s why this is helpful.  If someone decided to change block four of my database, they would end-up changing the hash code too (there are mathematical technical aspects of why this would occur). Any other computer that received this version of the database would be able to realize that someone has changed something in my database, which is not allowed to happen. Once a block has been accepted into a blockchain database, it must never be changed. It will stay the same.

As recap so far, blockchain is a distributed database, having lots of copies spread on computers potentially across the globe, and the database consists of blocks of data that are chained together from the latest to the earliest of the blocks. Furthermore, the blocks cannot be changed, you can only add new blocks to the database. When a new block is added to a copy of the database, it is linked to the topmost block to-date, plus it uses a special hash code that numerically uniquely identifies it and will essentially allow the “prevention” (detection) of later changes being made that could otherwise happen undetected.

I am sure you love arcane terminology, so let’s include some here.

The computers that are willing to hang onto a copy of my database are often referred to as “nodes” (in a moment, when discussing bitcoins, the “nodes” are referred to as miners). My database grows in height when I add new blocks to it (we refer to the size of the database as its height, in a sense it grows taller as I add blocks to it).  Due to cleverly using the hash encoding as an integral aspect of blockchain, the database is considered “immutable” because if anyone tampers with any of the blocks to try and change them then mathematically it can be ascertained that something is amiss and the copy of the database that someone messed with can be rejected as being an invalid copy. It is “auditable” because we can inspect the blocks links to ensure that it is all intact and essentially a single-source-of-truth and know how and when the blocks were added to the database.  The way in which the computers communicate to each other about the distributed databases is done on a peer-to-peer (P2P) basis, meaning that one computer talks to another one, and they share back-and-forth what’s going on with the databases.

Presumably, the blockchain approach provides for a database that is secure and private, since it is encrypted and requires permission to read it. The cryptographic techniques and the data partitioning into blocks allows me to selectively allow others to have visibility into the database. In near real-time the database can be updated, depending upon the speed of the network and the computers involved. Some would say that the blockchain then is a distributed database that is sustainable, secure, private, immutable, shared, and computationally trustworthy.

Blockchain then is an overarching approach to enacting a distributed database. It is not any specific technology per se, but instead an approach consisting of techniques and algorithms. Anyone that wants to put together a blockchain can do so.  There is software that allows you to setup a blockchain. You could even write code to create your own blockchain.

There are public instances of blockchains, and there are private instances of blockchains.  For a private blockchain, I might arrange with firms in say the insurance industry that want to share data with each other and then setup a blockchain that is just for them. Only they would have access to the network and computers that house the blockchain that they are using. For a public blockchain, the blockchain or distributed databases would be on publicly available computers, typically housed across the open Internet.

You can think of the blockchain as something that you would use to build an application for (hopefully) some useful purpose. Like I just mentioned, if a bunch of insurance companies wanted to share data with each other, I could create an “application” of blockchain that was just for them.  In a sense, some people like to think of blockchain as the operating system or platform and then you build applications on top of it.

One of the most famous of all applications that uses blockchain is bitcoins.

Bitcoins are an instantiation of blockchain.  This makes sense when you give it a moment to sink in. If you wanted to create a new currency, how would you do so? If you were to go the paper route and printed paper money, it would be pretty expensive to print up that paper money and make sure it was tamper proof.  We’ve seen how hard the U.S. Treasury Department works to make sure our dollar bills are tamper proof, which otherwise we’d have lots of fraudulent money floating around. Well, if you wanted to make a new currency, you’d be nuts to try and make it paper-based since it is so expensive to print it and make sure it is tamper proof. Plus, getting that paper money physically to all parts of the world to be used as a global currency is going to tough to do and expensive to spread around.

Instead, in today’s world, you’d make that new currency be all digital.  It would simply be online and you would want some means to record the amounts and the transactions. You’d want it to be accessed anywhere in the world. You’d want it to be accessed pretty much instantaneously. You’d want it to be secure. Voila, which is the second time I’ve said voila in this piece, if you wanted to create a new currency you would want some kind of underlying platform or operating system upon which to build it that could do all these things. Answer: blockchain.

Bitcoins are an imaginary currency that exists by having people agree that this thing we agree to be a type of currency and that is recorded via blockchain is actually worth value of some kind. Blockchain ecomes the means to record the bitcoin transactions. You give me some bitcoins, and someone else gives you some bitcoins, and this is all recorded into a database, allowing us to know who has what number of bitcoins.  What powers bitcoins is the use of blockchain, which provides the foundation or platform for ensuring a distributed database of ledger transactions. The ledger is secure, distributed, immutable, etc., due to making use of blockchain underneath.

We’ll add some more terminology to this. Bitcoins are considered a type of cryptocurrency. That’s big speak for virtual money that is kept online and encrypted. Once bitcoin made a splash, others realized that they could also use blockchain and try to promote alternative made-up currencies. In essence, anyone, including you, can start your own online currency, if you wish to do so, merely by making use of blockchain. You could call it “LanceCoin” (I like the sound of that!), or ItsyBitsyCoin, or SuperCurrency, or whatever.

Now, that being said, you’d need to try and convince other people that your made-up currency is something that has value and that they should be willing to use it.  Right now, bitcoin has the most momentum of the cryptocurrencies.  It is kind of like Facebook, in that when Facebook first got rolling there were other competing social media apps like it, but it seemed to garner the most attraction and eventually steamrolled past its competitors. Bitcoin has that kind of momentum, but the jury is still out whether it will take hold, and/or whether something else might arise that knocks it from its high perch.

One aspect of blockchain that I didn’t explicitly point out that you might have anyway realized is that there is no one master keeper of the database. Usually, we are used to have someone or something that keeps a master database and everyone else goes to that single master copy to know what’s the latest data of the database.  Blockchain is a technique that eliminates the need for a single master keeper of the database. We say that there isn’t an “intermediary” needed to maintain the database. Instead, its maintenance is distributed and no one in particular owns it.

This is both the advantage and disadvantage facing a cryptocurrency such as bitcoin. Bitcoin touts that it is not controlled by anyone in particular. We know that U.S. dollars are controlled by the United States government, and that likewise most currencies are controlled by either a particular country or by a group of countries such as the EU. Bitcoin is not based on any particular country or group to back it. It is based solely on what many would say is self-interests. It is considered a mass collaboration.

If you believe that currency when backed by a particular country or group is a form of tyranny, you then really like bitcoins and cryptocurrency because it is freer, it is a democratization of currency, some suggest. For most people, the idea of a currency which is not backed by any particular country or group seems highly questionable and speculative.  Thus, though bitcoin touts its freedoms aspects, this same aspect can be quite unnerving to others and so they are hesitant to make use of cryptocurrencies.

You can now award yourself a certificate of awareness of what blockchain is, and what bitcoin is. Congratulations!  But, I realize that you started reading this due to wanting to know how blockchain applies to self-driving cars. I didn’t forget, and just wanted to get you to a level playing field of what blockchain is all about.

One way in which blockchain applies to self-driving cars is regarding driving data. In prior columns, such as my indication of machine learning and self-driving cars, I mentioned that there is the potential of wanting to keep track of driving data that is recorded by self-driving cars. We will ultimately have presumably the roadways filled with self-driving cars, and those self-driving cars are chock full of sensors that record visual images and video via cameras, they can record distance data via radar sensors, LIDAR data (see my column about LIDAR), and so on.

Some believe that the data of these self-driving cars should be shared so as to be able to analyze the data and improve the AI of self-driving cars. Imagine how massive that data would be.  You could use machine learning to cull that data and try to improve self-driving cars ability to drive. But, this also raises privacy issues. Are you ok that your self-driving car is telling all about where you went, when you went there, etc.? Privacy proponents are very concerned that allowing the collection and sharing of the self-driving car sensor data will bring forth Big Brother.

A proposed solution would be to allow self-driving car data to go into a blockchain that then you could personally decide to whom you would allow your data to be used.  Your data would be preserved in the blockchain, but not automatically readable. You could decide whom can access it. You might even get paid by someone to allow access, such as a self-driving car maker might pay you to let them access your driving data. Or, maybe companies that want to know patterns of consumers behavior as to where they go and when they go there, would pay you. Or, maybe Wal-Mart or other retailers might pay you, since they would want to know whether you drive near their stores and what they could then do to get you to stop at their stores.

I am asked why we can’t already do this today. I point out that the main stoppage is that few cars have the sensors needed to collect the driving data, and also few cars have the Internet connectivity to transmit the data into a blockchain. Though, there are some cars that are already doing this in a smaller way.  The car insurance company Progressive is known for their Snapshot tool, which plugs into the diagnostic port of your car, and then provides aspects of your driving data to them. This is a usage-based insurance (UBI) program, claiming to reward good drivers by knowing what kind of driving they do.  When we have self-driving cars aplenty, those self-driving cars will have lots of sensors and lots of data, and will already be built with Internet connectivity, and so the data sharing aspects will be much easier and become a more popular topic of debate and discussion.

Speaking of car insurance, we don’t yet know how car insurance will be handled in a world of self-driving cars, but anyway assuming there is some form of car insurance, you could use blockchain to do usage-based insurance, or even pay as you drive (PAYD) insurance. PAYD is where you pay for car insurance in increments of perhaps five minutes, and it is based on where you are driving (safe areas versus dangerous areas), when you are driving (daytime versus nighttime), etc. If your driving data of your self-driving car is being fed into a blockchain, it would be pretty easy to allow an insurance company to then offer you PAYD or UBI.

Another aspect of using blockchain for self-driving cars involves Shared Autonomous Vehicles (SAV). Right now, when you want to get a car akin to a taxi, you probably are using Uber or Lyft, or some similar ride sharing service.  When we have self-driving cars, the question arises as to what you will do with your self-driving car while you are at work or asleep.  Currently, your car sits and does nothing, somewhat like a horse in the barn waiting for you to want to go for a ride (some estimates indicate that you only use your car currently for perhaps 5-10% of the day!). Instead, suppose you put that horse to other uses, in other words you allowed your self-driving car to be used by others. You become your own version of Uber or Lyft.

Uber and Lyft are going to pitch to you that you should join into their online network so as to allow people that want rides to even know that your self-driving car is available for ride sharing. Of course, Uber or Lyft will take a cut of whatever you charge the persons that use your self-driving car. Facebook, meanwhile, figures why would you use Uber or Lyft for that purpose and instead you could just post onto Facebook that your car is available for ride sharing. It’s going to be an ugly battle for eyeballs.

Some say forget entirely about Uber, Lyft, Facebook, and all those others, and instead use blockchain (this is really, really scary to the execs at Uber, Lyft, and any other ride sharing service!). A public blockchain could be crafted and it would allow for those that want to take rides to find out who is offering their self-driving car for rides.  Guess what, no intermediary! No Uber needed, no Lyft needed, etc. No cutting them into the fees you are charging for the use of your self-driving car.   With the touch of a button, you can add your car to a publicly available blockchain that represents fleets of cars all throughout the world.

Another use of blockchain for self-driving cars involves currency. You take your self-driving car to the car wash, and instead of paying via cash or credit card, instead you use an online currency like bitcoin or something else that has come along. You could do that today, but it is a hassle. Once we have self-driving cars, and with their Internet connectivity, it would be pretty easy for them to also do the online transactions that apply to your self-driving car.  If you drive through a McDonald’s or Taco Bell, your self-driving car could pay for the transaction, via a blockchain that those fast-food eateries have agreed to use.  This scares the heck out of Visa, American Express, and all other credit card companies.

Is blockchain then the answer to all our problems? Is it the silver bullet? No. It is a type of distributed database that has properties that make it amenable for interesting societal and business aspects, and will gradually become further popularized as we continue to push toward a digital world, and especially so with self-driving cars because we are essentially going digital in many ways far beyond what our cars do today. Self-driving cars will be chock full of sensors, processors, and be online, all of which then means they are increasingly becoming digitalized and we ought to be considering ways in which we can leverage those digital-based capabilities.

We must also consider the underbelly of blockchain.  The way it works now, data does not go away in a blockchain. It always exists. This has important privacy considerations and we aren’t used to the idea that data about you is always around. For those using Facebook, and getting older, they are beginning to regret that they posted stuff onto Facebook when they were younger and for which now exists elsewhere because others might have grabbed it up at the time.  We have generally been living in a society where data eventually decays, becomes lost to the ages. Can we handle an era of data that never goes away?

There is also the opportunity for exploitation and hacking of blockchain. It is all based on cryptographic techniques that we consider hard to crack. Maybe there are holes in those algorithms and we just don’t yet know it. Maybe the software that enacts it has bugs in it. By the way, most of the encryption algorithms are based on the idea that you could crack it but that it isn’t feasible given the tremendous mathematical and computational effort it would take to break it. As the availability of computer processing continues to escalate, and the cost of computations decreases, we might find ways to realistically crack these puzzles. Indeed, quantum computing offers orders of magnitude increases in speed of computations.

Blockchain is one of the latest and hottest buzzwords. There is no magic in it. Think of it as souped-up cryptographic distributed database that we can use as a platform for creating useful applications. Besides useful applications like cryptocurrency, of which bitcoin is the most notable, we can use it for other kinds of public and also private applications. This can also be used for nefarious purposes, such as an international crime ring that wants to share their illicit efforts and do so via the Internet, right in front of everyone’s eyes, which might seem like a wild idea, but with the right kind of approach they could potentially pull it off.  Anyway, for self-driving cars, there are lots of ways that the advent of digitalizing the car will play into using blockchain applications, such as online payments for services, getting on-the-spot car insurance, and for the possible sharing of driving data. Drive safe out there!

Originally published on AI Trends.