# How To: Sign Data Using Multisig

**URL:** <https://forum.algorand.co/t/how-to-sign-data-using-multisig/1335>\
**Category:** General\
**Created:** [January 30, 2020, 4:28pm UTC](https://forum.algorand.co/t/how-to-sign-data-using-multisig/1335 "2020-01-30T16:28:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![fabrice](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@fabrice](https://forum.algorand.co/u/fabrice)\
**Post date:** [January 30, 2020, 8:17pm UTC](https://forum.algorand.co/t/how-to-sign-data-using-multisig/1335/2 "2020-01-30T20:17:45Z")

</div>

`ed25519verify` indeed can only verify standard ED25519 signatures, not multisig ones.

However, you should be able to simulate a multisig using TEAL script. Here is a draft for a 2-out-of-3 multisig (where public keys are pk1, pk2, pk3) (disclaimer: I’ve not tested the following TEAL script nor reviewed the security):

```nohighlight
arg_0 // data
arg_1 // signature under pk1 or empty
addr PK1 // load pk1
ed25519verify

arg_0 // data
arg_2 // signature under pk2 or empty
addr PK2 // load pk2
ed25519verify

arg_0 // data
arg_3 // signature under pk3 or empty
addr PK3 // load pk3
ed25519verify

// at this point on the stack, there should be 3 integers
// 0/1 for each potential signature
+
+ // compute the number of ed25519verify that passed
int 2
>= // check that it's above the threshold = 2

```

If you know how to sign under `pk2` and `pk3`, you generate these signatures `s2` and `s3`, and call the TEAL script with the following 4 arguments: `data`, `empty`, `s2`, `s3`.

---

_[View the full topic](https://forum.algorand.co/t/how-to-sign-data-using-multisig/1335)._
