Signature - zoobc/zoobc-core GitHub Wiki

Signature

This page will explain in brief the signature implementation used in zoobc. One of the feature in ZooBC is support of multiple signature

Signature Type

There are several types of digital signature to sign, verify and other things related to the account that have been implemented in zoobc

1. Ed25519 Signature

Ed25519 signature is the default signature that used in zoobc. Ed25519 signature is Edwards-Curve Digital Signature Algorithm (EdDSA) that compatible with Ed25519 RFC 8032's formulation. The signature length is 64 bytes.

[Signature:64Bytes]

To verify the signature of a transaction is using public key get from address account who create the transaction. The libary that zoobc use to valdiate the Ed25519 siganture of transaction is golang.org/x/crypto/ed25519 from build in Golang library

2. Bitcoin Signature

Bitcoin signature is based on Elliptic Curve Digital Signature Algorithm (ECDSA) using secp256k1 curve. Based on DER encoding of an ECDSA signature, the signature length can be up to 71 bytes. The signature of Bitcoin besides coitain the signature itself, it's consist public key. Public key in signature filed use verify the account who create transaction. The implemented format is as follow:

 [PublicKey:65Bytes/33Bytes, Signature:71Bytes]

To verify the signature of transaction, the first thing is verifying sender account address with public key in signature and then verify the signature of a transaction using public key. The libary that zoobc use to valdiate the Bitacoin siganture of transaction is github.com/btcsuite/btcd/btcec