Modular Forms For RNG
Modular Forms For RNG
Number Generation
Philipp Harland
April 2025
Email: [email protected]
Abstract
In this paper, we will go over a novel method to create pseudorandom
number generation, this specific algorithm using modular forms to achieve
that goal.
Contents
1 Theory 1
3 On computation 3
1 Theory
Def. A modular form is a specific type of function on the upper half-plane,
HC . An example of a modular form is the Eisenstein series, E2k for k ∈ Z+ .
Formally, a modular form of weight k and level Γ is a function defined w.r.t.
an arithmetic subgroup Ω ⊂ SL2 (Z). It is defined as having 2 conditions w.r.t.
a b
a function and a matrix γ(z) = az+b cz+d and γ = ∈ SL2 (Z) ⊃ Γ, which is
c d
the base for constructing γ(z).
1. f (γ(z)) = (cz + d)k f (z)
2. limIm(z)→∞ |(cz + d)−k f (γ(z))| ∈ F inR+ , or, the finite nonnegative real
numbers, a.k.a. the nonnegative real numbers without ∞.
We can exploit a specific property of modular forms for cryptography. To be more
specific, let’s illustrate the property with the following setup: have a lattice, Λ,
whose basis vectors are approximately equal in norm to {1, i} , and a modular
form, M – and if we input each of its points that are ∈ H into M, we will
have a lot of variation between given lattice points, even ones that are close
1
Figure 1: G16 (z), diagram generated by Samuel J. Li′ s Complex F unction P lotter web app
Figure 2: j(z), diagram generated by Samuel J. Li′ s Complex F unction P lotter web app
together, i.e. separated by at most 1 of either the basis vectors. Some examples
are G16 (z), and j(z), of which are sketched out in 1 and 2
Here, we will use sampling parameter variations from a parameter space, F
to accomplish our goal, of which we will demonstrate in the following chapter.
In Fig.1. and Fig.2., you can clearly see the variations in their values w.r.t.
perturbations that are smaller in norm than the elements of {1, i, 1 + i}, j(z)
especially of the 2. Let’s construct a specific example of a C-lattice. It will be
generated by ω1 and ω2 , of which (ω1 , ω2 ) = (0.8 + 0.8i, 0.7 + 0.3i). We have
the set L = {aω1 + bω2 |a, b ∈ Z}, which is the lattice generated by ω1 and ω2 .
We can, for example, take the vectors (2, 3)L and (3, 2)L . They are, respectively,
2ω1 +3ω2 and 3ω1 +2ω2 , which compute to 1.6+1.6i+2.1+0.9i and 2.4+2.4i+
1.4 + 0.6i, which are 3.7 + 2.5i and 3.8 + 3.0i. We will compute an example,
with the j-invariant, using a 5-term approximation.
j(2ω1 + 3ω2 ) = −2.04 × 106 + 3.6 × 106 i
j(3ω1 + 2ω2 ) = 4.7 × 107 + 1.4 × 108 .
Here, we see that they differ by about an order of magnitude, or, a factor of 10.
This shows an extreme level of volatility within the j-function w.r.t. medium-
sized perturbations, which is mirrored throughout the function, since it is periodic
in the R-component of a given rectangular subset of H with integer dimensions
and an integer area.
2
(
′ z ∈ H : M (z)
M (z) =
z ̸∈ H(z) : 0
which contains it as a subfunction. Here, we mean ”subfunction” in the sense
that f is a subfunction of g if Domf ⊂ Domg , ∨ Codf ⊂ Codg . This can be
verified by the fact we expanded the domain of our function, which satisfies both
the definition and one’s intuition of what a ’function inside a function’ is.
Now, we can select any complex number, and input it into our function, instead
of being restricted to just H.
Select a family of modular forms, G which can be moved through by a positive
integer parameter π reigning from a finitely large set Π in the parameter space
P, which is defined as the parameter space R × R × C × R × R × R × R × Π.
The first 2 copies of R are for translation within the function’s bounds, the
middle copy of C is for scaling the input by a complex number, the second
to last 2 copies of R are for complex number selection (the first one will be
the real part, the second will be the imaginary part; this works because C is
isomorphic under addition to R × R, this being trivial to prove), the last 2 copies
are for constant addition, and the set of positive integers Π is for moving between
modular forms (given they have a function between themselves and elements
of Π). We have an element, (x1 , x2 , w, x3 , x4 , x5 , x6 , π), of which we map to
Mπ′ (w(x3 + x4 i) + x1 + x2 i) + x5 + x6 i. Now, we randomly combine a sum of
these functions
Pn as follows:
J(n) = i=1, Xi ∈Random (P), Xi . Now, upon request, i.e. our algorithm is ran
once, we will sample a random number, f, and use it as an input in J. The end
result will be the combination of a sampling of f 8-tuples of parameters from the
parameter space.
3 On computation
Because we cannot compute infinite precision on a modular form, we are forced
to use approximations that terminate in a constant finite number of terms. This
is because computers are physical, and only have a finite number of physical bits
to store information with. A way to compute modular forms is by their Fourier
series, of which there are more details here: Notes by Rich Shwartz, published
to the library of Brown University.