tensorflow / tensorflow/privacy

Insecure Random Number Generator

Open
#349 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
477
Avg merge
22h 12m
Merged PRs (30d)
1

Description

Hello,

I would like to bring to your attention that using the random number generator from TensorFlow could lead to vulnerabilities when sampling from a distribution to fulfill differential privacy during training: https://www.tmlt.io/research/tiny-bits-matter-precision-based-attacks-on-differential-privacy

PyTorch Opacus uses a secure RNG: https://opacus.ai/api/privacy_engine.html

In contrast, TensorFlow RNG:
https://www.tensorflow.org/api_docs/python/tf/random/Generator
https://stackoverflow.com/questions/63350248/is-tf-random-normal-cryptographically-secure

Additionally, there is no documentation that states the use of floating-point vulnerability protection as in https://scholar.google.com/citations?view_op=view_citation&hl=en&user=hg3A9TgAAAAJ&citation_for_view=hg3A9TgAAAAJ:dhFuZR0502QC
and
https://research.ibm.com/publications/secure-random-sampling-in-differential-privacy

Kind regards,
Gonzalo

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file, test, or entry point is named. Start by reviewing the TensorFlow RNG documentation, the Opacus secure RNG API, and the linked differential-privacy research; done requires a project-level decision on secure random sampling and floating-point vulnerability protection.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.