## Simple Basic Encryption – Main differences between algorithms

### Reference

Symmetric Algo – one key to encrypt and decrypt.

Asymmetric Algo – separate key to encrypt and decrypt.

Stream ciphers – encrypt each bit in sequence.

Block ciphers – encrypt specific blocks of bits.

Hash/Message Digests – one way ciphers, create fingerprints of data.

## Simple Basic Encryption – Most commonly used algorithms

### Problem

Want to know the encryption short or long names.

### Solution

DES – Digital Encryption Standard. Symmetric block encryption algorithm

3DES – Triple DES. Symmetric block algo – uses DES three times.

RC4 – Rivest Cipher #4. Symmetric algo uses stream encryption.

RSA – Rivest, Shamir, Adelman. Symmetric block algo.

IDEA – International Data Encryption Algo, symmetric block algo – used by PGP.

AES – Advanced Encryption Standard (Rijndael) – symmetric block algo.

### Example

Demo of des3, rc4 and aes256 – using abc123 as password and thecatsatonthemat

`\$ echo thecatsatonthemat |  openssl enc -des3 -a -e -k abc123U2FsdGVkX1/I03dG1d8bGYycfojc4x/S5uU1YIf1QRPRw+9AgKhVCw==\$ echo "U2FsdGVkX1/I03dG1d8bGYycfojc4x/S5uU1YIf1QRPRw+9AgKhVCw==" | openssl enc -des3 -a -d -k abc123thecatsatonthemat\$ echo thecatsatonthemat |  openssl enc -rc4 -a -e -k abc123U2FsdGVkX1+NuZk94r5kJdFfw8gsjlO9ZV7BDXLwm+3PNg==\$ echo "U2FsdGVkX1+NuZk94r5kJdFfw8gsjlO9ZV7BDXLwm+3PNg==" |  openssl enc -rc4 -a -d -k abc123thecatsatonthemat\$ echo thecatsatonthemat |  openssl enc -aes256 -a -e -k abc123U2FsdGVkX1/bGQ0rtpGi6CjkeAyyEgQjnxkSWBQ6q7XLgAApdWHA5BdEuK24r/NY\$ echo "U2FsdGVkX1/bGQ0rtpGi6CjkeAyyEgQjnxkSWBQ6q7XLgAApdWHA5BdEuK24r/NY" |  openssl enc -aes256 -a -d -k abc123thecatsatonthemat`

## Ldap reference – ldap result codes

### Problem

Getting errors in LDAP

### Solution

Click on LDAP error number below to see LDAP error description.

### Example

0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,
17,18,19,20,21,32,
33,34,35,36,48,
49,50,51,52,53,54,64,
65,66,67,68,69,70,71,76

NumberMeaning
0Success
1Operations error
2Protocol error
3Timelimit exceeded
4Sizelimit exceeded
5Compare false
6Compare true
7Authentication method not supported
8Strong authentication required
12Unavailable critical extension
13Confidentiality required
14SASL bind in progress
16No such attribute
17Undefined attribute type
18Inappropriate matching
19Constraint violation
20Type or value exists
21Invalid syntax
32No such object
33Alias problem
34Invalid DN syntax
35Object is a leaf
36Alias deferenencing problem
48Inappropriate authentication
49Invalid credentials
50Insufficient access
51Server is busy
52Server is unavailable
53Server is unwilling to perform
54Loop detected
64Naming violation
65Object class violation
66Operation not permitted on non-leaf entry
67Operation not permitted on a RDN