Skip to content

Commit 91fab32

Browse files
committed
feat: demonstration of generating a receipt for a signed (ccf) scitt statement
DEMONSTRATION CODE NOT PRODUCTION SAFE Given a local replica of any datatrails log (production or otherwise): - verify the locally replicated log state - generate an mmr leaf value using the first 24 bytes of the sha256 of the signed statement as the trie index extrabytes, and an idTimestamp representing the current time, and the raw bytes of the statement as the leaf content to be hashed. - add the leaf value to the in memory copy of the ledger tile (massif) - generate a consistency proof form the old, verified, state to the newly created state. - sign using an ephemeral ecdsa private key (or one providded on the cli) - write out the new (forked) ledger state: 1. receipt-{mmrIndex}.cbor - the scitt signed statement for the MMR draft ledger 2. checkpoint-{oldSize}-{newSize}.cbor - the signed checkpoint (from which self service receipts can be produced *without* the ephemeral private key) 3. fork-{oldSize}-{newSize}.bin the MMR draft leger tile data with the newly appended leaf. 4. the ephemeral private key in .cbor and .pem format (only if generated) 5. the ephemeral public key in .cbor and .pem format (only if generated) Note: only minimal testing has been performed at this point.
1 parent ff57b08 commit 91fab32

10 files changed

Lines changed: 1273 additions & 101 deletions

File tree

amourystatement.go

Lines changed: 467 additions & 0 deletions
Large diffs are not rendered by default.

app.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ func AddCommands(app *cli.App, ikwid bool) *cli.App {
6969
app.Commands = append(app.Commands, NewNodeScanCmd())
7070
app.Commands = append(app.Commands, NewFindTrieEntriesCmd())
7171
app.Commands = append(app.Commands, NewFindMMREntriesCmd())
72+
app.Commands = append(app.Commands, NewAppendCmd())
7273
}
7374
return app
7475
}

0 commit comments

Comments
 (0)