├── .gitignore ├── README.md ├── belief_propagation ├── .gitignore ├── CMakeLists.txt ├── config │ ├── add.yaml │ ├── addConst.yaml │ ├── andConst.yaml │ ├── invert.yaml │ ├── lossyPseudoHash.yaml │ ├── nonLossyPseudoHash.yaml │ ├── orConst.yaml │ ├── sha256.yaml │ ├── shiftLeft.yaml │ ├── shiftRight.yaml │ └── xorConst.yaml ├── include │ ├── hash_reversal │ │ ├── dataset.hpp │ │ ├── factor.hpp │ │ ├── factor_graph.hpp │ │ ├── inference_tool.hpp │ │ ├── probability.hpp │ │ └── variable_assignments.hpp │ └── utils │ │ ├── config.hpp │ │ ├── convenience.hpp │ │ └── stats.hpp ├── kompile.sh ├── process_stats.py └── src │ ├── hash_reversal │ ├── dataset.cpp │ ├── factor.cpp │ ├── factor_graph.cpp │ ├── inference_tool.cpp │ └── probability.cpp │ ├── main.cpp │ └── utils │ └── config.cpp ├── dataset_generation ├── __init__.py ├── bit.py ├── factor.py ├── generate.py ├── hash_funcs.py ├── nsha256.py └── sym_bit_vec.py ├── deep_learning ├── __init__.py ├── controller.py ├── dataset.py ├── factor.py ├── loss.py ├── main.py ├── models.py └── supervised_learning.py ├── eval.py ├── generate_all_hashes.sh ├── images ├── lossy_pseudohash.png ├── sha256_d1.png ├── sha256_d4.png ├── sha256_factors.pdf ├── sha256_factors.png ├── sha256_rv_growth.png └── solve_times.png ├── optimization ├── __init__.py ├── cplex_cp_solver.py ├── cplex_milp_solver.py ├── cryptominisat_solver.py ├── factor.py ├── gnc.py ├── gnc_solver.py ├── gradient_solver.py ├── gurobi_milp_solver.py ├── main.py ├── minisat_solver.py ├── ortools_cp_solver.py ├── ortools_milp_solver.py └── utils.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/README.md -------------------------------------------------------------------------------- /belief_propagation/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/.gitignore -------------------------------------------------------------------------------- /belief_propagation/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/CMakeLists.txt -------------------------------------------------------------------------------- /belief_propagation/config/add.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/add.yaml -------------------------------------------------------------------------------- /belief_propagation/config/addConst.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/addConst.yaml -------------------------------------------------------------------------------- /belief_propagation/config/andConst.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/andConst.yaml -------------------------------------------------------------------------------- /belief_propagation/config/invert.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/invert.yaml -------------------------------------------------------------------------------- /belief_propagation/config/lossyPseudoHash.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/lossyPseudoHash.yaml -------------------------------------------------------------------------------- /belief_propagation/config/nonLossyPseudoHash.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/nonLossyPseudoHash.yaml -------------------------------------------------------------------------------- /belief_propagation/config/orConst.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/orConst.yaml -------------------------------------------------------------------------------- /belief_propagation/config/sha256.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/sha256.yaml -------------------------------------------------------------------------------- /belief_propagation/config/shiftLeft.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/shiftLeft.yaml -------------------------------------------------------------------------------- /belief_propagation/config/shiftRight.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/shiftRight.yaml -------------------------------------------------------------------------------- /belief_propagation/config/xorConst.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/config/xorConst.yaml -------------------------------------------------------------------------------- /belief_propagation/include/hash_reversal/dataset.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/include/hash_reversal/dataset.hpp -------------------------------------------------------------------------------- /belief_propagation/include/hash_reversal/factor.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/include/hash_reversal/factor.hpp -------------------------------------------------------------------------------- /belief_propagation/include/hash_reversal/factor_graph.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/include/hash_reversal/factor_graph.hpp -------------------------------------------------------------------------------- /belief_propagation/include/hash_reversal/inference_tool.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/include/hash_reversal/inference_tool.hpp -------------------------------------------------------------------------------- /belief_propagation/include/hash_reversal/probability.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/include/hash_reversal/probability.hpp -------------------------------------------------------------------------------- /belief_propagation/include/hash_reversal/variable_assignments.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/include/hash_reversal/variable_assignments.hpp -------------------------------------------------------------------------------- /belief_propagation/include/utils/config.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/include/utils/config.hpp -------------------------------------------------------------------------------- /belief_propagation/include/utils/convenience.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/include/utils/convenience.hpp -------------------------------------------------------------------------------- /belief_propagation/include/utils/stats.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/include/utils/stats.hpp -------------------------------------------------------------------------------- /belief_propagation/kompile.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/kompile.sh -------------------------------------------------------------------------------- /belief_propagation/process_stats.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/process_stats.py -------------------------------------------------------------------------------- /belief_propagation/src/hash_reversal/dataset.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/src/hash_reversal/dataset.cpp -------------------------------------------------------------------------------- /belief_propagation/src/hash_reversal/factor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/src/hash_reversal/factor.cpp -------------------------------------------------------------------------------- /belief_propagation/src/hash_reversal/factor_graph.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/src/hash_reversal/factor_graph.cpp -------------------------------------------------------------------------------- /belief_propagation/src/hash_reversal/inference_tool.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/src/hash_reversal/inference_tool.cpp -------------------------------------------------------------------------------- /belief_propagation/src/hash_reversal/probability.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/src/hash_reversal/probability.cpp -------------------------------------------------------------------------------- /belief_propagation/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/src/main.cpp -------------------------------------------------------------------------------- /belief_propagation/src/utils/config.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/belief_propagation/src/utils/config.cpp -------------------------------------------------------------------------------- /dataset_generation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dataset_generation/bit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/dataset_generation/bit.py -------------------------------------------------------------------------------- /dataset_generation/factor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/dataset_generation/factor.py -------------------------------------------------------------------------------- /dataset_generation/generate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/dataset_generation/generate.py -------------------------------------------------------------------------------- /dataset_generation/hash_funcs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/dataset_generation/hash_funcs.py -------------------------------------------------------------------------------- /dataset_generation/nsha256.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/dataset_generation/nsha256.py -------------------------------------------------------------------------------- /dataset_generation/sym_bit_vec.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/dataset_generation/sym_bit_vec.py -------------------------------------------------------------------------------- /deep_learning/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deep_learning/controller.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/deep_learning/controller.py -------------------------------------------------------------------------------- /deep_learning/dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/deep_learning/dataset.py -------------------------------------------------------------------------------- /deep_learning/factor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/deep_learning/factor.py -------------------------------------------------------------------------------- /deep_learning/loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/deep_learning/loss.py -------------------------------------------------------------------------------- /deep_learning/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/deep_learning/main.py -------------------------------------------------------------------------------- /deep_learning/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/deep_learning/models.py -------------------------------------------------------------------------------- /deep_learning/supervised_learning.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/deep_learning/supervised_learning.py -------------------------------------------------------------------------------- /eval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/eval.py -------------------------------------------------------------------------------- /generate_all_hashes.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/generate_all_hashes.sh -------------------------------------------------------------------------------- /images/lossy_pseudohash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/images/lossy_pseudohash.png -------------------------------------------------------------------------------- /images/sha256_d1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/images/sha256_d1.png -------------------------------------------------------------------------------- /images/sha256_d4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/images/sha256_d4.png -------------------------------------------------------------------------------- /images/sha256_factors.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/images/sha256_factors.pdf -------------------------------------------------------------------------------- /images/sha256_factors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/images/sha256_factors.png -------------------------------------------------------------------------------- /images/sha256_rv_growth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/images/sha256_rv_growth.png -------------------------------------------------------------------------------- /images/solve_times.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/images/solve_times.png -------------------------------------------------------------------------------- /optimization/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /optimization/cplex_cp_solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/cplex_cp_solver.py -------------------------------------------------------------------------------- /optimization/cplex_milp_solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/cplex_milp_solver.py -------------------------------------------------------------------------------- /optimization/cryptominisat_solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/cryptominisat_solver.py -------------------------------------------------------------------------------- /optimization/factor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/factor.py -------------------------------------------------------------------------------- /optimization/gnc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/gnc.py -------------------------------------------------------------------------------- /optimization/gnc_solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/gnc_solver.py -------------------------------------------------------------------------------- /optimization/gradient_solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/gradient_solver.py -------------------------------------------------------------------------------- /optimization/gurobi_milp_solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/gurobi_milp_solver.py -------------------------------------------------------------------------------- /optimization/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/main.py -------------------------------------------------------------------------------- /optimization/minisat_solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/minisat_solver.py -------------------------------------------------------------------------------- /optimization/ortools_cp_solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/ortools_cp_solver.py -------------------------------------------------------------------------------- /optimization/ortools_milp_solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/ortools_milp_solver.py -------------------------------------------------------------------------------- /optimization/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/optimization/utils.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevphil/cryptosym/HEAD/requirements.txt --------------------------------------------------------------------------------