# Which ECDSA curve is used?

**URL:** <https://community.zymbit.com/t/which-ecdsa-curve-is-used/519>\
**Category:** ZYMKEY4\
**Created:** [April 27, 2019, 6:19am UTC](https://community.zymbit.com/t/which-ecdsa-curve-is-used/519 "2019-04-27T06:19:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scalextrix](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Scalextrix](https://community.zymbit.com/u/Scalextrix)\
**Post date:** [April 27, 2019, 6:19am UTC](https://community.zymbit.com/t/which-ecdsa-curve-is-used/519/1 "2019-04-27T06:19:29Z")

</div>

Hi simple question but could not find the answer, which ECDSA curve is used on the Zymbit 4i?  
I got the public key bytestring from the Python API and Im trying to represent that in hex to make a human readable public key, but using the Python import ecdsa is failing with an assertion error because I dont know which curve the points are on (I think!).

---

<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:** [April 27, 2019, 6:32am UTC](https://community.zymbit.com/t/which-ecdsa-curve-is-used/519/2 "2019-04-27T06:32:20Z")

</div>

Zymkey 4i uses secp256r1, formerly known as prime256v1. Also known as NIST-P256.

---

<div class="post-metadata">

**Author:** ![Scalextrix](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Scalextrix](https://community.zymbit.com/u/Scalextrix)\
**Post date:** [April 27, 2019, 7:44am UTC](https://community.zymbit.com/t/which-ecdsa-curve-is-used/519/3 "2019-04-27T07:44:46Z")

</div>

Hi thanks for the fast answer, Im stuck with this effort, do you have a method to decode the bytearray to any type of string encoding?

I think the bytearray is actually two elements, but there seem to be unrecognisable characters that are causing a normal .decode() from working.

I am not a pro developer, so I hope this request isnt too cheeky!

EDIT: OK found it

import zymkey  
from textwrap import fill

pk = zymkey.client.get\_ecdsa\_public\_key()  
s = fill(’ ‘.join(’{:02X}’.format© for c in pk), 49)  
print(s)
