Chinese reminder theorem is from 300 CE. 1700 years ago.
That's actively used in some libraries to validate the key (as stated in the link)
Euler just proved what Fermat theorized.
That's actively used in some libraries to validate the key (as stated in the link)
Euler just proved what Fermat theorized.
To be fair mathematics was really close for a really long time, but before that generalisation not all of the ingredients were there at the same place at the same time. It might well have been possible for the Chinese or Hindu-Arabic mathematicians to discover Fermat's theorem or perhaps even Lagrange's theorem (which is how I'd prove it from scratch if necessary), but as far as I can tell they did not.