Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ID attestation to HID #207

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (p *Status) Print() string {
status.WriteString(fmt.Sprintf("IdentityCounter ............: %d\n", p.IdentityCounter))
if p.Witness != nil {
status.WriteString(fmt.Sprintf("Witness/Identity ...........: %v\n", p.Witness.Identity))
status.WriteString(fmt.Sprintf("Witness/IP .................: %v", p.Witness.IP))
status.WriteString(fmt.Sprintf("Witness/IP .................: %v\n", p.Witness.IP))
status.WriteString(fmt.Sprintf("Witness/AttestationKey .....: %v", p.Witness.IDAttestPublicKey))
} else {
status.WriteString(fmt.Sprint("Witness ....................: <no status>"))
}
Expand Down
74 changes: 51 additions & 23 deletions api/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ message WitnessStatus {
string Identity = 1;
// IP is a string representation of the witness applet's current IP address.
string IP = 2;
// IDAttestKey is the stable public key from this device, used to attest to all derived witness identities.
string IDAttestPublicKey = 3;
// AttestedID is a note-formatted signed attestation for the current witness identity.
// This attestation note contains:
// "ArmoredWitness ID attestation v1"
// <Device serial>
// <Witness identity counter in decimal>
// <Witness identity as a note verifier string>
string AttestedID = 4;
}

/*
Expand Down
4 changes: 4 additions & 0 deletions api/rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ type WitnessStatus struct {
Identity string
// IP is the currently-assigned IP address of the witness applet.
IP string
// IDAttestPublicKey is the stable-derived use by this device to attest to witness IDs.
IDAttestPublicKey string
// AttestedID is a note formatted attestation for the current witness ID.
AttestedID string
}

// FirmwareUpdate represents a firmware update.
Expand Down
6 changes: 4 additions & 2 deletions trusted_os/ctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ func getStatus() (s *api.Status) {
}
if witnessStatus != nil {
s.Witness = &api.WitnessStatus{
Identity: witnessStatus.Identity,
IP: witnessStatus.IP,
Identity: witnessStatus.Identity,
IP: witnessStatus.IP,
IDAttestPublicKey: witnessStatus.IDAttestPublicKey,
AttestedID: witnessStatus.AttestedID,
}
}

Expand Down