From fd997d98bba1464862892490710be0f7e1878ed1 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Thu, 19 Sep 2019 11:17:46 -0700 Subject: [PATCH] adsf --- 312/notes/ciphers.md | 29 ++++++++++++++++++++++++++++- 312/notes/public.md | 16 ++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 312/notes/public.md diff --git a/312/notes/ciphers.md b/312/notes/ciphers.md index 49fa7b5..7b16b8c 100644 --- a/312/notes/ciphers.md +++ b/312/notes/ciphers.md @@ -1,6 +1,6 @@ # Block Ciphers -The main concept here is twofold : +The main concept here is twofold: * we take _blocks_ of data and cipher the _blocks_ * A given key is actually used to generate recursive keys to be further used on the data itself @@ -28,6 +28,33 @@ Final cipher: 195309 _It should be noted that in practice these functions usually take in huge keys and blocks_. +> Deciphering + +Start from the back of the cipher not the front; if we used and xor function scheme (which is a symmetrical function) we would simply just xor the last block by itself and thus perform the same encryption scheme but in reverse. + +Example::Encryption + +``` +Key: 110 +Function scheme: xor +Data: 101 001 111 + +101 011 010 +110 001 111 + +011 010 101 <= encrypted + +``` + +Example::Decryption + +``` +Ciphered: 011 010 101 +Function scheme: xor + +... +``` + # Feistal Cipher Two main components: diff --git a/312/notes/public.md b/312/notes/public.md new file mode 100644 index 0000000..1457af3 --- /dev/null +++ b/312/notes/public.md @@ -0,0 +1,16 @@ +# Asymmetric Key Encryption(Public/Private) + + +Think of a box that we put things inside of:(put simply) + +* Private key: can open the box +* Public key: can lock the box + +Caveats: + +Public keys contain a unique signature, which can be used to _sign_ a message. Even though everyone can open the message they also know who locked the box. + +Imagine then, lock the box with private key(secure) and sign it with the public key(authorized). + + +