-
Notifications
You must be signed in to change notification settings - Fork 5
/
credential.go
30 lines (27 loc) · 948 Bytes
/
credential.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-FileCopyrightText: (C) 2024 Intel Corporation
// SPDX-License-Identifier: Apache 2.0
package fdo
import (
"github.com/fido-device-onboard/go-fdo/protocol"
)
// DeviceCredential is non-normative, but the [TPM Draft Spec] proposes a CBOR
// encoding, so that will be used, excluding the key type/handle.
//
// DCTPM = [
// DCProtVer: protver,
// DCDeviceInfo: tstr,
// DCGuid: bstr
// DCRVInfo: RendezvousInfo,
// DCPubKeyHash: Hash
// DeviceKeyType: uint
// DeviceKeyHandle: uint
// ]
//
// [TPM Draft Spec]: https://fidoalliance.org/specs/FDO/securing-fdo-in-tpm-v1.0-rd-20231010/securing-fdo-in-tpm-v1.0-rd-20231010.html
type DeviceCredential struct {
Version uint16
DeviceInfo string
GUID protocol.GUID
RvInfo [][]protocol.RvInstruction
PublicKeyHash protocol.Hash // expected to be a hash of the entire CBOR structure (not just pkBody) for Voucher.VerifyEntries to succeed
}