Cryptography
Cryptography is the science of encoding information.
Cryptographic Mechanisms
- Primitives:
- mathematical operations used as building blocks in the realization of schemes;
- e.g. DES, AES, RSA, ECC, etc;
- Schemes:
- combination of primitives and additional methods for the realization of cryptographic tasks such as cipher and digital signature;
- e.g. DES-CBC-PKCS5Padding, RSA-OAEP, etc;
- Protocols:
- sequences of operations performed by one or more entities, involving schemes and primitives;
- e.g. TLS, TLS_RSA_WITH_AES_128_CBC_SHA, etc.
Scheme Types
Schemes can be classified in two main groups:
Symmetric Schemes
- Cypher and authentication;
- Secret key used by both parties (cipher and decipher);
- Used to generate and verify the MAC;
- e.g. DES, AES, etc;
- Faster, but not so safe;
Asymmetric Schemes
- Cypher and digital signature;
- Public key to cipher and private key to decipher;
- Cypher schemes - “Everyone can cipher, only the receiver can decipher”;
- Authentication schemes - “Everyone can verify, only the authorized sender can sign”;
- Safer, but slower;
| Symmetric | Asymmetric | |
|---|---|---|
| Confidentiality | Symmetric Cipher | Asymmetric cipher |
| Authenticity | MAC | Digital Signature |
The difference between the MAC and the digital signature schemes are the following:
| MAC | Digital Signature | |
|---|---|---|
| Integrity | Yes | Yes |
| Authenticity | Yes | Yes |
| Non-repudiation | No | Yes |
| Speed | Fast | Slow |
| Security | Low | High |
| Key | Secret | Public/Private |
| Complexity | Low | High |