# Export zymkey public key to PEM format

**URL:** <https://community.zymbit.com/t/export-zymkey-public-key-to-pem-format/1271>\
**Category:** ZYMKEY4\
**Created:** [September 9, 2021, 5:07pm UTC](https://community.zymbit.com/t/export-zymkey-public-key-to-pem-format/1271 "2021-09-09T17:07:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josetv](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@josetv](https://community.zymbit.com/u/josetv)\
**Post date:** [September 9, 2021, 5:07pm UTC](https://community.zymbit.com/t/export-zymkey-public-key-to-pem-format/1271/1 "2021-09-09T17:07:37Z")

</div>

Hi,

We are trying to sign payloads using ZK4i as stated [here](https://community.zymbit.com/t/signing-script-example/1266) in order to send them to our API. For that, we need to previously export the Zymkey public key and keep it on server side for signature verification.

We are using this function to extract the public key from the zymkey: zymkey.client.get\_ecdsa\_public\_key()

However, we are not able to import the obtained key in our server, since we do not recognize this format (a bytearray that looks like hex). Could you help us with the importation details or the conversion to another format like PEM?

Thanks in advance,  
Jose

---

<div class="post-metadata">

**Author:** ![Bob\_of\_Zymbit](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Bob\_of\_Zymbit](https://community.zymbit.com/u/Bob_of_Zymbit)\
**Post date:** [September 9, 2021, 10:02pm UTC](https://community.zymbit.com/t/export-zymkey-public-key-to-pem-format/1271/2 "2021-09-09T22:02:50Z")

</div>

You could export the public key in PEM format to a file with the following,

zymkey.client.create\_public\_key\_file("/tmp/zk.pem", slot=0)

There are a couple of conditions on the file name, like it has to be an absolute path, you need write permission. You can review here:

> **[API Documentation](https://docs.zymbit.com/quickstart/api/)**
