This commit is contained in:
shockrahwow 2019-09-19 11:17:46 -07:00
parent 1acbdaa966
commit fd997d98bb
2 changed files with 44 additions and 1 deletions

View File

@ -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:

16
312/notes/public.md Normal file
View File

@ -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).