Skip to content
This repository was archived by the owner on Dec 13, 2022. It is now read-only.
This repository was archived by the owner on Dec 13, 2022. It is now read-only.

Combine Uart and SHA256 proofs #916

@samuelgruetter

Description

@samuelgruetter

Compared to the lightbulb's end-to-end theorem, ours currently does not involve any I/O with the external world, but it might actually be quite easy to add that.

More concretely, I'm thinking of the following steps:

  • Replace the init/update/finish calls to SHA256 in sigverify.c by our verified b2_sha256
  • Add a call to uart_write to our verified b2_sha256 which logs the computed digest to UART
  • Check whether the whole thing still runs on an FPGA if we replace that code with our verified code
  • Update the RISC-V machine models used in the end-to-end proofs to not only include "internal" MMIO (ie to the Cava SHA256 device), but also "external" MMIO (ie not being consumed by another verified device, but going to the "external world"), and adapt the end-to-end theorem to state that the event trace includes Uart messages that contain the hash that was logged.

Once that works, we could also consider verifying sigverify_rsa_verify (while assuming correctness of the crypto-related functions it calls) and log a "signature ok"/"bad signature" string instead of just logging the hash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions