Is CryptoMiniSat just MiniSat with some hacks?

No. MiniSat’s “core” version, from which CryptoMiniSat was originally developed, contained about 1,500 lines of code. CryptoMiniSat today contains over 55,000 lines of code.

Is CryptoMiniSat only good to solve cryptographic instances?

No. Naturally, it was one of the program’s aims, but it also performs well on other instances. XORs, one of the major features of CryptoMiniSat, also come up in model counting, sampling, and software verification, for example. It is the SAT solver used by our approximate model counter ApproxMC and our almost-uniform sampler UniGen, and our fast sampler CMSGen is built on it.

Is CryptoMiniSat open source?

Yes. It is MIT licensed, in other words, you are free to use CryptoMiniSat as you like, including changing it, redistributing it, selling it, etc.

What’s the new thing in CryptoMiniSat compared to other solvers?

Treating XORs natively, with Gauss-Jordan elimination, is an important idea, but there are many others which also contribute in a major way to the speed of solving. The original ideas are described in our SAT 2009 paper, Extending SAT Solvers to Cryptographic Problems, and the Gauss-Jordan elimination in Enhanced Gaussian Elimination in DPLL-based SAT Solvers (Pragmatics of SAT 2010) and Tinted, Detached, and Lazy CNF-XOR Solving and Its Applications to Counting and Sampling (CAV 2020). For the historical record, this 2-page description of CryptoMiniSat 2.5.1 lists the ideas it used in 2010. I also write about the ideas used on my blog.

Is CryptoMiniSat using Gaussian elimination by default?

Yes. Gauss-Jordan elimination is always compiled in and is on by default. It works on the XORs that CryptoMiniSat recovers from the CNF or that you give it directly, and it turns itself off when it is not helping (--autodisablegauss). The size of the matrices it handles can be limited with --maxmatrixrows and --maxmatrixcols.

Do I have to use the XOR notation to fully utilise CryptoMiniSat?

Not necessarily. XORs are automatically recovered from the CNF (--xor, on by default), so you can simply feed your already generated CNFs, and CryptoMiniSat will recover the XORs and treat them natively. However, only XORs over at most 12 variables are recovered: 12 is both the default and the maximum of --maxxorsize. An XOR over n variables is encoded by 2^(n-1) clauses, and XORs over more than 5 variables are only recognised when all of their clauses are present at full length. Longer XORs are not recovered, so either cut them into shorter XORs using helper variables, or give them to CryptoMiniSat directly in the XOR notation: a line x1 2 3 0 means that variable 1 XOR variable 2 XOR variable 3 must be true, and negating a literal flips this.

How can I get CryptoMiniSat? Can I contribute?

The source code is on GitHub, and release binaries are on the releases page. You can also get it via Nix (nix shell github:msoos/cryptominisat), and the Python package via pip3 install pycryptosat. Changes are not only welcome, but also encouraged: file a bug report or create a pull request.

How do I use CryptoMiniSat as a library, or from Python?

CryptoMiniSat has C++ and Python interfaces, with C and Rust wrappers as well. They are incremental: they support assumptions and multiple solve calls. See the README for examples.

How do I get all solutions to my problem?

On the command line, --maxsol N gives you up to N solutions. From the library, call solve in a loop, and after each solution, add a clause that bans it; the README has an example. If there are too many solutions to list, count them with ApproxMC or Ganak instead.

Can CryptoMiniSat produce proofs?

Yes. CryptoMiniSat emits XLRUP proofs, for example cryptominisat5 input.cnf proof.xlrup, that can be checked by the formally verified checker cake_xlrup from frat-xor. With --xlrup 2, the proof is written in a smaller, faster binary encoding.

Can I use CryptoMiniSat as a preprocessor?

For that, try our model counting preprocessor, Arjun.

Why are there so many options for the solver? Which ones should I use?

It is very difficult to know which optimisations bring what benefits. The options are there such that the individual optimisations can be tested one-by-one, eliminating spurious optimisations. The default options should be OK.

What should I do if CryptoMiniSat couldn’t solve my problem in a reasonable amount of time?

Please try other solvers, such as CaDiCaL or Kissat. However, most likely, you need to re-formulate your problem. In case your problem is really interesting, you can drop me an email and I might be interested in trying to solve it.