From e8c5dc4fd515a7c5bb75705b4ed123693cda12ce Mon Sep 17 00:00:00 2001 From: Timo Lindfors Date: Fri, 6 Aug 2021 16:20:28 +0300 Subject: [PATCH] Fix minor spelling issues in comments --- attest/activation.go | 6 +++--- attest/attest-tool/attest-tool.go | 2 +- attest/eventlog.go | 10 +++++----- attest/example_test.go | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/attest/activation.go b/attest/activation.go index 8ef749f..752968e 100644 --- a/attest/activation.go +++ b/attest/activation.go @@ -36,11 +36,11 @@ type ActivationParameters struct { // TPMVersion holds the version of the TPM, either 1.2 or 2.0. TPMVersion TPMVersion - // EK, the endorsement key, describes an asymmetric key who's - // private key is permenantly bound to the TPM. + // EK, the endorsement key, describes an asymmetric key whose + // private key is permanently bound to the TPM. // // Activation will verify that the provided EK is held on the same - // TPM as the AK. However, it is the callers responsibility to + // TPM as the AK. However, it is the caller's responsibility to // ensure the EK they provide corresponds to the the device which // they are trying to associate the AK with. EK crypto.PublicKey diff --git a/attest/attest-tool/attest-tool.go b/attest/attest-tool/attest-tool.go index f565b62..4aa529e 100644 --- a/attest/attest-tool/attest-tool.go +++ b/attest/attest-tool/attest-tool.go @@ -83,7 +83,7 @@ func selftestCredentialActivation(tpm *attest.TPM, ak *attest.AK) error { func selftestAttest(tpm *attest.TPM, ak *attest.AK) error { // This nonce is used in generating the quote. As this is a selftest, - // its set to an arbitrary value. + // it's set to an arbitrary value. nonce := []byte{1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8} pub, err := attest.ParseAKPublic(tpm.Version(), ak.AttestationParameters().Public) diff --git a/attest/eventlog.go b/attest/eventlog.go index 40949d2..626b729 100644 --- a/attest/eventlog.go +++ b/attest/eventlog.go @@ -115,10 +115,10 @@ func (e EventType) String() string { } // Event is a single event from a TCG event log. This reports descrete items such -// as BIOs measurements or EFI states. +// as BIOS measurements or EFI states. // // There are many pitfalls for using event log events correctly to determine the -// state of a machine[1]. In general it's must safer to only rely on the raw PCR +// state of a machine[1]. In general it's much safer to only rely on the raw PCR // values and use the event log for debugging. // // [1] https://github.com/google/go-attestation/blob/master/docs/event-log-disclosure.md @@ -216,7 +216,7 @@ func (e *EventLog) Events(hash HashAlg) []Event { // Verify replays the event log against a TPM's PCR values, returning the // events which could be matched to a provided PCR value. // -// PCRs provide no security guarentees unless they're attested to have been +// PCRs provide no security guarantees unless they're attested to have been // generated by a TPM. Verify does not perform these checks. // // An error is returned if the replayed digest for events with a given PCR @@ -401,7 +401,7 @@ func extend(pcr PCR, replay []byte, e rawEvent, locality byte) (pcrDigest []byte // replayPCR replays the event log for a specific PCR, using pcr and // event digests with the algorithm in pcr. An error is returned if the // replayed values do not match the final PCR digest, or any event tagged -// with that PCR does not posess an event digest with the specified algorithm. +// with that PCR does not possess an event digest with the specified algorithm. func replayPCR(rawEvents []rawEvent, pcr PCR) ([]Event, bool) { var ( replay []byte @@ -525,7 +525,7 @@ func ParseEventLog(measurementLog []byte) (*EventLog, error) { // Switch to parsing crypto agile events. Don't include this in the // replayed events since it intentionally doesn't extend the PCRs. // - // Note that this doesn't actually guarentee that events have SHA256 + // Note that this doesn't actually guarantee that events have SHA256 // digests. parseFn = parseRawEvent2 } else { diff --git a/attest/example_test.go b/attest/example_test.go index 057a237..76531d1 100644 --- a/attest/example_test.go +++ b/attest/example_test.go @@ -79,7 +79,7 @@ func ExampleAK_credentialActivation() { log.Fatalf("Failed to generate activation challenge: %v", err) } - // Challenge the AK & EK properties to recieve the decrypted secret. + // Challenge the AK & EK properties to receive the decrypted secret. decrypted, err := ak.ActivateCredential(tpm, *challenge) if err != nil { log.Fatalf("Failed to activate credential: %v", err)