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