i want to write a program in python to simply read pgp keys. however, i cant seem to find any documentation describing how pgp keys are formatted. i dont want to be searching through the source code of open pgp to look for source code that i wont be able to understand.
say i open a public key, remove the top "-----BEGIN PGP PUBLIC KEY BLOCK-----" and bottom "-----END PGP PUBLIC KEY BLOCK-----", and change the data back into bytes, then what? i saw my name and email somewhere in the middle, but i cant see anything else. which part tells the computer the cipher name/value (say rsa = 1, elgamal = 2, etc.) in the string? where is the key size? where is the time-the-key-is-valid-for? in general, how do pkc programs read the public/private keys?