tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

laplace.h (594B)


      1 /* Copyright (c) 2003, Roger Dingledine
      2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
      3 * Copyright (c) 2007-2021, The Tor Project, Inc. */
      4 /* See LICENSE for licensing information */
      5 
      6 /**
      7 * \file laplace.h
      8 *
      9 * \brief Header for laplace.c
     10 **/
     11 
     12 #ifndef TOR_LAPLACE_H
     13 #define TOR_LAPLACE_H
     14 
     15 #include "lib/cc/compat_compiler.h"
     16 #include "lib/cc/torint.h"
     17 
     18 int64_t sample_laplace_distribution(double mu, double b, double p);
     19 int64_t add_laplace_noise(int64_t signal, double random, double delta_f,
     20                          double epsilon);
     21 
     22 #endif /* !defined(TOR_LAPLACE_H) */