Skip to content

Commit d22dc8f

Browse files
author
Rob Percival
committed
Change createtree's default signature algorithm from RSA to ECDSA
As requested by #788 (comment).
1 parent 2779ea5 commit d22dc8f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd/createtree/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ var (
5555
treeType = flag.String("tree_type", trillian.TreeType_LOG.String(), "Type of the new tree")
5656
hashStrategy = flag.String("hash_strategy", trillian.HashStrategy_RFC6962_SHA256.String(), "Hash strategy (aka preimage protection) of the new tree")
5757
hashAlgorithm = flag.String("hash_algorithm", sigpb.DigitallySigned_SHA256.String(), "Hash algorithm of the new tree")
58-
signatureAlgorithm = flag.String("signature_algorithm", sigpb.DigitallySigned_RSA.String(), "Signature algorithm of the new tree")
58+
signatureAlgorithm = flag.String("signature_algorithm", sigpb.DigitallySigned_ECDSA.String(), "Signature algorithm of the new tree")
5959
displayName = flag.String("display_name", "", "Display name of the new tree")
6060
description = flag.String("description", "", "Description of the new tree")
6161
maxRootDuration = flag.Duration("max_root_duration", 0, "Interval after which a new signed root is produced despite no submissions; zero means never")

cmd/createtree/main_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var defaultTree = &trillian.Tree{
3838
TreeType: trillian.TreeType_LOG,
3939
HashStrategy: trillian.HashStrategy_RFC6962_SHA256,
4040
HashAlgorithm: sigpb.DigitallySigned_SHA256,
41-
SignatureAlgorithm: sigpb.DigitallySigned_RSA,
41+
SignatureAlgorithm: sigpb.DigitallySigned_ECDSA,
4242
PrivateKey: mustMarshalAny(&empty.Empty{}),
4343
MaxRootDuration: ptypes.DurationProto(0 * time.Millisecond),
4444
}
@@ -62,7 +62,7 @@ func mustMarshalAny(p proto.Message) *any.Any {
6262
func TestCreateTree(t *testing.T) {
6363
nonDefaultTree := *defaultTree
6464
nonDefaultTree.TreeType = trillian.TreeType_MAP
65-
nonDefaultTree.SignatureAlgorithm = sigpb.DigitallySigned_ECDSA
65+
nonDefaultTree.SignatureAlgorithm = sigpb.DigitallySigned_RSA
6666
nonDefaultTree.DisplayName = "Llamas Map"
6767
nonDefaultTree.Description = "For all your digital llama needs!"
6868

0 commit comments

Comments
 (0)