Skip to content

Commit

Permalink
compiler: add multisig checks interops
Browse files Browse the repository at this point in the history
Part of #918
  • Loading branch information
AnnaShaleva committed Jul 14, 2020
1 parent 1697b6e commit 0e86da1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/compiler/syscall.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ var syscalls = map[string]map[string]string{
"Deserialize": "System.Binary.Deserialize",
},
"crypto": {
"ECDsaSecp256r1Verify": "Neo.Crypto.VerifyWithECDsaSecp256r1",
"ECDsaSecp256k1Verify": "Neo.Crypto.VerifyWithECDsaSecp256k1",
"ECDsaSecp256r1Verify": "Neo.Crypto.VerifyWithECDsaSecp256r1",
"ECDsaSecp256k1Verify": "Neo.Crypto.VerifyWithECDsaSecp256k1",
"ECDSASecp256r1CheckMultisig": "Neo.Crypto.CheckMultisigWithECDsaSecp256r1",
"ECDSASecp256k1CheckMultisig": "Neo.Crypto.CheckMultisigWithECDsaSecp256k1",
},
"enumerator": {
"Concat": "System.Enumerator.Concat",
Expand Down
12 changes: 12 additions & 0 deletions pkg/interop/crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,15 @@ func ECDsaSecp256r1Verify(msg []byte, pub []byte, sig []byte) bool {
func ECDsaSecp256k1Verify(msg []byte, pub []byte, sig []byte) bool {
return false
}

// ECDSASecp256r1CheckMultisig checks multiple ECDSA signatures at once. It uses
// `Neo.Crypto.CheckMultisigWithECDsaSecp256r1` syscall.
func ECDSASecp256r1CheckMultisig(msg []byte, pubs [][]byte, sigs [][]byte) bool {
return false
}

// ECDSASecp256k1CheckMultisig checks multiple ECDSA signatures at once. It uses
// `Neo.Crypto.CheckMultisigWithECDsaSecp256k1` syscall.
func ECDSASecp256k1CheckMultisig(msg []byte, pubs [][]byte, sigs [][]byte) bool {
return false
}

0 comments on commit 0e86da1

Please sign in to comment.