Commit Graph

23 Commits

Author SHA1 Message Date
Greg Fitzgerald
c935fdb12f Move signature duplicate detection into the historian 2018-03-01 17:44:10 -07:00
Greg Fitzgerald
9e16937914 Delete the Discovery event
Not useful to the accountant.
2018-03-01 17:02:41 -07:00
Greg Fitzgerald
f705202381 No need to hash data that's already hashed to create the signature 2018-03-01 16:39:09 -07:00
Greg Fitzgerald
3fcc2dd944 Add testnode
Fixes #20
2018-02-28 18:05:20 -07:00
Greg Fitzgerald
604ccf7552 Add network interface for accountant 2018-02-28 14:00:04 -07:00
Greg Fitzgerald
c3bb207488 Verify event signatures before adding log entries 2018-02-28 10:23:01 -07:00
Greg Fitzgerald
f98e9a2ad7 Fix overuse of search-and-replace 2018-02-26 17:03:50 -07:00
Greg Fitzgerald
0443b39264 Allow event log to hold events of any serializable (hashable) type 2018-02-26 16:42:31 -07:00
Greg Fitzgerald
8b0b8efbcb Allow Entry to hold events of any kind of data 2018-02-26 15:37:33 -07:00
Greg Fitzgerald
97449cee43 Allow events to hold any kind of data 2018-02-26 15:31:01 -07:00
Greg Fitzgerald
ab5252c750 Move entry verification out of Entry impl 2018-02-26 14:39:01 -07:00
Greg Fitzgerald
b02eab57d2 Extend the event log with a Transaction event to transfer possession
This implementation assumes 'from' is the current owner of 'data'.
Once that's verified, the signature ensures that nobody modified
'data' (the asset being transferred) or 'to' the entity taking
ownership.

Fixes #14
2018-02-26 11:09:11 -07:00
Greg Fitzgerald
b8d52cc3e4 Make the Discovery event into a struct instead of a tuple 2018-02-24 11:15:03 -07:00
Greg Fitzgerald
d78082f5e4 Test bad signature 2018-02-24 10:27:51 -07:00
Greg Fitzgerald
08e501e57b Extend the event log with a Claim event to claim possession
Unlike a Discovery event, a Claim event associates a public key
with a hash. It's intended to to be used to claim ownership of
some hashable data. For example, a graphic designer could claim
copyright by hashing some image they created, signing it with
their private key, and publishing the hash-signature pair via
the historian. If someone else tries to claim it as their own,
the designer can point to the historian's log as cryptographically
secure evidence that the designer's copy existed before anyone
else's.

Note there's nothing here that verifies the first claim is the actual
content owner, only that the first claim almost certainly happened
before a second.
2018-02-24 10:09:49 -07:00
Greg Fitzgerald
29a607427d Rename UserDataKey to Discovery
From the perspective of the log, when some data's hash is added,
that data is "discovered" by the historian.  Another event
might be a "claim" that some signed data belongs to the owner of a
public key.
2018-02-24 05:25:19 -07:00
Greg Fitzgerald
fa4e232d73 Add serialization/deseriation support to event log
See bincode and serde_json for usage:
https://github.com/TyOverby/bincode

Fixes #1
2018-02-20 16:26:13 -07:00
Greg Fitzgerald
6e37f70d55 Test reorder attack 2018-02-20 14:46:36 -07:00
Greg Fitzgerald
d97112d7f0 Explain proof-of-history in the readme
Also:
* Hash userdata so that verification works as the readme describes.
* Drop itertools package. Found a way to use std::iter instead.

Fixes #8
2018-02-20 14:04:49 -07:00
Greg Fitzgerald
ba90e43f72 Update benchmark
* Add asm, though it doesn't make it faster. TODO: use avx instructions.
* Do 10x less hashes, since sha256 is more expensive.
2018-02-19 16:51:35 -07:00
Greg Fitzgerald
0297edaf1f Use sha256 hashes instead of Rust's builtin hasher.
Causes a 20x performance degradation. Enabling asm did not
speed things up.
2018-02-19 16:23:53 -07:00
Greg Fitzgerald
4a7156de43 Move hash generation into stateless function 2018-02-19 12:09:58 -07:00
Greg Fitzgerald
fd209ef1a9 Rename event crate to log 2018-02-18 09:59:33 -07:00