<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>The Method of Factorizing Multi-Digit Numbers Based on the Operation of Adding Odd Numbers</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mykhailo Kasianchuk</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Igor Yakymenko</string-name>
          <email>iyakymenko@ukr.net</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stepan Ivasiev</string-name>
          <email>stepan.ivasiev@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ruslan Shevchuk</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lidiya Tymoshenko</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>. Department of Computer Science and Information Systems Management, Odesa National Polytechnic University, UKRAINE</institution>
          ,
          <addr-line>Odesa, 1 Shevchenko Str.</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>. Department of Cyber Security, Ternopil National Economic University, UKRAINE</institution>
          ,
          <addr-line>Ternopil, 8 Chekhova str.</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>1</fpage>
      <lpage>3</lpage>
      <abstract>
        <p>The method for factorizing multi-digit numbers based on the addition of odd numbers is developed in this article. The temporal characteristics of software implementations of the proposed method, the classical Fermat method and its improvement are experimentally investigated. It is revealed that the proposed algorithm, whose time reduction is linear, has an advantage over the other two with a large difference between the multipliers that are factorized. Other dependencies are declining parabolic.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>
        The factorization of a natural number or its
decomposition into simple multipliers belongs to the main
problems of the modern theory of numbers [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1-3</xref>
        ], various
forms of the system of residual classes [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
        ] and plays an
important role in cryptographic information security systems
[
        <xref ref-type="bibr" rid="ref6 ref7 ref8">6-8</xref>
        ]. As a rule, large-scale computing and time resources are
required for the expansion of the multiplicity of the number
obtained as a result of the product of two large prime
numbers [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        This circumstance is used in cryptographic algorithms as
protection against potential hacking attempts: for the creation
and multiplication of two prime numbers of large bits, it does
not require significant costs [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], and their factorization is a
long and laborious process. Despite the considerable efforts
of scientists in this direction, to date, there are no quantum
algorithms for factorizing multi-digit numbers, which allow
executing the timetable for the multipliers at a practical time.
But the proof that there is no solution to this problem in
polynomial time is also absent [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>
        Particular interest to the factorization problem was the
emergence of cryptographic algorithm encryption RSA,
which uses its computational complexity [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
      </p>
      <p>
        The decomposition of numbers containing in a binary
record up to 768 bits inclusive was obtained for polynomial
time by the modern methods (in particular, the general
method of the numerical field sieve) [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. However, further
increase in the dimension significantly increases the
complexity of the scheduling operation of a composite
number. In connection with this, it is necessary to develop
other approaches to solving the problem of factorization of
integers.
      </p>
      <p>II. FERMAT'S FACTORIZATION METHOD</p>
      <p>
        Fermat's method is the most widely used method [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ],
which is based on the search for pairs of natural numbers А
and В, for which equality n=A2-B2 is performed, where n=p⋅q
is known integer, which is the product of two unknown
primes p and q, which should be found.
      </p>
      <p>For this purpose m = [ n ] is searched and then the
parameter f(x)=(m+x)2-n is calculated, where x=1, 2, 3, … , as
long as some value f(x) will not be equal to the full square of
a number, for example В2.</p>
      <p>Then, respectively, А2=(m+x)2 and the desired
decomposition will be n=p⋅q= А2-В2=(А-В)(А+В).</p>
      <p>
        The most computable complex operations in this case are
elevation to a square and the search for a square root. In [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ],
an improved Fermat’s factorization method is proposed,
where the condition is used that squares of integers can be
represented as a sum of odd numbers, the number of which is
equal to this number:
      </p>
      <p>s
s2 = ∑ (2i − 1)</p>
      <p>i=1 . (1)</p>
      <p>Therefore, having found m та f1(x)=f(x) when х=1, the
following steps occur according to the expression
fi=fi-1+2(m+i)-1, where і=2, 3, 4, … as long as fi will not be a
full square of a certain number.</p>
      <p>The decomposition for multipliers will be determined by
this expression: n=(m+i-fi)( m+i+fi).</p>
      <p>Table 1 provides an example of factorization using the
classical and improved Fermat’s method for n=4717
( m1 = [ 4717 ]= 68 ).
Thus the decomposition of the number 4717 on simple
multipliers is obtained:</p>
      <p>4717=712-182=(71+18)(71-18)=89⋅53.</p>
      <p>It should be noted that the number of iterations in both
methods is the same. However, in the improved Fermat’s
method, the operation of elevating to a square of large
numbers is excluded. In addition, arithmetic operations are
performed over numbers of a much smaller digit than the
classical ones. But the most computationally labor-intensive
operation is the extraction of a square root.</p>
      <p>Therefore, the purpose of our work is to develop a
factorization algorithm based on the Fermat’s method, in
which there will be no square root search operation, which is
especially important for work with numbers of large bit rate
for the experimental study, as well as an experimental study
of the time characteristics of the software implementation of
the Fermat’s method, its modification and the proposed
algorithm.</p>
      <p>The property (1) is also used in the proposed algorithm,
the parameters m1=m and f11=f1 are calculated similarly to
the previous case. Then the sequence of operations f1і=f1 і-1-r1
і-1, r11=1, r1 і-1=2i-3=r1 і-2+2, i=2, 3, … are performed until
the condition for some і is not fulfilled:</p>
      <p>f1і-r1і≤0.</p>
      <p>Further calculations occur in such a way when performing
a strict inequality (2): m2=m1+1; f21=f1і+2 m2+1-r1і, r21=r1і+2.
Searching for the following values f2і, r2і is carried out in the
same way as the previous case. In the general case, these
calculations can be described by the following expressions:
fj і+1= fjі-rjі≤0, rj i+1=rjі+2, if fjі-rjі&gt;0;
fj+1 1= fjі+2mj+1-rjі≤0, rj i+1=rjі+2, if fjі-rjі&lt;0.</p>
      <p>Under the condition fjі-rjі=0, the desired quantities
А=(m+j) and B = (m + j)2 − n are determined which will be
a positive integer, the desired quantity, which will be a
natural number.</p>
      <p>It should be noted that in this case the value of the
parameter j corresponds to the number of steps in the
classical and improved Fermat’s method.</p>
      <p>Fig. 1 shows a block diagram of the developed algorithm,
and in the Table 2, the corresponding example is presented
(2)
(3)
(4)
for n=53⋅89=4717 ( m1 = [ 4717 ]= 68).</p>
      <p>begin
n</p>
      <p>2
q =  n  − n</p>
      <p>r1=1
r2 =  n ⋅ 2 + 1
q= q+r2</p>
      <p>Consequently, the decomposition of the number 4717 into
simple multipliers are carried out in this way:
18)=89⋅53. This procedure is performed without the use of a
computationally cumbersome operation extracting the square
root. Additionally, addition and subtraction are performed
over smaller numbers than in the two previous methods,
although the number of these operations is greater.</p>
      <p>IV. EXPERIMENTAL STUDY OF TIME
CHARACTERISTICS OF FACTORIZATION METHODS</p>
      <p>The multiplier р was chosen to be fixed and equal to the
largest prime number of a certain bit rate for the experimental
study of the factorization of the number n=p⋅q.</p>
      <p>Then, a number of prime numbers of the same digit are
determined that of p, of which 1000 values for the number q
were selected uniformly in the order of growth.</p>
      <p>After multiplying p by q, the timer fixed the factorization
time for each of the 1000 received products.</p>
      <p>The time characteristics of the software implementation of
the classical (curve 1) and improved (curve 2) Fermat’s
methods, as well as the proposed algorithm (curve 3) are
presented in Figures 2 and 3 for the bit rates 30
(р=1073741789) and 32 (р=4294967291) bits respectively.</p>
      <p>All calculations were carried out on a portable computer
Lenovo B50-70 with processor Intel Pentium 3558U (1.7
GHz). The amount of RAM in the device was 4 GB. When
designing the computing software, a high level programming
language C ++ was selected, which allows you to transform
the codes into different architectures and operating systems.</p>
      <p>All graphics are descending character, indicating a
decrease in the factorization time with a decrease in the
difference between the multipliers, whose product is
factorized. The proposed algorithm, whose time reduction is
linear, has an advantage over the other two at small values of
q. With increasing q the least time is characterized by an
improved Fermat’s algorithm.</p>
      <p>Further growth of q leads to the fact that the proposed
algorithm uses the most time compared to the other two. It
should be noted that with increasing the bit rate number of
the point of intersection of the straight line with the curves
obtained by using the Fermat’s method, are shifted to the left
on the graphs.</p>
      <p>Figure 4 depicts the graphs of the dependence of the
average factorization time of three methods on the bit rate
number for 1000 values selected by the above-described
method. It can be seen that all graphs grow in parabolic law
with increasing bit rate. The least average factorization time
is characterized by an improved Fermat’s algorithm, and the
largest one is classical.
Consequently, it is advisable to apply the proposed
method when there is a big difference between the numbers
whose product is to be factorized.</p>
      <p>The Table 3 shows the results of the factorization of the
product of two prime numbers for a fixed р=3571 and a
variable q (t1 - the classical Fermat’s method, t2 – the
improved Fermat’s method, t3 - the proposed algorithm).</p>
      <p>It can be seen from the Table 3 that the improved Fermat’s
method increases the speed factorization approximately into
1.1-1.2 times, and the proposed method – into 5-11 times
compared with the classical Fermat’s method.
3571
3571
3571
3571
3571
3571
3571
3571
3571
3571
3571
3571
3571
3571
3571
3571</p>
    </sec>
    <sec id="sec-2">
      <title>V. CONCLUSIONS</title>
      <p>This paper is devoted to the experimental study of the
time complexity for the factorization of many digit numbers
using the classical and improved Fermat method, and also the
factorization algorithm based on the subtraction operation is
proposed and investigated. Appropriate graphic dependencies
have been constructed. It is shown that the proposed
algorithm is characterized by less temporal complexity in the
case where the big difference between the numbers whose
product must be factorized.
0,172
0,297
0,438
1,156
1,781
4,86
6,265
12,843
26,875
32,859
103,078
214,141</p>
      <p>646
1112,657
2775,718
11159,56
0,157
0,281
0,406
1,109
1,703
4,656
5,828
12,156
26,235
34,406
86,391
220,375
571,828
1106,469
2765,922
9080,454
0,032
0,047
0,063
0,203
0,313
0,875
1,094
2,407
4,969
6,172
18,031
42,483
116,453
269,156
437,531
937,67</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>D.</given-names>
            <surname>Venturi</surname>
          </string-name>
          “Lecture Notes on Algorithmic Number Theory” New-York-Berlin: Springer-Verlag,
          <year>2009</year>
          . 217 p.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Ishmukhametov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Boyko</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Zyatdinov</surname>
          </string-name>
          “
          <article-title>On an approach to the problem of the factorization of natural numbers”</article-title>
          ,
          <source>Proceedings of High Schools. Mathematics</source>
          ,
          <year>2011</year>
          , pp.
          <fpage>15</fpage>
          -
          <lpage>22</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>V.</given-names>
            <surname>Shoup</surname>
          </string-name>
          “Computational Introduction to Number
          <source>Theory and Algebra”</source>
          , Cambridge University Press, Sec.
          <source>Edition</source>
          ,
          <year>2005</year>
          , 600 p.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M.</given-names>
            <surname>Kasianchuk</surname>
          </string-name>
          , “
          <article-title>The Construction of the modified Perfect Form of Residual Classes System Using Factorization”</article-title>
          ,
          <string-name>
            <surname>Radio</surname>
            <given-names>Electronics</given-names>
          </string-name>
          , Computer Science, Control,
          <year>2017</year>
          , Vol.
          <volume>42</volume>
          , №3, pp.
          <fpage>53</fpage>
          -
          <lpage>59</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Ya.M. Nykolaychuk</surname>
            ,
            <given-names>M.M.</given-names>
          </string-name>
          <string-name>
            <surname>Kasianchuk</surname>
            and
            <given-names>I.Z.</given-names>
          </string-name>
          <string-name>
            <surname>Yakymenko</surname>
          </string-name>
          <article-title>“Theoretical Foundations of the Modified Perfect Form of Residue Number System”</article-title>
          ,
          <source>Cybernetics and Systems Analysis</source>
          ,
          <year>2016</year>
          , V.
          <volume>52</volume>
          , №2, pp.
          <fpage>219</fpage>
          -
          <lpage>223</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.V.</given-names>
            <surname>Agranovsky</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.A.</given-names>
            <surname>Hadi</surname>
          </string-name>
          <article-title>“Practical cryptography: algorithms and their programming”</article-title>
          , Moscow: Solon-Press,
          <year>2009</year>
          , 256 p.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>O.N.</surname>
          </string-name>
          <article-title>Vasilenko “Theoretical and numerical</article-title>
          algorithms in cryptography”, Moscow: Center for Continuous Mathematical Education,
          <year>2003</year>
          , 326 p.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>N.</given-names>
            <surname>Koblitz</surname>
          </string-name>
          “
          <article-title>Course of Number Theory</article-title>
          and Cryptography”, Moscow: TVP,
          <year>2001</year>
          , 260 p.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>R.</given-names>
            <surname>Crandall</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Pomerance “Prime Numbers: A Computational Perspective</article-title>
          . Chapter 5:
          <string-name>
            <given-names>Exponential</given-names>
            <surname>Factoring Algorithms</surname>
          </string-name>
          ”, Springer-Verlag: New York,
          <year>2005</year>
          , pp.
          <fpage>2</fpage>
          -
          <lpage>6</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>D.</given-names>
            <surname>Kozaczko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ivasiev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Yakymenko</surname>
          </string-name>
          and
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Kasianchuk “Vector Module Exponential in the Remaining Classes System”</article-title>
          ,
          <source>Proceedings of the 2015 IEEE 8th International Conference on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications</source>
          (IDAACS'
          <year>2015</year>
          ), Warsaw, Poland,
          <year>2015</year>
          , pp.
          <fpage>161</fpage>
          -
          <lpage>163</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>S</given-names>
            <surname>Ishmukhametov</surname>
          </string-name>
          “
          <article-title>Methods for the factorization of natural numbers: a tutorial”</article-title>
          , Kazan: Kazan University,
          <year>2011</year>
          , 190 p.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>E.B.</given-names>
            <surname>Makhovenko</surname>
          </string-name>
          “
          <article-title>Theoretical and numerical methods in cryptography: Textbook”</article-title>
          , Moscow: Helios ARV,
          <year>2006</year>
          , 320 p.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>RSA</given-names>
            <surname>Challenge</surname>
          </string-name>
          . URL: https://www.emc.com/emc%20plus/
          <article-title>rsa-labs/historical/the-rsa-challengenumbers</article-title>
          .htm.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>M.</given-names>
            <surname>Karpiński</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ivasiev</surname>
          </string-name>
          , I. Yakymenko,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kasianchuk</surname>
          </string-name>
          and T. Gancarczyk “
          <article-title>Advanced method of factorization of multi-bit numbers based on Fermat's theorem in the system of residual classes”</article-title>
          ,
          <source>Proc. of 16th International Conference on Control, Automation and Systems (ICCAS-2016)</source>
          , Gyeongju, Korea, V.1,
          <string-name>
            <surname>October</surname>
          </string-name>
          ,
          <year>2016</year>
          , pp.
          <fpage>1484</fpage>
          -
          <lpage>1486</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>