# Signature Algorithm

Digital signature is an important part of CyberBaller, which ensures the security of CyberBaller system.&#x20;

The signature algorithm includes three parts, namely, the signer's key generation algorithm, the signature generation algorithm, and the signature verification algorithm.

Digital signatures have two important properties: Only the owner can make his own signature, but anyone who sees it can verify that it is valid; second, the signature is only associated with a specific document, the signature cannot be used to indicate that the owner supports another different files.&#x20;

The digital signature scheme consists of the following three algorithms:&#x20;

1\. (sk, pk):=generateKeys (keysie); the generateKeys method takes keysize as input to generate a pair of public and private keys. The private key sk is kept securely and used to sign a message; the public key pk is available to anyone and can be used to verify the signature.&#x20;

2.sig: =sig(sk, message); The signature process takes a message and a private key as an input, and the corresponding message output is a signature.&#x20;

3\. isValid: =verify(sk, message, sig); The verification process is to use a message, a signed message and a public key as input, if the returned result is true, the signature is proved to be true; if the returned result is false, the signature is proved The message is false.&#x20;

At the same time, it is required to have the following two properties：&#x20;

1\. A valid signature can be verified, ie: Verify(pk, message, sign(sk, message))==true.&#x20;

2\. The signature cannot be forged.

![](https://2890204733-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzSjeXRztnMjt3VZnA5nQ%2Fuploads%2FmvJuxbtwwm5RFKmG5s95%2F%E5%9B%BE%E7%89%87.png?alt=media\&token=d547548e-fe1e-41fe-9dee-d80fd1276917)
