The North Carolina Journal of Mathematics and Statistics

The booleantools Package: An Open-Source Python Framework for Boolean Functions

Andrew Penland, Wesley Rogers


Boolean functions are crucial in the design of secure cryptographic algorithms. We introduce booleantools , an open-source Python package for the analysis and design of boolean functions. As an example of the software’s functionality, we show how it can be used to find geo- metric information about the space of all boolean functions on 5 variables.


coding theory;cryptography;computational algebra; Python; group theory; boolean functions; hamming distance

Full Text:



Asthana, R., Verma, N., and Ratan, R. (2014). Generation of boolean functions using genetic algo- rithm for cryptographic applications. In Advance Computing Conference (IACC), 2014 IEEE In- ternational, pages 1361–1366. IEEE.

Braeken, A., Borissov, Y., Nikova, S., and Preneel, B. (2005). Classification of boolean func- tions of 6 variables or less with respect to some cryptographic properties. In International Colloquium on Automata, Languages, and Programming, pages 324–334. Springer. https: //

Carlet, C. (2010). Boolean functions for cryptography and error correcting codes. Boolean mod- els and methods in mathematics, computer science, and engineering, 2:257–397. www.math.

Conway, J. H. and Sloane, N. J. A. (2013). Sphere packings, lattices and groups, volume 290. Springer Science & Business Media.

Fortin, F.-A., De Rainville, F.-M., Gardner, M.-A., Parizeau, M., and Gagne ́, C. (2012). DEAP: Evolutionary algorithms made easy. Journal of Machine Learning Research, 13:2171–2175.

GAP (2018). GAP – Groups, Algorithms, and Programming, Version 4.8.10. The GAP Group. Lidl, R. and Niederreiter, H. (1994). Introduction to finite fields and their applications. Cambridge university press.

Litzenberger, D. C. (2018). Pycrypto-the python cryptography toolkit.

National Institute of Standards and Technology (2015). Secure hash standard(shs). Technical report. Federal Information Processing Standards Publication 180-4.

Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., et al. (2011). Scikit-learn: Machine learning in python. Journal of machine learning research, 12(Oct):2825–2830. ttp:// volume12/pedregosa11a/pedregosa11a.pdf.

pyca/cryptography Developers (2018). pyca/cryptography.

Sadohara, K. (2001). Learning of boolean functions using support vector machines. In International Conference on Algorithmic Learning Theory, pages 106–118. Springer.

Siegenthaler, T. (1984). Correlation-immunity of nonlinear combining functions for cryptographic applications. IEEE Transactions on Information Theory, 30(5):776–780. org/document/1056949/.

The Sage Developers (2018). SageMath, the Sage Mathematics Software System (Version 7.6). Xiao, G.-Z. and Massey, J. L. (1988). A spectral characterization of correlation-immune combining functions. IEEE Transactions on information theory, 34(3):569–571. http://ieeexplore.