diff --git a/cmd/keytransparency-client/cmd/root.go b/cmd/keytransparency-client/cmd/root.go index e873e9c3b..0cc11f094 100644 --- a/cmd/keytransparency-client/cmd/root.go +++ b/cmd/keytransparency-client/cmd/root.go @@ -264,7 +264,7 @@ func readConfigFromDisk() (*pb.Directory, error) { } mapPubPB, err := der.ToPublicProto(mapPubKey) if err != nil { - return nil, fmt.Errorf("error seralizeing map public key: %v", err) + return nil, fmt.Errorf("error serializing map public key: %v", err) } return &pb.Directory{ diff --git a/cmd/serverutil/healthz.go b/cmd/serverutil/healthz.go index 8bc09320e..f6904bb8b 100644 --- a/cmd/serverutil/healthz.go +++ b/cmd/serverutil/healthz.go @@ -20,7 +20,7 @@ import ( "gocloud.dev/server/health" ) -// RootHeaalthHandler handles liveness checks at "/". +// RootHealthHandler handles liveness checks at "/". // All other requests are passed through to `otherHandler`. func RootHealthHandler(otherHandler http.Handler) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { diff --git a/core/adminserver/admin_server.go b/core/adminserver/admin_server.go index af3d17bc3..2f96f2891 100644 --- a/core/adminserver/admin_server.go +++ b/core/adminserver/admin_server.go @@ -218,7 +218,7 @@ func treeConfig(treeTemplate *tpb.CreateTreeRequest, privKey *any.Any, directory return config } -// CreateDirectory reachs out to Trillian to produce new trees. +// CreateDirectory reaches out to Trillian to produce new trees. func (s *Server) CreateDirectory(ctx context.Context, in *pb.CreateDirectoryRequest) (*pb.Directory, error) { glog.Infof("Begin CreateDirectory(%v)", in.GetDirectoryId()) if _, err := s.directories.Read(ctx, in.GetDirectoryId(), true); status.Code(err) != codes.NotFound { diff --git a/core/api/v1/admin.proto b/core/api/v1/admin.proto index f4b6afe5b..b5bc8f938 100644 --- a/core/api/v1/admin.proto +++ b/core/api/v1/admin.proto @@ -137,7 +137,7 @@ service KeyTransparencyAdmin { get: "/v1/directories" }; } - // GetDirectory returns the confiuration information for a given directory. + // GetDirectory returns the configuration information for a given directory. rpc GetDirectory(GetDirectoryRequest) returns (Directory) { option (google.api.http) = { get: "/v1/directories/{directory_id}" diff --git a/core/client/get_and_verify.go b/core/client/get_and_verify.go index b6650edb7..c407b7a2c 100644 --- a/core/client/get_and_verify.go +++ b/core/client/get_and_verify.go @@ -81,7 +81,7 @@ func (c *Client) VerifiedGetLatestRevision(ctx context.Context) (*types.LogRootV return nil, nil, err } if mr.Revision != wantRevision { - return nil, nil, fmt.Errorf("map revision is not the most recent. smr.Revison: %v != slr.TreeSize-1: %v", mr.Revision, lr.TreeSize-1) + return nil, nil, fmt.Errorf("map revision is not the most recent. smr.Revision: %v != slr.TreeSize-1: %v", mr.Revision, lr.TreeSize-1) } return lr, mr, nil } diff --git a/core/client/meetinthemiddle.go b/core/client/meetinthemiddle.go index b21441c3a..040c3fa67 100644 --- a/core/client/meetinthemiddle.go +++ b/core/client/meetinthemiddle.go @@ -54,7 +54,7 @@ func NewerRevisionsToVerify(created, current, verified uint64) []uint64 { // // TODO: Consier limiting the max period between checks to the expected value // of other party lifetimes -- the maximum amount of time this algorithm can -// tollerate the other party being offline at an unknown point in the past. +// tolerate the other party being offline at an unknown point in the past. // Currently this algorithm expects the relying party to keep its memory and // be online at least once every `current = 2ⁱ` revisions. See Tests. func OlderRevisionsToVerify(current, verified uint64) []uint64 { diff --git a/core/frontend/frontend.go b/core/frontend/frontend.go index e6b15913e..525c8ad90 100644 --- a/core/frontend/frontend.go +++ b/core/frontend/frontend.go @@ -29,7 +29,7 @@ import ( pb "github.com/google/keytransparency/core/api/v1/keytransparency_go_proto" ) -// PublicKeyGetter retrives a public key. +// PublicKeyGetter retrieves a public key. type PublicKeyGetter interface { PublicKey() *keyset.Handle } diff --git a/core/keyserver/keyserver.go b/core/keyserver/keyserver.go index 9fa284395..860626219 100644 --- a/core/keyserver/keyserver.go +++ b/core/keyserver/keyserver.go @@ -281,7 +281,7 @@ func (s *Server) batchGetUserByRevision(ctx context.Context, sth *tpb.SignedLogR }) if st := status.Convert(err); st.Code() != codes.OK { glog.Errorf("tlog.GetInclusionProof(%v): %v", d.Log.TreeId, err) - return nil, status.Errorf(st.Code(), "caannot fetch log inclusion proof: %v", st.Message()) + return nil, status.Errorf(st.Code(), "cannot fetch log inclusion proof: %v", st.Message()) } return &pb.BatchGetUserResponse{ diff --git a/core/mutator/entry/mutator.go b/core/mutator/entry/mutator.go index e330c3d28..e6889bb2e 100644 --- a/core/mutator/entry/mutator.go +++ b/core/mutator/entry/mutator.go @@ -143,7 +143,7 @@ func MutateFn(oldSignedEntry, newSignedEntry *pb.SignedEntry) (*pb.SignedEntry, } if oldSignedEntry == nil { - // Skip verificaion checks if there is no previous oldSignedEntry. + // Skip verification checks if there is no previous oldSignedEntry. return newSignedEntry, nil } diff --git a/core/sequencer/server_test.go b/core/sequencer/server_test.go index 591e6dfac..09496700d 100644 --- a/core/sequencer/server_test.go +++ b/core/sequencer/server_test.go @@ -143,7 +143,7 @@ func TestDefiningRevisions(t *testing.T) { maxGap int32 wantNew int64 }{ - {desc: "alomost-blocked", highestRev: mapRev + 1, maxGap: 1, wantNew: mapRev + 2}, + {desc: "almost-blocked", highestRev: mapRev + 1, maxGap: 1, wantNew: mapRev + 2}, {desc: "blocked", highestRev: mapRev + 2, wantNew: mapRev + 2}, {desc: "unblocked", highestRev: mapRev, wantNew: mapRev + 1}, {desc: "lagging", highestRev: mapRev + 3, wantNew: mapRev + 3}, diff --git a/docs/api.md b/docs/api.md index c38ea37ed..559c28440 100644 --- a/docs/api.md +++ b/docs/api.md @@ -537,7 +537,7 @@ Leaf entry for a user. ### MapRevision -MapRevision contains a map leaf at a speific revision. +MapRevision contains a map leaf at a specific revision. | Field | Type | Label | Description | @@ -938,7 +938,7 @@ The KeyTransparencyAdmin API provides the following resources: | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| | ListDirectories | [ListDirectoriesRequest](#google.keytransparency.v1.ListDirectoriesRequest) | [ListDirectoriesResponse](#google.keytransparency.v1.ListDirectoriesResponse) | ListDirectories returns a list of all directories this Key Transparency server operates on. | -| GetDirectory | [GetDirectoryRequest](#google.keytransparency.v1.GetDirectoryRequest) | [Directory](#google.keytransparency.v1.Directory) | GetDirectory returns the confiuration information for a given directory. | +| GetDirectory | [GetDirectoryRequest](#google.keytransparency.v1.GetDirectoryRequest) | [Directory](#google.keytransparency.v1.Directory) | GetDirectory returns the configuration information for a given directory. | | CreateDirectory | [CreateDirectoryRequest](#google.keytransparency.v1.CreateDirectoryRequest) | [Directory](#google.keytransparency.v1.Directory) | CreateDirectory creates a new Trillian log/map pair. A unique directoryId must be provided. To create a new directory with the same name as a previously deleted directory, a user must wait X days until the directory is garbage collected. | | DeleteDirectory | [DeleteDirectoryRequest](#google.keytransparency.v1.DeleteDirectoryRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | DeleteDirectory marks a directory as deleted. Directories will be garbage collected after X days. | | UndeleteDirectory | [UndeleteDirectoryRequest](#google.keytransparency.v1.UndeleteDirectoryRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | UndeleteDirectory marks a previously deleted directory as active if it has not already been garbage collected. | diff --git a/docs/architecture.md b/docs/architecture.md index 7c5af580d..d6bd9e884 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -16,7 +16,7 @@ Map. # Commitment Table The commitment table stores account values and the associated commitment key -nessesary to verify the commitment stored in the Trillian Map. +necessary to verify the commitment stored in the Trillian Map. # Mutation Table When a user wishes to make a change to their account, they create a signed change @@ -35,7 +35,7 @@ The Trillian Map stores the sparse merkle tree and is designed to scale to extremely large trees. The Trillian Map is updated in batches. # Trillian Log -The Trillian Log stores a dense merkle tree in the style of Ceritificate +The Trillian Log stores a dense merkle tree in the style of Certificate Transparency. The Key Transparency Sequencer adds SignedMapRoots from the Trillian Map to the Trillian Log as they are created. diff --git a/docs/meet-in-the-middle.md b/docs/meet-in-the-middle.md index 3fcd4a310..c01c25f92 100644 --- a/docs/meet-in-the-middle.md +++ b/docs/meet-in-the-middle.md @@ -8,7 +8,7 @@ revision *current* to perform append-only proofs between revisions *fetched* <= ### Background Key Transparency 1.0 allowed Bob to fetch at an unknown revision, requiring Alice to fetch *all* revisions in order to verify her key history, an O(n) -amount of work where n is the number of revisonis between verifications. This +amount of work where n is the number of revisions between verifications. This limited the frequency and freshness of directory updates. The meet in the middle algorithm shares the work between Alice and Bob by @@ -18,7 +18,7 @@ verification work down to a logarithmic, regardless of directory freshness. ## Algorithm -### Sender Verificatoin +### Sender Verification Clients save the (earliest) revision number associated with the data they have fetched. For Key Transparency, this means that *senders* will store, for each contact, the contact's public key, map revision number it was fetched at, and diff --git a/impl/authorization/authorization_test.go b/impl/authorization/authorization_test.go index 116d7285b..e7f93e1a4 100644 --- a/impl/authorization/authorization_test.go +++ b/impl/authorization/authorization_test.go @@ -157,7 +157,7 @@ func TestIsAuthorized(t *testing.T) { } } -func TestResouceLabel(t *testing.T) { +func TestResourceLabel(t *testing.T) { for _, tc := range []struct { directoryID string out string diff --git a/scripts/kubernetes_test.sh b/scripts/kubernetes_test.sh index b2de0f014..fb18a6a14 100755 --- a/scripts/kubernetes_test.sh +++ b/scripts/kubernetes_test.sh @@ -2,7 +2,7 @@ set -ex set -o pipefail -# This script assumes the existance of a local cluster +# This script assumes the existence of a local cluster # go get sigs.k8s.io/kind@v0.6.1 # kind create cluster --config deploy/kubernetes/kind-config.yaml # kubectl cluster-info --context kind-kind