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

Use general term "attestation evidence" in watcher #3607

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions attest/ake/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,26 +314,26 @@ impl From<AuthResponseInput> for Vec<u8> {
/// An authentication response input to a responder
impl MealyInput for AuthResponseInput {}

/// An unverified report is used when the initiator may not know the identity of
/// the enclave.
pub struct UnverifiedReport {
/// An unverified attestation evidence is used when the initiator may not
/// know the identity of the enclave.
pub struct UnverifiedAttestationEvidence {
pub(crate) data: Vec<u8>,
}

impl UnverifiedReport {
impl UnverifiedAttestationEvidence {
pub fn new(data: AuthResponseOutput) -> Self {
Self { data: data.0 }
}
}

impl AsRef<[u8]> for UnverifiedReport {
impl AsRef<[u8]> for UnverifiedAttestationEvidence {
fn as_ref(&self) -> &[u8] {
self.data.as_ref()
}
}

/// An authentication response from a responder
impl MealyInput for UnverifiedReport {}
impl MealyInput for UnverifiedAttestationEvidence {}

/// The IAS report is the final output when authentication succeeds.
impl MealyOutput for VerificationReport {}
Expand Down
7 changes: 4 additions & 3 deletions attest/ake/src/initiator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use crate::{
AuthPending, AuthRequestOutput, AuthResponseInput, ClientInitiate, Error, NodeInitiate, Ready,
Start, Terminated, Transition, UnverifiedReport,
Start, Terminated, Transition, UnverifiedAttestationEvidence,
};
use alloc::vec::Vec;
use mc_attest_core::{ReportDataMask, VerificationReport};
Expand Down Expand Up @@ -198,7 +198,8 @@ where
}

/// AuthPending + UnverifiedReport => Terminated + VerificationReport
impl<KexAlgo, Cipher, DigestAlgo> Transition<Terminated, UnverifiedReport, VerificationReport>
impl<KexAlgo, Cipher, DigestAlgo>
Transition<Terminated, UnverifiedAttestationEvidence, VerificationReport>
for AuthPending<KexAlgo, Cipher, DigestAlgo>
where
KexAlgo: Kex,
Expand All @@ -210,7 +211,7 @@ where
fn try_next<R: CryptoRng + RngCore>(
self,
_csprng: &mut R,
input: UnverifiedReport,
input: UnverifiedAttestationEvidence,
) -> Result<(Terminated, VerificationReport), Self::Error> {
let output = self
.state
Expand Down
2 changes: 1 addition & 1 deletion attest/ake/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub use crate::{
event::{
AuthRequestOutput, AuthResponseInput, AuthResponseOutput, Ciphertext,
ClientAuthRequestInput, ClientInitiate, NodeAuthRequestInput, NodeInitiate, Plaintext,
UnverifiedReport,
UnverifiedAttestationEvidence,
},
mealy::Transition,
state::{AuthPending, Ready, Start, Terminated},
Expand Down
Loading
Loading