Implement NoteCommit

This commit is contained in:
Jack Grigg 2018-05-18 13:11:03 +12:00
parent 3e2b2ab8f8
commit f91cb9e5b4
1 changed files with 6 additions and 0 deletions

6
sapling_notes.py Normal file
View File

@ -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)