From f91cb9e5b47bd39136e1da7691065b1ef23735ce Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 18 May 2018 13:11:03 +1200 Subject: [PATCH] Implement NoteCommit --- sapling_notes.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sapling_notes.py diff --git a/sapling_notes.py b/sapling_notes.py new file mode 100644 index 0000000..e0532a3 --- /dev/null +++ b/sapling_notes.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 +from sapling_pedersen import windowed_pedersen_commitment +from sapling_utils import i2lebsp + +def note_commit(rcm, g_d, pk_d, v): + return windowed_pedersen_commitment(rcm, [1] * 6 + i2lebsp(64, v) + g_d + pk_d)