# ECDSA verification of signature with foreign key

**URL:** <https://community.zymbit.com/t/ecdsa-verification-of-signature-with-foreign-key/811>\
**Category:** ZYMKEY4\
**Created:** [July 3, 2020, 1:44pm UTC](https://community.zymbit.com/t/ecdsa-verification-of-signature-with-foreign-key/811 "2020-07-03T13:44:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackraven](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@blackraven](https://community.zymbit.com/u/blackraven)\
**Post date:** [July 3, 2020, 1:44pm UTC](https://community.zymbit.com/t/ecdsa-verification-of-signature-with-foreign-key/811/1 "2020-07-03T13:44:56Z")

</div>

Hello,

My application use-case requires to verify signatures over messages given an external (foreign) public key using the zymbit. I wonder if you could provide an example of verification of a signature using a foreign public key since the API documentation does not matches the current module.py implementation:

def verify\_digest(self, sha256, sig, raise\_exception=True, pubkey\_slot=0, foreign=False):

In the python API documentation PDF file:

def zymkey.module.Zymkey.verify (self,  
src,  
sig,  
raise\_exception = True,  
slot = 0,  
pubkey = None,  
pubkey\_curve = ‘NISTP256’,  
sig\_is\_der = False )

However, I cannot find such declaration in the python API installed in my raspberry.

Thanks in advance.

---

<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:** [July 6, 2020, 4:07pm UTC](https://community.zymbit.com/t/ecdsa-verification-of-signature-with-foreign-key/811/2 "2020-07-06T16:07:49Z")

</div>

I apologize. I didn’t read your question correctly. I thought you were just pointing out the problem that the syntax in the API document doesn’t match the module. The zymkey APIs do not support the use of a foreign public key. You have to use a key from the zymkey. I’m editing my original post to reflect that.
