  Recently, Autonomous Vehicles (AVs) have gained extensive attention from both
academia and industry. AVs are a complex system composed of many subsystems,
making them a typical target for attackers. Therefore, the firmware of the
different subsystems needs to be updated to the latest version by the
manufacturer to fix bugs and introduce new features, e.g., using security
patches. In this paper, we propose a distributed firmware update scheme for the
AVs' subsystems, leveraging blockchain and smart contract technology. A
consortium blockchain made of different AVs manufacturers is used to ensure the
authenticity and integrity of firmware updates. Instead of depending on
centralized third parties to distribute the new updates, we enable AVs, namely
distributors, to participate in the distribution process and we take advantage
of their mobility to guarantee high availability and fast delivery of the
updates. To incentivize AVs to distribute the updates, a reward system is
established that maintains a credit reputation for each distributor account in
the blockchain. A zero-knowledge proof protocol is used to exchange the update
in return for a proof of distribution in a trust-less environment. Moreover, we
use attribute-based encryption (ABE) scheme to ensure that only authorized AVs
will be able to download and use a new update. Our analysis indicates that the
additional cryptography primitives and exchanged transactions do not affect the
operation of the AVs network. Also, our security analysis demonstrates that our
scheme is efficient and secure against different attacks.
