diff --git a/CHANGELOG.md b/CHANGELOG.md index fbbfa5ffac..9563c7047a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ ### Cleanup * Removed the experimental map API. +## HEAD + +### Improvements. + * Removed the deprecated crypto.NewSHA256Signer function. + ## v1.3.12 [Published 2021-02-16](https://github.com/google/trillian/releases/tag/v1.3.12) diff --git a/crypto/signer.go b/crypto/signer.go index 67381c5cf0..7238dc63b5 100644 --- a/crypto/signer.go +++ b/crypto/signer.go @@ -49,17 +49,6 @@ func NewSigner(keyID int64, signer crypto.Signer, hash crypto.Hash) *Signer { } } -// NewSHA256Signer creates a new SHA256 based Signer and a KeyID of 0. -// -// Deprecated: NewSHA256Signer was only meant for use in tests. It can be -// replaced by NewSigner(0, key, crypto.SHA256). -func NewSHA256Signer(signer crypto.Signer) *Signer { - return &Signer{ - Hash: crypto.SHA256, - Signer: signer, - } -} - // Public returns the public key that can verify signatures produced by s. func (s *Signer) Public() crypto.PublicKey { return s.Signer.Public() diff --git a/merkle/coniks/coniks.go b/merkle/coniks/coniks.go index 729aa002be..262840ff38 100644 --- a/merkle/coniks/coniks.go +++ b/merkle/coniks/coniks.go @@ -23,24 +23,7 @@ import ( "github.com/google/trillian/merkle/hashers/registry" ) -// Default is the standard CONIKS hasher. -// -// Deprecated: moved to hasher subpackage. -var Default = hasher.Default - func init() { - registry.RegisterMapHasher(trillian.HashStrategy_CONIKS_SHA512_256, Default) + registry.RegisterMapHasher(trillian.HashStrategy_CONIKS_SHA512_256, hasher.Default) registry.RegisterMapHasher(trillian.HashStrategy_CONIKS_SHA256, hasher.New(crypto.SHA256)) } - -// Hasher implements the sparse merkle tree hashing algorithm specified in the CONIKS paper. -// -// Deprecated: moved to hasher subpackage. -type Hasher = hasher.Hasher - -// New creates a new hashers.TreeHasher using the passed in hash function. -// -// Deprecated: moved to hasher subpackage. -func New(h crypto.Hash) *Hasher { - return hasher.New(h) -} diff --git a/merkle/log_verifier.go b/merkle/log_verifier.go deleted file mode 100644 index 290f1928fc..0000000000 --- a/merkle/log_verifier.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2017 Google LLC. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package merkle - -import ( - "github.com/google/trillian/merkle/hashers" - "github.com/google/trillian/merkle/logverifier" -) - -// RootMismatchError occurs when an inclusion proof fails. -// -// Deprecated: moved to github.com/google/trillian/merkle/logverifier package -type RootMismatchError = logverifier.RootMismatchError - -// LogVerifier verifies inclusion and consistency proofs for append only logs. -// -// Deprecated: moved to github.com/google/trillian/merkle/logverifier package -type LogVerifier = logverifier.LogVerifier - -// NewLogVerifier returns a new LogVerifier for a tree. -// -// Deprecated: moved to github.com/google/trillian/merkle/logverifier package -func NewLogVerifier(hasher hashers.LogHasher) LogVerifier { - return logverifier.New(hasher) -} diff --git a/merkle/rfc6962/rfc6962.go b/merkle/rfc6962/rfc6962.go index 549a22a15f..3bd9830235 100644 --- a/merkle/rfc6962/rfc6962.go +++ b/merkle/rfc6962/rfc6962.go @@ -24,30 +24,5 @@ import ( ) func init() { - registry.RegisterLogHasher(trillian.HashStrategy_RFC6962_SHA256, New(crypto.SHA256)) -} - -// Domain separation prefixes -// -// Deprecated: moved to hasher subpackage. -const ( - RFC6962LeafHashPrefix = hasher.RFC6962LeafHashPrefix - RFC6962NodeHashPrefix = hasher.RFC6962NodeHashPrefix -) - -// DefaultHasher is a SHA256 based LogHasher. -// -// Deprecated: moved to hasher subpackage. -var DefaultHasher = hasher.DefaultHasher - -// Hasher implements the RFC6962 tree hashing algorithm. -// -// Deprecated: moved to hasher subpackage. -type Hasher = hasher.Hasher - -// New creates a new Hashers.LogHasher on the passed in hash function. -// -// Deprecated: moved to hasher subpackage. -func New(h crypto.Hash) *Hasher { - return hasher.New(h) + registry.RegisterLogHasher(trillian.HashStrategy_RFC6962_SHA256, hasher.New(crypto.SHA256)) }