pub enum PinWeaverRequest {
GetVersion {
responder: PinWeaverGetVersionResponder,
},
ResetTree {
bits_per_level: u8,
height: u8,
responder: PinWeaverResetTreeResponder,
},
InsertLeaf {
params: InsertLeafParams,
responder: PinWeaverInsertLeafResponder,
},
RemoveLeaf {
params: RemoveLeafParams,
responder: PinWeaverRemoveLeafResponder,
},
TryAuth {
params: TryAuthParams,
responder: PinWeaverTryAuthResponder,
},
GetLog {
root_hash: [u8; 32],
responder: PinWeaverGetLogResponder,
},
LogReplay {
params: LogReplayParams,
responder: PinWeaverLogReplayResponder,
},
}
Expand description
The PinWeaver protocol defines the low level interface to the CR50 firmware for low entropy credentials. This interface allows the caller which should be a high trust component the ability to seal high entropy secrets behind rate-limited low entropy secrets which can only be unsealed if the correct low entropy secret is provided and the rate limit has not been reached.
Variants§
GetVersion
Returns the current protocol version.
Fields
responder: PinWeaverGetVersionResponder
ResetTree
Creates an empty Merkle tree with bits_per_level
and height
.
On Success
Returns the root_hash
of the empty tree with the given parameters.
InsertLeaf
Inserts a leaf into the Merkle tree.
params
see InsertLeafParams
.
On Success
result
see InsertLeafResponse
.
RemoveLeaf
Removes a leaf from the Merkle tree.
params
see RemoveLeafParams
.
On Success
root_hash
is the updated root hash of the tree.
TryAuth
Attempts to authenticate a leaf of the Merkle tree. On Success: TryAuthSuccess is returned in the union. On Authentication Failure: TryAuthFailed is returned in the union. On Rate Limited Error: TryAuthRateLimited is returned in the union.
GetLog
Retrieves the set of replay logs starting from the specified root hash. If Found: Returns all log entries including and starting from the operation specified by the root hash parameter. If Not Found: Returns all known log entries.
LogReplay
Applies a TryAuth operation replay log by modifying the credential metadata based on the state of the replay log. This will step forward any credential metadata for the appropriate label, whether or not it matches the exact state in history. On Success: Returns the updated leaf hmac and credential metadata. On Failure: Returns an error.
Implementations§
Source§impl PinWeaverRequest
impl PinWeaverRequest
pub fn into_get_version(self) -> Option<PinWeaverGetVersionResponder>
pub fn into_reset_tree(self) -> Option<(u8, u8, PinWeaverResetTreeResponder)>
pub fn into_insert_leaf( self, ) -> Option<(InsertLeafParams, PinWeaverInsertLeafResponder)>
pub fn into_remove_leaf( self, ) -> Option<(RemoveLeafParams, PinWeaverRemoveLeafResponder)>
pub fn into_try_auth(self) -> Option<(TryAuthParams, PinWeaverTryAuthResponder)>
pub fn into_get_log(self) -> Option<([u8; 32], PinWeaverGetLogResponder)>
pub fn into_log_replay( self, ) -> Option<(LogReplayParams, PinWeaverLogReplayResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL