blob: 3f6c89e263deeef4576024118b7b268773537f08 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.kms;
const MAX_HARDWARE_DERIVE_KEY_INFO_SIZE uint8 = 32;
const MAX_HARDWARE_DERIVED_KEY_SIZE uint8 = 32;
@discoverable
protocol StatelessKeyManager {
/// Get a hardware key derived key.
///
/// Get a key derived from hardware root key using `key_info` as info and the trusted app ID
/// as salt. This call is deterministic and always returns the same result if given the same
/// `key_info` on the same device and would be different across different devices if they have
/// different hardware keys.
GetHardwareDerivedKey(struct {
key_info vector<uint8>:MAX_HARDWARE_DERIVE_KEY_INFO_SIZE;
}) -> (struct {
derived_key vector<uint8>:MAX_HARDWARE_DERIVED_KEY_SIZE;
}) error Error;
};