Hack.lu CTF 2021, Silver Water Industries Writeup

Analyzing the code

  1. Take one bit of the provided byte
  2. Generate value x with function genX(N).
  3. Set x = x^2 mod N.
  4. If bit is 1 set x = x * z mod N.
  5. Put x into the array enc.

Summarizing the cryptosystem

Goldwasser-Micali cryptosystem problem

Cryptosystem failure

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store