Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attest: Add attest_len & attest ops. #1591

Merged
merged 2 commits into from
Jan 23, 2024
Merged

Commits on Jan 23, 2024

  1. attest: Add attest_len & attest ops.

    Calling the `attest` op will cause the `Attest` task to produce the
    signature: `sign(alias_priv, sha3_256(hubpack(log) | nonce))`. The
    caller can then use other ops from the `Attest` task to verify the
    signature.
    flihp committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    7c87b0f View commit details
    Browse the repository at this point in the history
  2. sprot: plumbing for attest & attest_len

    This is the first op supported by sprot that takes both a read and a
    write lease. Following the existing structure of `handle_request` we add
    a new `Attest` variant to the TrailingData enum where we store the
    appropriately sized slice that holds the read lease. As a result we must
    be more explicit about the lifetimes in the `handle_request` method
    because it's return value no longer has the same lifetime as the `self`
    param (3rd lifetime elision rule).
    
    The rest is pretty straight forward with the call to `Attest::attest`
    happending in the match arm for this new `TrailingData` variant.
    flihp committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    02d9901 View commit details
    Browse the repository at this point in the history