Lines Matching refs:slot

48 // derived from the caller-provided root key and specific slot.
185 zx_status_t Volume::Unlock(fbl::unique_fd fd, const crypto::Secret& key, key_slot_t slot,
200 if ((rc = volume->Init()) != ZX_OK || (rc = volume->Unseal(key, slot)) != ZX_OK) {
250 zx_status_t Volume::Enroll(const crypto::Secret& key, key_slot_t slot) {
258 if (slot >= num_key_slots_) {
259 xprintf("bad parameter(s): slot=%" PRIu64 "\n", slot);
262 if ((rc = SealBlock(key, slot)) != ZX_OK || (rc = CommitBlock()) != ZX_OK) {
269 zx_status_t Volume::Revoke(key_slot_t slot) {
277 if (slot >= num_key_slots_) {
278 xprintf("bad parameter(s): slot=%" PRIu64 "\n", slot);
281 zx_off_t off = kHeaderLen + (slot_len_ * slot);
314 zx_status_t Volume::Unlock(zx_device_t* dev, const crypto::Secret& key, key_slot_t slot,
328 if ((rc = volume->Init()) != ZX_OK || (rc = volume->Unseal(key, slot)) != ZX_OK) {
473 zx_status_t Volume::DeriveSlotKeys(const crypto::Secret& key, key_slot_t slot) {
481 snprintf(label, kMaxLabelLen, kWrapKeyLabel, slot);
488 snprintf(label, kMaxLabelLen, kWrapIvLabel, slot);
588 zx_status_t Volume::SealBlock(const crypto::Secret& key, key_slot_t slot) {
591 if (slot >= num_key_slots_) {
592 xprintf("bad key slot: %" PRIu64 "\n", slot);
600 zx_off_t off = kHeaderLen + (slot_len_ * slot);
605 (rc = DeriveSlotKeys(key, slot)) != ZX_OK ||
620 zx_status_t Volume::Unseal(const crypto::Secret& key, key_slot_t slot) {
626 } else if ((rc = UnsealBlock(key, slot)) != ZX_OK) {
636 zx_status_t Volume::UnsealBlock(const crypto::Secret& key, key_slot_t slot) {
660 if (slot >= num_key_slots_) {
661 xprintf("bad key slot: %" PRIu64 "\n", slot);
664 if ((rc != DeriveSlotKeys(key, slot)) != ZX_OK) {
675 zx_off_t off = kHeaderLen + (slot_len_ * slot);