Skip to content

Source code of the Back to Bletchley Park challenge from Pwn2Win 2018

License

Notifications You must be signed in to change notification settings

pwn2winctf/back-to-bletchley-park

Repository files navigation

Instructions

To create qasm for the chall:

python synth.py -nb [NUM_BITS] -A [Secret number] -N [Number to factor] --obfuscate_setup --hide_names

Always use nb = ceil( log2(N) ) + 1 to assure obfuscation step doesn't break

Run synth with parameters to generate circuit.qasm E.G.

python synth.py -nb 5 -N 15 -A 9

This creates a circuit capable of calculating A^y % N using quantum registers of nb qubits.

To create the classical counterpart of this circuit run parser_qasm.py E.G.

python parser_qasm.py circuit.qasm

To test the (classical) circuit run the test suite

python test_code.py

Solution

Please see the write-up by sasdf.

About

Source code of the Back to Bletchley Park challenge from Pwn2Win 2018

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages