Skip to content

Instantly share code, notes, and snippets.

@ooovi
ooovi / generate_test_vectors.py
Created August 2, 2023 22:47
a script to generate test vectors fir the discrete gaussian sampler using sha3 seeded randomness
if __name__ == '__main__':
import json
import os
import sys
from prg import PrgSha3
from fractions import Fraction
# discrete gaussian sampler from here:
# https://github.com/IBM/discrete-gaussian-differential-privacy
from discretegauss import (sample_dgauss, sample_bernoulli_exp)