Is the pubkey stored in identity.pem in addition to the privkey (or its the seed there)?

Is any doc out there I have missed where the actual format of the identity.pem file generated/used by dfx is described?

In addition to the privKey, I would like to obtain the pubKey or calculate the pubKey based on privKey+seed.

To my understanding that info is on that file but still not able to read from there (using java), not even using openssl. Probably I am missing something out or is not a standard way. The header there mentions -----BEGIN PRIVATE KEY----- but there are much more than the 32 bytes I was expecting.