# Homomorphic Encryption - A Quick Intro
## Some Definitions
"ὁμός" (homos) => "same"
"μορφή" (morphe) => "shape"
homomorphism => a map/function preserving structure
homomorphic encryption => operations on encrypted data map to same operations on the unencrypted data
#### Weak Analogy - Gold Ring in a Locked Box

## Some Applications
Machine Learning Models
Private Queries
"Outsourced Computation"
## Some Types
### Partially Homomorphic Encryption (PHE)
Only one type of operation and no limit on number of operations
### Somewhat Homomorphic Encryption (SWE or SWHE)
More than one type of operation, but limited number of operations
### Fully Homomorphic Encryption (FHE)
All types of operation and no limit on number of operations
## Some History

## Some Cryptography
Symmetric vs Public Key
Circuits - AND and XOR
All functions can be reduced to a series of additions and multiplications - AND and XOR
## Some Math
Fun with Abstract Algebra / Number Theory
Groups => Rings => Fields
- Closure
- Associativity
- Identity
- Inverse
Abelian Group add Commutativity
### Hard Problems
Factorization - RSA
Discrete Logarithm - ElGamal
Elliptic Curve - Bitcoin, Ethereum BLS
Lattices - FHE (post quantum)
Shortest Vector Problem (SVP)
Closest Vector Problem (CVP)
Short Integer Solution Problem (SIS)
Learning With Errors Problem (LWE)
## Some Details
### Noise
Makes the encryption secure
Too much noise prevent decryption
Operations add noise - exponentially
### Bootstrapping
Reset the noise

### Some Implementations
https://homomorphicencryption.org
https://fhe.org
Implementation schemes (BGV, BFV, CKKS, etc.) focus on particular classes of computation support
https://github.com/Microsoft/SEAL (`brew install seal`)
https://github.com/openfheorg/openfhe-development
https://github.com/tuneinsight/lattigo
## Some Alternatives
### MPC
Multi Party Computation
### TEE
Trusted Execution Envirnment
SGX (Intel) and other "Secure Enclave" solutions