From df6fca69a7d9bb11d7c6116a9cc4062a6e5e040d Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 2 May 2014 18:21:47 +0200 Subject: Sign using ECDSA and fix a couple bugs. Revive the plop_entry and hash over that instead of the full MTL, for the db hash. We don't want the timestamp in that hash! Use ECDSA instead of RSA for signing stuff. That's what Google does and we want to use their test suites. An annoyance with DSA is that the signature isn't deterministic. Testing just became less easy. Fix db:find() now that the hash is no longer the primary key. --- src/db.hrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/db.hrl') diff --git a/src/db.hrl b/src/db.hrl index 16b9103..ce6df7b 100644 --- a/src/db.hrl +++ b/src/db.hrl @@ -2,7 +2,7 @@ %% 'index' is the primary key, 'hash' is also indexed. -record(plop, { index :: non_neg_integer(), % Primary key. - hash :: binary(), % Hash over mtl. - mtl :: mtl(), % Merkle Tree Leaf, an #mtl{}. + hash :: binary(), % Hash over #plop_entry{} in mtl. + mtl :: mtl(), % Merkle Tree Leaf, an #mtl{}. spt_text :: binary() % Signed Plop Timestamp, an #spt_on_wire{}. }). -- cgit v1.1