How Blockchain will make the autonomous car truly autonomous?

0
242
Blockchain and Autonomous car

Alice owns an autonomous car and she uses this for going to the daily office. Her friend Bob got to know about the car and asked her to give for three days as he wanted to visit a few tourist places. Now the problem is how Alice gives complete control to Bob for her car. Is there a way where she can ensure control while giving access to Bob? Is there a way an Autonomous car itself decides who can drive, who can’t? Is there any autonomy that exists for a car?

Before we look into this problem, just understand a few fundamentals about decentralise identity.

The fundamental aspect of Blockchain

This holds true for identity also, instead of letting the government control your identity, Blockchain enables you to control your own identity and work with the service providers directly while ensuring complete transparency and accountability.

The same principle applies in our case also, so instead of Alice control/own the autonomous car, the Autonomous car will have its own unique identity and has every freedom to do what it wishes making truly autonomous.

Every known thing that now exists can be identified by DID which is a new way of asserting control on any identity. You, your child, your car, your bike, your smartphone all can be uniquely identified via DID and have its own identity. The only difference would be you will be the guardian of all these entities and over time handover the guardianship to other entities if required.

what makes most appealing is “ everything has its own identity and control its identity, that is the basic fundamental principle of self-sovereign identity”

Now one more fundamental aspect of control we have to understand is

Capabilities vs. Access Control Lists

Fundamentally, Access Control Lists are about authority by identity whereas Object Capabilities are about authority by possession.

Authority by identity is the process of giving access to a resource to a specific entity based on their identity. These processes typically ask the question: “Who are you?”

Authority by possession is the process of giving access to a resource to any entity that possesses something, like a key. These processes typically ask the question: “Do you have a key that fits this lock?”

So in our case, the autonomous car will have a capability that lets anybody to use as long as they possess the permission. This will ensure the car has its own autonomy. Whoever posses the key to unlock the car, is the owner.

DID’s are represented as JSON-LD structure and these messages are communicated from one agent to another agent. In our case Alice, Bob will have a mobile wallet where their identity will be stored. The car will have its own cloud wallet and these entity exchanges below messages securely and verify the ownership of each identity from Blockchain.

Alice identity in decentralized ecosystem :

{
"@context":[
"https://example.org/did/v1",
"https://example.org/ocap/v1",
"http://schema.org"
],
"id":"did:example:83f75926-51ba-4472-84ff-51f5e39ab9ab",
"type":"Person",
"name":"Alice",
"publicKey":[
{
"id":"did:example:83f75926-51ba-4472-84ff-51f5e39ab9ab#key-1",
"owner":"did:example:83f75926-51ba-4472-84ff-51f5e39ab9ab",
"publicKeyPem":"-----BEGIN PUBLIC KEY-----\r\n..."
}
]
}

Understanding the above structure

context - standard did protocols, schema details
id - DID, which uniquely identify a person or object
publicKey - Way to show ownership on this document
id - represent who control this identity, it is alice DID key 1
owner - Alice did
publicKeyPem: public key which is used to sign this document by using private key

Car identity:

{
"@context":[
"https://example.org/did/v1",
"https://example.org/ocap/v1",
"http://schema.org"
],
"id":"https://autocar12A15.example/a-fancy-car",
"type":"Service",
"name":"Autonomous Car 12A15",
"publicKey":[
{
"id":"did:example:0b36c784-f9f4-4c1e-b76c-d821a4b32741#key-1",
"owner":"did:example:0b36c784-f9f4-4c1e-b76c-d821a4b32741",
"publicKeyPem":"-----BEGIN PUBLIC KEY-----\r\n..."
}
]
}

Bob Identity:

{
"@context":[
"https://example.org/did/v1",
"https://example.org/ocap/v1",
"http://schema.org"
],
"id":"did:example:ee568de7-2970-4925-ad09-c685ab367b66",
"type":"Person",
"name":"Bob",
"publicKey":[
{
"id":"did:example:ee568de7-2970-4925-ad09-c685ab367b66#key-1",
"owner":"did:example:ee568de7-2970-4925-ad09-c685ab367b66",
"publicKeyPem":"-----BEGIN PUBLIC KEY-----\r\n..."
}
]
}

Now Alice capability to use car 12A15:

Alice has capability R1 to use car
{
"@context":[
"https://w3id.org/security/v2",
"https://autopower.example/"
],
"id":"https://autocar12A15.example/a-fancy-car/proc/7a397d7b",
"parentCapability":"https://autocar12A15.example/a-fancy-car",
"invoker":"https://social.example/alice#key-for-car",
"proof":{
"type":"Ed25519Signature2018",
"created":"2018-02-13T21:26:08Z",
"capabilityChain":[
"https://autocar12A15.example/a-fancy-car"
],
"jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..lfAFjrWE-4RxhL0gtzSMRX72NR9SRDgaMmkjPA4if0ERbw4R2bnts5sAs8OyhAlbFzBAKOqrFk57AYqwSR2vCw",
"proofPurpose":"capabilityDelegation",
"verificationMethod":"https://example.com/i/alice/keys/1"
}
}

Understanding the above structure:

parentCapability - Since this is the first delegated capability, the parentCapability, points to the target this capability will operate against (in this case, Alice's Car)
invoker: We are granting authority specifically to one of Alice's cryptographic keys
Proof : Finally we sign this object with cryptographic material from Alice Car's capabilityDelegation field, and using the capabilityDelegation proofPurpose.
Note : DID of alice, bob and Car has been changed just to visually understand who's key is.

Turning on the Car and using for going to the office by Alice:

{
"@context":[
"https://example.org/zcap/v1",
"https://autopower.example/"
],
"id":"urn:uuid:ad86cb2c-e9db-434a-beae-71b82120a8a4",
"action":"Drive",
"proof":{
"type":"RsaSignature2016",
"proofPurpose":"capabilityInvocation",
"capability":"https://autocar12A15.example/a-fancy-car/proc/7a397d7b",
"created":"2016-02-08T17:13:48Z",
"creator":"https://social.example/alice/#key-for-car",
"signatureValue":"..."
}
}
//action - what kind of action want to perform Drive - Turn on the car and reach to office
capabiltiy : action apply on capability in this car autocar12A15

Now back to the problem, Bob asked Alice to use her car for a few days. In this case, Alice delegate the responsibility to use the car to Bob for certain days using Caveats

Alice add caveats and allow Bob to use Car
{
"@context":[
"https://example.org/zcap/v1",
"https://autopower.example/"
],
"id":"https://social.example/alice/caps#79795d78",
"parentCapability":"https://autocar12A15.example/a-fancy-car/proc/7a397d7b",
"invoker":"https://bob.example/bob/#key-33",
"caveat":[
{
"type":"ValidWhileTrue",
"uri":"https://social.example/alice/bob-can-still-use-car"
}
],
"proof":{
"type":"RsaSignature2016",
"proofPurpose":"capabilityDelegation",
"created":"2017-03-28T06:01:25Z",
"creator":"https://social.example/alice/#key-for-car",
"signatureValue":"..."
}
}
caveat: It allow future revocation, as long as caveat is true, Bob can use Alice car or in other way autocar12A15 will allow Bob to use its services as long as caveat holds true.
invoker : Alice grant access to one of the Bob keys
proof: Alice sings this object with the key she was granted authority over autocar12A15

Bob went to a hotel and asked Valet (Carol) to park the car by delegating permission and adding restrictions so that valet doesn’t take a free ride while he is in the hotel.

Carol has the capability to use a car
{
"@context":[
"https://example.org/zcap/v1",
"https://autopower.example/"
],
"id":"https://bob.example/bob/caps#2cdea8c1",
"parentCapability":"https://social.example/alice/caps#79795d78",
"invoker":"https://carol.example/#key-bf36",
"caveat":[
{
"type":"DriveNoMoreThan",
"kilometers":4000
}
],
"proof":{
"type":"RsaSignature2016",
"proofPurpose":"capabilityDelegation",
"created":"2017-06-13T19:15:03Z",
"creator":"https://bob.example/bob/#key-33",
"signatureValue":"..."
}
}
//caveat : Alice's gauge currently says 3995 kilometers driven,so this is only 5 km more than the current value
invoker : Authorising carol to use the car service
proof: Bob signs this object and now autocar12A15 will let carol to use its services and carol can use maximum of 5 km of ride if needed

CapabilityInvocation and CapabilityDelegation are two important attributes of DID’s which let the user to take control of nonliving things like IoT devices, smart car, digital devices etc.

DID’s ensure the existence of an entity and it can interact with others without human interaction, just by proving ownership of cryptographic keys.

know more about decentralize identity, DID, and capability delegation:

Also, Read

Get Best Software Deals Directly In Your Inbox

How Blockchain will make the autonomous car truly autonomous? was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.