×
Login Register an account
Top Submissions Explore Upgoat Search Random Subverse Random Post Colorize! Site Rules Donate
3

A variation on Fermats Factorization.

submitted by prototype to cryptography 1 monthMar 10, 2025 22:48:47 ago (+3/-0)     (cryptography)

graph of the basics:
https://files.catbox.moe/o3q5hy.png

foundational code:
https://pastebin.com/raw/xATkFkYc

If _m is correct, then we know _u is correct.

From that we can do

_u = log(n)/_m
k = _u x n

We also know that if _m is correct, then it equals m, and u = _u

From that, because z is just log(n)/2
we know that, starting with...

_u = (((u^log(n, log(m))) - (abs((n^2)-(n)) % ((q+p)/2))) - (e^((log(n) / log(z))-2)))/n


We can multiply _u x n to get k=
(((u^log(n, log(m))) - (abs((n^2)-(n)) % ((q+p)/2))) - (e^((log(n) / log(z))-2)))


From k we can do

k+(e^((log(n) / log(z))-2))

to get the value of...

((u^log(n, log(m))) - (abs((n^2)-(n)) % ((q+p)/2)))


Because u == _u, and m = _m, we can compute uex like so

uex = _u^log(n, log(_m))

Substituting u, and m, with _u, and _m.

And from there we can confirm m and u are correct, because if they are

(_u^(n, log(m))) / _u z log(n)/2



It turned out this didn't always work, however, something that does work:

We can iterate m instead, which is guaranteed to have a low value for some value of i such that vi() minimizes m for abs((n^2)-(n)) % ((q+p)/2) for some i in vi(n, p, q).

Deriving a small set of essential variables..
M = m-1
u = n%(f_out(M, n, n-M, n))
v = n%(f_out(M, n, n+M, n))
x = n%(f_out(m, n, n+M, n))
y = n%(f_out(m, n, n-M, n))
z = n%(f_out(m, n, n-m, n))

.. we can then work from there.

w = u+v+x+y+z

(q%(w))- (w-(n%w)) == m+1

And because of the properties of the graph, it is guaranteed to be the modulus m in vi(n, p, q)
that is the lowest value of abs((n^2)-(n)) % ((q+p)/2) for some index i, below the root of n.

And because the correct m, gives us the correct w, by implication we have sufficient information
to find a multiple of q for the set k x i + m

Essentially it is a novel variation of Fermat's factorization, without the constraints of the former,
exploiting modular forms to skip over having to find matching squares which is slow for very large semiprimes or cryptographic keys.

Still requires some testing, but it was a fun project over the course of an afternoon.



0 comments block


There doesn't seem to be anything here yet