Skip to content

About the formula of CTF #2

@CIRENSANGZHU

Description

@CIRENSANGZHU

Hi!
I'm learning CTF with your app. I check the code in ctf_simulation.py to learn the detail but get some problem.
I read the code in ctf_simulation.py around line 982~1005, and compare the code with the CTF formula shown on the app website (https://ctfsimulation.streamlit.app). Now, I'm confused because the CTF formula seems different in the code compared with the one shown on the app website, as listed followed:

  1. Is there anything wrong with the brackets in the app website formula? According to the formula on the app website, 'Cs' seems to be multiplied with a 's6' term, while in the code it seems should be a 's4' term.
  2. Is there any ‘minus sign’ ('-') missed in the formula on the app website? The 'gamma' in code (line 987 and 1001) seems to be multiplied by '-1' compared with the formula on the app website.
  3. In code line 982, 'self.dfdiff' is divided by '2', but is not divided by '2' in the formula on the app website.
    I'm wondering which are correct amoung the difference above. Is the code right or the formula on the app website? What is the correct CTF formula?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions