# I can divide a very large integer - did I discover anything?

So I was sitting on an algorithm I thought up at school, and just decided to implement it. And it worked for what I wanted - but I don't know what this is worth.

I broke apart a 2048 private key for the $N$, $Q$, and $P$.

So for $N$:

CC0202236A4B976D7FC217BEF43F6C3EAC719BD97E1092059F972D2C993F1492
2D409516C78BE52105B34EFBBEDB809DBF8F66B278CFC24B2DEDB55322AACA04
405A4E6D03452B65A5403321037129369E34A03EC7096259B901CA3E1B944A58
4D49B8FD8199E0A02178F35112DA0498420414B9411449A1AB7389089CDABD18
1BE6B6A75E25D4F3B841930579800DA84BA364769EAC7BF1A322600502BB8540
E7DEDAC7406F942FFB37B83379C9213CA3650031F1780CB25A037971D7EEAAFB


I can divide $N$ with $P$:

D516C8D981FB9AC371FD118A72C321BC4017EAEE3B2052E57F255C5ACAEC18AC
CA7BB4EDA490857BA0728FAF55DD3EF418669D0D474B27A23F56B67905326D6D
2DE99FCA4BA9B7693DDAFB72447C81E6B3C11D0B2C80877956A832006675D13B
38E226DBDCC18C7127E1699EF64FDA749F5249FB4B50FC4E1AC669ED32947729


and correctly I get $Q$:

F51711DDE37AA3CF475D7ABF3549E084B723BDA65BEFDE814FF4D9FC4787E3E6
27077108677D2FF2C2268F8344E71F40FE3381616BB9F69300139C3D01BDA92D
B0AA6A4CB668C866359E327D89C0FFC31B3B88FECC4E9E1B30957EDCFC7069C0
4BDEAC10A5EF0CDBCFD78225AEBF6E5140BD93B69AAC9323F540086136834983


I then divide $N$ by $Q$, and $I$ get $P$.

Is this "worth" anything?

I know "Factoring" $N$ may take infinitely longer to do, but is "division" worth anything by itself?

• Large integer division is pretty standard and depending on the details quite "boring". But nonetheless it's nontrivial and as such it is impressive that you found out how to do it all by yourself in school! Dec 31, 2016 at 19:58
• Knuth's "The Art of Computer Programming" has efficient integer division algorithm, implementing it is not an easy programming exercise. Jan 1, 2017 at 18:33

Unfortunately you haven't made a scientific discovery.

One of the places where large integer division is required is when testing for prime values. Primality tests are required to find real prime numbers within a set of candidate primes. So to find $p$ and $q$ large integer division is already required.

That said, doing such a big calculation efficiently requires some interesting techniques. Definitely go on and study Discrete Math (and Computer Science and algorithms) if you're interested in these kind of things. Then you can always progress to Theoretical and/or Practical Cryptography once you've mastered those.

Just to show that this can be done using regular libraries (in Java):

import java.math.BigInteger;

public class BigNumberDivision {

private static final BigInteger P = new BigInteger("D516C8D981FB9AC371FD118A72C321BC4017EAEE3B2052E57F255C5ACAEC18ACCA7BB4EDA490857BA0728FAF55DD3EF418669D0D474B27A23F56B67905326D6D2DE99FCA4BA9B7693DDAFB72447C81E6B3C11D0B2C80877956A832006675D13B38E226DBDCC18C7127E1699EF64FDA749F5249FB4B50FC4E1AC669ED32947729", 16);
public static void main(String[] args) {
BigInteger q = N.divide(P);
System.out.println(q.toString(16));
// prints: f51711dde37aa3cf475d7abf3549e084b723bda65befde814ff4d9fc4787e3e627077108677d2ff2c2268f8344e71f40fe3381616bb9f69300139c3d01bda92db0aa6a4cb668c866359e327d89c0ffc31b3b88fecc4e9e1b30957edcfc7069c04bdeac10a5ef0cdbcfd78225aebf6e5140bd93b69aac9323f540086136834983
}
}


Or, in case you have access to the bc calculator on a POSIX system (Linux, Apple, Cygwin etc.) the one liner:

echo 'obase=16;ibase=16;\
CC0202236A4B976D7FC217BEF43F6C3EAC719BD97E1092059F972D2C993F1492\