blob: daf8004a52d40b9f9a15293a57c5f6e6af58305c [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
closed 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.
strict GetHardwareDerivedKey(struct {
key_info vector<uint8>:MAX_HARDWARE_DERIVE_KEY_INFO_SIZE;
}) -> (struct {
derived_key vector<uint8>:MAX_HARDWARE_DERIVED_KEY_SIZE;
}) error Error;
};