# 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$$
