Fix minor spelling issues in comments

This commit is contained in:
Timo Lindfors 2021-08-06 16:20:28 +03:00 committed by Brandon Weeks
parent 5df8a8e979
commit e8c5dc4fd5
4 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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)

View File

@ -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 {

View File

@ -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)