Skip to main content
Log in

Representing the Integer Factorization Problem Using Ordered Binary Decision Diagrams

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

Abstract

A method is given to reduce the problem of finding a nontrivial factorization of a positive integer \(\alpha \), greater than one, to the problem of finding a solution to a system of Boolean equations, that is, a system of equations such that each equation is of the form \(f=g\) where f and g are Boolean functions, meaning \(\{0,1\}\)-valued functions in zero or more Boolean (\(\{0,1\}\)-valued) variables. Our system is obtained by applying a sequence of reductions to an initial system of equations of the form

$$\begin{aligned} \{f_i(\vec {x},\vec {y}) = \alpha _i \mid i \in \{0, \dots , 2n\} \} \end{aligned}$$

where for each i \(f_i(\vec {x},\vec {y})=f_i(x_0,\dots ,x_n,y_0,\dots ,y_n)\) gives the coefficient of \(2^i\) in the binary expansion of

$$\begin{aligned} (x_0+2x_1+\dots +2^{n}x_n)(y_0+2y_1+\dots +2^{n}y_n), \end{aligned}$$

\(\alpha _i\) gives the coefficient of \(2^i\) in the binary expansion of \(\alpha \), and \(x_i\) and \(y_i\) are \(\{0,1\}\)-valued variables. That is, the initial system represents a binary multiplier whose output bits have been set equal to the bits of \(\alpha \). It is shown that each Boolean function in our reduced system, that is, each Boolean function

$$\begin{aligned} (g-h)~ {\text {mod}} 2 = {\left\{ \begin{array}{ll} 0 &{} \iff g=h \\ 1 &{} \iff g \ne h \end{array}\right. } \end{aligned}$$

such that \(g=h\) is an equation in the reduced system, can be represented by a type of graph called an ordered binary decision diagram (OBDD) with an upper bound on its number of vertices of \(\mathcal {O} \left( \log _2(\alpha /\log _2(\alpha )))^3 \right) \). Previous work has shown that the initial system has at least one Boolean function with an OBDD representation with number of vertices exponential in \(\log _2(\alpha )\).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

References

  1. Hittmeir, M.: A time-space tradeoff for lehman’s deterministic integer factorization method. Math. Comput. 90(330), 1999–2010 (2021)

    Article  MathSciNet  MATH  Google Scholar 

  2. Harvey, D.: An exponent one-fifth algorithm for deterministic integer factorisation. Math. Comput. 90(332), 2937–2950 (2021)

    Article  MathSciNet  MATH  Google Scholar 

  3. Stevenhagen, P.: The number field sieve. Algorithmic Number Theory 44, 83–100 (2008)

    MathSciNet  MATH  Google Scholar 

  4. Shor, P.W.: Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Rev. 41(2), 303–332 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  5. Boneh, D., et al.: Twenty years of attacks on the rsa cryptosystem. Notices of the AMS 46(2), 203–213 (1999)

    MathSciNet  MATH  Google Scholar 

  6. Ward, M.: Emv card payments-an update. Inf. Secur. Tech. Rep. 11(2), 89–92 (2006)

    Article  Google Scholar 

  7. Dierks, T., Rescorla, E. (2008) The transport layer security (tls) protocol version 1.2, Tech. rep

  8. Asketorp, J. (2014) Attacking RSA moduli with SAT solvers. http://urn.kb.se/resolve?urn=urn%3Anbn%3Ase%3Akth%3Adiva-157352. Accessed April 2016

  9. Eriksson, J., Höglund, J. (2014) A comparison of reductions from FACT to CNF-SAT. http://urn.kb.se/resolve?urn=urn%3Anbn%3Ase%3Akth%3Adiva-157342. Accessed April 2016

  10. Lundén, D., Forsblom, E. (2015) Factoring integers with parallel SAT solvers. http://urn.kb.se/resolve?urn=urn%3Anbn%3Ase%3Akth%3Adiva-166436. Accessed April 2016

  11. Lomonaco, S.J. (2013) Symbolic arithmetic and integer factorization. arXiv preprint arXiv:1304.1944

  12. Bagde, S. (2013) Implementation of the Boolean Factoring Algorithm. University of Maryland, Baltimore County. http://contentdm.ad.umbc.edu/cdm/ref/collection/ETD/id/24868. Accessed April 2016

  13. Raddum, H., Varadharajan, S. (2018) Factorization using binary decision diagrams. Cryptography and Communications pp. 1–18

  14. BRYANT, R.E. Graph-based algorithms for boolean function manipulation. IEEE Transactions on Computers 35(8)

  15. Woelfel, P. (2005) Bounds on the OBDD-size of integer multiplication via universal hashing. J. Comput. Syst. Sci. 71(4):520–534. https://doi.org/10.1016/j.jcss.2005.05.004

  16. Bryant, R.E.: Symbolic boolean manipulation with ordered binary-decision diagrams. ACM Computing Surveys (CSUR) 24(3), 293–318 (1992)

    Article  MathSciNet  Google Scholar 

  17. Ebendt, R., Fey, G., Drechsler, R. (2005) Advanced BDD optimization. Springer Science & Business Media

  18. Lind-Nielsen, J. (1999) BuDDy: A binary decision diagram package. http://vlsicad.eecs.umich.edu/BK/Slots/cache/www.itu.dk/research/buddy/. Accessed Jan 2017

  19. Brickenstein, M., Dreyer, A.: Polybori: A framework for gröbner-basis computations with boolean polynomials. J. Symb. Comput. 44(9), 1326–1345 (2009)

    Article  MATH  Google Scholar 

  20. Sato, Y., Inoue, S., Suzuki, A., Nabeshima, K., Sakai, K.: Boolean gröbner bases. J. Symb. Comput. 46(5), 622–632 (2011)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to David E. Brown.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix: Proofs for Section 2 (Preliminaries)

Appendix: Proofs for Section 2 (Preliminaries)

Proposition 1 For all \(N \in \mathbb {Z}_{+}\), \(\alpha ,\beta \in \mathbb {N}\), and \(x,y \in \mathbb {Z}\)

  1. (1)

    \((x \pm y) ~\text {mod}~ N = (x \pm (y ~\text {mod}~ N))~\text {mod}~ N\)

  2. (2)

    \((xy) ~\text {mod}~ N = ((x ~\text {mod}~ N)y) ~\text {mod}~ N\)

  3. (3)

    \((x ~\text {mod}~ (N^{\beta }) ) ~\text {mod}~ (N^{\alpha }) = x ~\text {mod}~ (N^{\min (\alpha ,\beta )})\)

  4. (4)

    \((x \pm y) ~\text {div}~ N = ( (x \pm (y ~\text {mod}~ N)) ~\text {div}~ N ) \pm (y ~\text {div}~ N)\)

  5. (5)

    \((xy) ~\text {div}~ N = (x ~\text {div}~ N)y+(((x ~\text {mod}~ N)y) ~\text {div}~ N)\)

  6. (6)

    \(( x ~\text {div}~ (N^{\beta }) ) ~\text {div}~ (N^{\alpha }) = x ~\text {div}~ (N^{\alpha +\beta })\)

  7. (7)

    \(x = N^{\beta }(x ~\text {div}~ (N^{\beta }))+\sum _{k=0}^{\beta - 1}((x ~\text {div}~ (N^k)) ~\text {mod}~ N)N^k\)

  8. (8)

    If \(x,y \in \mathbb {Z}\) and \(x \le y\) then \(((x ~\text {div}~ N) \le (y ~\text {div}~ N))\).

  9. (9)

    \((-1-x) ~\text {mod}~ N = N-1-(x ~\text {mod}~ N)\)

Additionally, if \(\alpha \le \beta \) then

$$ (x ~\text {mod}~ (N^{\beta })) ~\text {div}~ (N^{\alpha }) = (x ~\text {div}~ (N^{\alpha })) ~\text {mod}~ (N^{\beta -\alpha }). $$

Proof

For all \(w \in \mathbb {Z}\) \(w ~\text {mod}~ 1 = 0\) and \(w ~\text {div}~ 1 = w\). Thus if \(N=1\) then 1 through 9 hold.

Suppose that \(N>1\) is a positive integer, \(x,y \in \mathbb {Z}\), and \(\alpha ,\beta \in \mathbb {N}\). Statements 1 and 2 follow from the fact that congruence mod N respects addition, subtraction, and multiplication. If \(\alpha \le \beta \) then it follows from 1 and 2 that

$$\begin{aligned} (x ~\text {mod}~ (N^{\beta }) ) ~\text {mod}~ (N^{\alpha })&= ((x ~\text {mod}~ (N^{\beta })) + N^{\beta }(x ~\text {div}~ (N^{\beta }))) ~\text {mod}~ (N^{\alpha }) \\&= x ~\text {mod}~ (N^{\alpha }) \\&= x ~\text {mod}~ (N^{\min (\alpha ,\beta )}). \end{aligned}$$

If \(\alpha > \beta \) then since \(\{0,\dots ,N^{\beta }-1\} \subset \{0,\dots ,N^{\alpha }-1\}\),

$$\begin{aligned} (x ~\text {mod}~ (N^{\beta })) ~\text {mod}~ (N^{\alpha })&= x ~\text {mod}~ (N^{\beta }) \\&= x ~\text {mod}~ (N^{\min (\alpha ,\beta )}). \end{aligned}$$

Therefore 3 holds. To see that 4 holds, observe that

$$\begin{aligned} (x+y) ~\text {div}~ N&= \frac{x+y-((x+y) ~\text {mod}~ N)}{N} \\&= \frac{x+y-(y ~\text {mod}~ N)+(y ~\text {mod}~ N)-((x+(y ~\text {mod}~ N)) ~\text {mod}~ N)}{N} \\&= \frac{x+(y ~\text {mod}~ N)-((x+(y ~\text {mod}~ N)) ~\text {mod}~ N)}{N} + \frac{y-(y ~\text {mod}~ N)}{N} \\&= ((x+(y ~\text {mod}~ N)) ~\text {div}~ N) + (y ~\text {div}~ N) \end{aligned}$$

and

$$\begin{aligned} (x-y) ~\text {div}~ N&= \frac{x-y-((x-y) ~\text {mod}~ N)}{N} \\&= \frac{x-(y-(y ~\text {mod}~ N)+(y ~\text {mod}~ N))-((x-(y ~\text {mod}~ N)) ~\text {mod}~ N)}{N} \\&= \frac{x-(y ~\text {mod}~ N)-((x-(y ~\text {mod}~ N)) ~\text {mod}~ N)}{N}-\frac{y-(y ~\text {mod}~ N)}{N} \\&= ((x-(y ~\text {mod}~ N)) ~\text {div}~ N)-(y ~\text {div}~ N). \end{aligned}$$

The proof of 5 is another derivation similar to that for 4:

$$\begin{aligned} (xy) ~\text {div}~ N&= \frac{xy - ((xy) ~\text {mod}~ N)}{N} \\&= \frac{N(x ~\text {div}~ N)y + (x ~\text {mod}~ N)y - (((x ~\text {mod}~ N)y) ~\text {mod}~ N)}{N} \\&= (x ~\text {div}~ N)y + \frac{(x ~\text {mod}~ N)y - (((x ~\text {mod}~ N)y) ~\text {mod}~ N)}{N} \\&= (x ~\text {div}~ N)y+(((x ~\text {mod}~ N)y) ~\text {div}~ N). \end{aligned}$$

For the proof of 6 first observe that

$$\begin{aligned} x&= (x ~\text {mod}~ (N^{\beta })) + N^{\beta } (x ~\text {div}~ (N^{\beta })) \\&= (x ~\text {mod}~ (N^{\beta })) + N^{\beta } ((x ~\text {div}~ (N^{\beta })) ~\text {div}~ (N^{\alpha })) + N^{\beta + \alpha }((x ~\text {div}~ (N^{\beta })) ~\text {div}~ (N^{\alpha })). \end{aligned}$$

Therefore since

$$ (x ~\text {mod}~ (N^{\beta })) + N^{\beta } ((x ~\text {div}~ (N^{\beta })) ~\text {div}~ (N^{\alpha }) ) \le N^{\beta }-1 + N^{\beta }(N^{\alpha }-1) = N^{\beta + \alpha } - 1 $$

it follows that

$$ x ~\text {mod}~ (N^{\beta +\alpha }) = (x ~\text {mod}~ (N^{\beta })) + N^{\beta } ((x ~\text {div}~ (N^{\beta })) ~\text {mod}~ (N^{\alpha })). $$

And so

$$ (x ~\text {div}~ (N^{\beta })) ~\text {div}~ (N^{\alpha }) = x ~\text {div}~ (N^{\alpha +\beta }). $$

We use statement 6 to prove 7 by induction. For the base case observe

$$ x = (x ~\text {mod}~ N) + N(x ~\text {div}~ N). $$

For the inductive step, suppose that m is a positive integer and

$$ x = N^{m}(x ~\text {div}~ (N^{m}))+\sum _{k=0}^{m - 1}((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^{k}. $$

It follows that

$$\begin{aligned} x&= N^{m}(x ~\text {div}~ (N^{m}))+\sum _{k=0}^{m - 1}((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^k \\&= N^{m}(N((x ~\text {div}~ (N^{m})) ~\text {div}~ N) + ((x ~\text {div}~ (N^{m}))) ~\text {mod}~ N)+\sum _{k=0}^{m - 1}((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^k \\&= N^{m+1}(x ~\text {div}~ (N^{m+1}))) + N^{m}((x ~\text {div}~ (N^{m})) ~\text {mod}~ N)+\sum _{k=0}^{m - 1}((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^k \\&= N^{m+1}(x ~\text {div}~ (N^{m+1}))) + \sum _{k=0}^{(m+1) - 1}((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^k. \end{aligned}$$

Statement 8 follows immediately from the definition of \( ~\text {div}~ \) and the fact that \(w \mapsto \left\lfloor w/N \right\rfloor \) is an increasing function.

For statement 9, observe that for \(x \in \mathbb {Z}\) since \((x ~\text {mod}~ N) \in \{0,\dots ,N-1\}\), \(N-1-(x ~\text {mod}~ N) \in \{0,\dots ,N-1\}\), and so

$$ N-1-(x ~\text {mod}~ N) = (N-1-(x ~\text {mod}~ N)) ~\text {mod}~ N = (-1-x) ~\text {mod}~ N. $$

Now suppose that \(\alpha \le \beta \). It is evident from the preceding that for \(x \in \mathbb {Z}\)

$$ x = \sum _{k \ge 0}((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^k, $$
$$ x ~\text {mod}~ (N^{\alpha }) = \sum _{k=0}^{\alpha -1}((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^k, $$

and

$$ x ~\text {div}~ (N^{\alpha }) = \sum _{k \ge \alpha }((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^{k - \alpha }. $$

A direct derivation gives

$$\begin{aligned} (x ~\text {mod}~ (N^{\beta })) ~\text {div}~ (N^{\alpha })&= \left( \sum _{k=0}^{\beta -1}((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^k \right) ~\text {div}~ (N^{\alpha }) \\&= \sum _{k=\alpha }^{\beta -1}((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^{k-\alpha } \\&= \sum _{k=0}^{\beta -\alpha -1}((x ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^{k} \\&= \sum _{k=0}^{\beta -\alpha -1}(((x ~\text {div}~ (N^{\alpha })) ~\text {div}~ (N^{k})) ~\text {mod}~ N)N^{k} \\&= (x ~\text {div}~ (N^{\alpha })) ~\text {mod}~ (N^{\beta -\alpha }). \end{aligned}$$

\(\square \)

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Brown, D.E., Skidmore, D. Representing the Integer Factorization Problem Using Ordered Binary Decision Diagrams. Theory Comput Syst 67, 1307–1332 (2023). https://doi.org/10.1007/s00224-023-10147-7

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-023-10147-7

Keywords

Navigation