playcrypt.simulator package
Submodules
playcrypt.simulator.base_sim module
playcrypt.simulator.bind_sim module
- class playcrypt.simulator.bind_sim.BINDSim(game, adversary)[source]
Bases:
playcrypt.simulator.base_sim.BaseSim
This simulator was written to be used with GameBIND. It simulates the game with an Adversary and allows you to compute an approximate advantage.
- compute_advantage(trials=10)[source]
Adv = Pr[Bind => true]
- Returns
Approximate advantage computed using the above equation.
playcrypt.simulator.cca_sim module
- class playcrypt.simulator.cca_sim.CCASim(game, adversary)[source]
Bases:
playcrypt.simulator.base_sim.BaseSim
This simulator was written to be used with GameCCA. It simulates the game with an Adversary and allows you to compute an approximate advantage.
- compute_advantage(trials)[source]
Adv = Pr[Right => 1] - Pr[Left => 1]
- Returns
Approximate advantage computed using the above equation.
playcrypt.simulator.cr_sim module
- class playcrypt.simulator.cr_sim.CRSim(game, adversary)[source]
Bases:
playcrypt.simulator.base_sim.BaseSim
- compute_advantage(trials=1000)[source]
Adv = Pr[CR(H,A)->true]
- Returns
Approximate advantage computed using the above equation.
playcrypt.simulator.ctxt_sim module
- class playcrypt.simulator.ctxt_sim.CTXTSim(game, adversary)[source]
Bases:
playcrypt.simulator.base_sim.BaseSim
This simulator was written to be used with GameINTCTXT. It simulates the game with an Adversary and allows you to compute an approximate advantage.
- compute_advantage(trials=1000)[source]
Adv = Pr[UFCMA => True]
- Returns
Approximate advantage computed using the above equation.
playcrypt.simulator.kr_sim module
- class playcrypt.simulator.kr_sim.KRSim(game, adversary)[source]
Bases:
playcrypt.simulator.base_sim.BaseSim
This simulator was written to be used with GameKR. It simulates the game with an Adversary and allows you to compute an approximate advantage.
- compute_advantage(trials=1000)[source]
Adv = Pr[KR => true]
- Returns
Approximate advantage computed using the above equation.
playcrypt.simulator.lr_sim module
- class playcrypt.simulator.lr_sim.LRSim(game, adversary)[source]
Bases:
playcrypt.simulator.base_sim.BaseSim
This simulator was written to be used with GameLR. It simulates the game with an Adversary and allows you to compute an approximate advantage.
- compute_advantage(trials=1000)[source]
Adv = Pr[Right => 1] - Pr[Left => 1]
- Returns
Approximate advantage computed using the above equation.
playcrypt.simulator.ufcma_sim module
- class playcrypt.simulator.ufcma_sim.UFCMASim(game, adversary)[source]
Bases:
playcrypt.simulator.base_sim.BaseSim
This simulator was written to be used with GameUFCMA. It simulates the game with an Adversary and allows you to compute an approximate advantage.
- compute_advantage(n=1000)[source]
Adv = Pr[UFCMA => True]
- Returns
Approximate advantage computed using the above equation.
playcrypt.simulator.world_sim module
- class playcrypt.simulator.world_sim.WorldSim(game, adversary)[source]
Bases:
playcrypt.simulator.base_sim.BaseSim
This simulator was written to be used with GamePRF. It simulates the game with an Adversary and allows you to compute an approximate advantage.
- compute_advantage(trials=1000)[source]
Adv = Pr[Real => 1] - Pr[Rand => 1]
- Returns
Approximate advantage computed using the above equation.