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

**URL:** <https://forum.dfinity.org/t/is-the-pubkey-stored-in-identity-pem-in-addition-to-the-privkey-or-its-the-seed-there/4405>\
**Category:** Developers\
**Created:** [May 26, 2021, 10:55pm UTC](https://forum.dfinity.org/t/is-the-pubkey-stored-in-identity-pem-in-addition-to-the-privkey-or-its-the-seed-there/4405 "2021-05-26T22:55:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jron](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jron/32/1746_2.png) [@jron](https://forum.dfinity.org/u/jron)\
**Post date:** [May 26, 2021, 10:55pm UTC](https://forum.dfinity.org/t/is-the-pubkey-stored-in-identity-pem-in-addition-to-the-privkey-or-its-the-seed-there/4405/1 "2021-05-26T22:55:11Z")

</div>

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.

thanks
