From d10932faf06278510b59093a20fe225ddb9ea402 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Fri, 2 Apr 2021 17:51:18 +0100 Subject: [PATCH] Add sinsemilla.sage. Signed-off-by: Daira Hopwood --- sinsemilla.sage | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 sinsemilla.sage diff --git a/sinsemilla.sage b/sinsemilla.sage new file mode 100755 index 0000000..c8ec36b --- /dev/null +++ b/sinsemilla.sage @@ -0,0 +1,35 @@ +#!/usr/bin/env sage + +load('hashtocurve.sage') + +VERBOSE = False + +k = 10 +c = len(format((q-1)//2, 'b'))-1 +assert c == 253 + +def grouphash(D, M): + (P, _, _) = hash_to_pallas_jacobian(M, D + b"-pallas_XMD:BLAKE2b_SSWU_RO_") + return P + +S = [grouphash(b"z.cash:SinsemillaS", pack('