Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.
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
4 changes: 2 additions & 2 deletions cmd/keytransparency-client/grpcc/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

"github.com/golang/protobuf/proto"
"github.com/google/trillian/client"
"github.com/google/trillian/merkle/maphasher"
"github.com/google/trillian/merkle/coniks"
"golang.org/x/net/context"
"google.golang.org/grpc"

Expand Down Expand Up @@ -94,7 +94,7 @@ func New(client spb.KeyTransparencyServiceClient,
return &Client{
cli: client,
vrf: vrf,
kt: kt.New(vrf, maphasher.Default, verifier, log),
kt: kt.New(vrf, coniks.Default, verifier, log),
log: log,
mutator: entry.New(),
RetryCount: 1,
Expand Down
3 changes: 1 addition & 2 deletions core/client/kt/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ func (v *Verifier) VerifyGetEntryResponse(ctx context.Context, userID, appID str
proof := leafProof.GetInclusion()
expectedRoot := in.GetSmr().GetRootHash()
mapID := in.GetSmr().GetMapId()
leafHash := v.hasher.HashLeaf(mapID, index[:], leaf)
if err := merkle.VerifyMapInclusionProof(mapID, index[:], leafHash, expectedRoot, proof, v.hasher); err != nil {
if err := merkle.VerifyMapInclusionProof(mapID, index[:], leaf, expectedRoot, proof, v.hasher); err != nil {
Vlog.Printf("✗ Sparse tree proof verification failed.")
return fmt.Errorf("VerifyMapInclusionProof(): %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion integration/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func NewEnv(t *testing.T) *Env {

// Configure map.
treeParams := stestonly.MapTree
treeParams.HashStrategy = trillian.HashStrategy_TEST_MAP_HASHER
treeParams.HashStrategy = trillian.HashStrategy_CONIKS_SHA512_256
tree, err := mapEnv.AdminClient.CreateTree(ctx, &trillian.CreateTreeRequest{
Tree: treeParams,
})
Expand Down
4 changes: 2 additions & 2 deletions scripts/map_payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"tree":{
"tree_state":"ACTIVE",
"tree_type":"MAP",
"hash_strategy":"TEST_MAP_HASHER",
"hash_strategy":"CONIKS_SHA512_256",
"signature_algorithm":"ECDSA",
"max_root_duration":"0",
"hash_algorithm":"SHA256"
Expand All @@ -12,4 +12,4 @@
"curve":"P256"
}
}
}
}