Security Informtion

First of all, we should ask ourselves why is it important to protect information ?

Well... we all have secrets... companies, governments and individuals...

To help us, our "sages" gave them acronyms, CIA.



Confidentiality

One of the main issues in confidentiality is: encryption.

Encryption is taking information and making it such that even if someone reaches it, he will not be able to understand what is there.

For example, in the old and famous encryption of Julius Caesar, the "Caesar cipher", this algorithm deflects letters, (for example here, a 3 letter offset) the letter A becomes C, and the letter B becomes D, and so on...

ZH KDYH WR NLOO MXOLXV FDHVDU which is actually = We have to kill Julius Caesar






 

Modern encryption types:

Today we are using more sophisticated encryption technologies…

  • Symmetric encryption

  • Asymmetric encryption

 

Example from everyday life:

The home door, we encrypt it with a key, and when we return home we decrypt with the same key.

 

How Symmetric encryption works ?

We take a key and lock the data, we call that "Encryption".

We take the exact same key to decrypt the information, we call it "Decryption".

Modern Symmetric algorithms:

AES, 3DES, IDEA, etc...



 

Cons:

When we are not next to each other.. and we communicate through the public Internet, how can we pass the key to each other without someone in the middle can catch it ?

To do this, very smart people invented the Asymmetric encryption that uses a pair of keys (Key Pair).

Any information for encrypt using the Private Key can only be decrypted by the Public Key.



OK… Now say Hello to Alice and Bob:


Alice makes herself a pair of keys, and sends a copy of her public key to Bob. Bob takes his file and encrypts it using Alice’s public key (copy) and sends the file to Alice. Now Alice will decipher the information that Bob sent to her with her private key that no one has a copy of. Even if someone catches on the way the public key, he will not be able to decrypt the file, remember: we can decrypt the file only when we use the private key that exists only in Alice.


Common algorithms in asymmetric encryption for example:

RSA, DSA, DH, etc...


Abstract



Here is how the lock 🔒 really looks:


 

Here is how an encrypted message 📧 looks:


 

Where is my RSA public key on my laptop ?

1cat ~/.ssh/id_rsa.pub

How can I find my public keys on my laptop ?

1ls ~/.ssh/*.pub

Where is my private key ?

1sudo find / |grep "\.pem"

Usually, it exists in:

1cat /etc/ssl/certs/cert.pem

 

Now, see it in a more visual way... enjoy...


 






 









Digital signature

Goal

  • Verify the identity of the sender.

  • Verify the integrity of the information.

Uses

Important documents, bank instructions, e-mail, software, anything that the identity of the sender is important.

According to the law in Israel, Europe & USA, a digital signature is equivalent to a manual signature.

How

Encrypt the information with the sender's private key (reverse use of keys).

Once the recipient of the message opens the message (with his public key) he realizes that the same person sent him the message because only he has the private key

How do we keep the private key ?

  • Hard drive + password

  • Smart card + password

Integrity (reliability)

Reliability means the integrity of the information, meaning that I have information that I passed on, and I want to make sure that what I sent is really what reached the destination, and that someone along the way did not catch the information and change it.

 

Hash

The algorithm that hash information in a one-way way (not like encryption)

  • Gets any length of information

  • Returns a fixed length (digest)

Example:

MD5 - 128 bit SHA1 - 160 bit




 

Principles

  • Impossible, in a reasonable time, to find a message that matches a particular hash.

  • Impossible, in a reasonable time, to find 2 messages with the same hash.

  • Impossible to change the file without changing the hash.

 

SHA1: 2 ** 51

MD5: 2 ** 20

Comments

Popular posts from this blog

Selenium - locators

Selenium Webdriver Manager

Selenium - brief

אבטחת מידע

Page Object Model, what is it ?

תבניות עיצוב - מפעל