> For the complete documentation index, see [llms.txt](https://davidjosearaujo.gitbook.io/notes-mcs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://davidjosearaujo.gitbook.io/notes-mcs/applied-cryptography/digital-signatures/algorithms.md).

# Algorithms

## Message recovery scheme

* Asymmetric encryption and decryption.
* Only for RSA.

### Signing

$$
A\_x(doc) = info + E(K\_x^{-1}, doc)
$$

### Verification

* $$info$$ -> $$K\_x$$
* $$D(K\_x,A\_x(doc))$$
* Check the integrity of $$doc$$.

## Message appendix scheme

* Digest functions.
* Asymmetric signature and validation.
* RSA, ElGamal (DSA), EC.

### Signing

* $$A\_x(doc) = info + E(K\_x^{-1}, h(doc+info))$$
* $$A\_x(doc) = info + S(K\_x^{-1}, h(doc+info))$$

### Verification

* $$info$$ -> $$K\_x$$
* $$D(K\_x,A\_x(doc)) \equiv h(doc + info)$$
* $$V(K\_x,A\_x(doc)), h(doc + info) = True$$
