The article is devoted to the new application of number-theoretic transforms. Representing number systems by these transforms allows us to create fundamentally new and efficient algorithms for factoring numbers and to calculate period of the exponential function and of the discrete logarithm. The factorization algorithm allows us to decompose any finite product into factors in one run, it is an exact test of number simplicity. This algorithm is based on representing number systems by a number-theoretic transforms and has no analogs in the world since it uses only simple arithmetic operations. Properties of number simplicity or other number properties are not applied. Thus, number factoring and calculations of the exponential function period and of the discrete logarithm are simple arithmetic operations that are performed in a finite time and belong to the complexity class P.