Great. The point math and log factoring is unto itself. I am good with this. I am sure when the code simply calculates from a private key to a public point. it is not doing the complete factoring work. I was only seeing if there are some python people out there that can explain the code so that as this should work one can read it. Basically putting what the main function is doing in normal math rather than learning python complete. I am sure that this can be done as someone has compatible code that works with the blockchain relative to open ssl.
The privkey_to_pubkey() function appears to handle several different types of inputs, and provides corresponding output types. I'm not a python guy, but the cases in the switch seem to be: regular number, uncompressed hex, compressed hex, uncompressed binary string, compressed binary string, WIF.
Pubkeys can be compressed simply by throwing away the Y value and including a flag indicating which of the two possible values is right. This compressed form has a different hash from the uncompressed form, and thus a different address, so a portable private key needs to indicate which of the two possible addresses is the right one. This is done by including a flag that can be detected simply by noting the extra byte, or two extra hex characters.
base10_multiply() just does point multiplication in a very direct way. It is a loop, though it may not look like it. If it is still confusing, you
need to learn about EC math to make it clearer.
P.S. There is no factoring.