"Strict" software for playing and learning with private and public key
I'd suggest to get OpenSSL source, build it, and run it under debugger,
watching exactly what "-text" is doing to private key.
One could verify exponentiation operations with a calculator having big numbers capability.
ASN.1/DER parser could be handy to see private key file.