more updated content to display on the new site
This commit is contained in:
@@ -1,77 +1,32 @@
|
||||
# Block Ciphers
|
||||
Active v Passive Attacks
|
||||
========================
|
||||
|
||||
The main concept here is twofold:
|
||||
Base Definitions
|
||||
----------------
|
||||
|
||||
* 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
|
||||
Passive: compromising a system but not necessarily doing anything apart
|
||||
from *watching*
|
||||
|
||||
Active: compromising a system while doing something to the system apart
|
||||
from infiltrating it
|
||||
|
||||
_bs example ahead_
|
||||
Loosely speaking
|
||||
----------------
|
||||
|
||||
Say we have a key 7 and some data 123456.
|
||||
We take the whole data set and chunk it into blocks(for example): 12 34 56.
|
||||
*Passive* can be just like listening in on a conversation(eavesdropping)
|
||||
where *active* is like jumping into the conversation and trying to do
|
||||
something to it.
|
||||
|
||||
Let's say our function here is to just add 7 to each block so we do the first step:
|
||||
When/How would either happen?
|
||||
-----------------------------
|
||||
|
||||
```
|
||||
12 + 7 = 19
|
||||
Unlike other ciphers we don't reuse 7; instead we use the new thing as both the new key and part of our cipher text
|
||||
If the result of an attack is to actually trigger some code to run then
|
||||
usually we need to first gather the information required to understand
|
||||
how to make that happen. The reasoning is straightforward: if you don't
|
||||
know how some system works then it's much harder to exploit that system.
|
||||
|
||||
19 + 34 = 53
|
||||
Cipher: 1953..
|
||||
|
||||
53 + 56 = 109 <= let's pretend that this rolls over 99 and back to 00
|
||||
09 <= like this
|
||||
|
||||
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:
|
||||
|
||||
1. each _thing_ in the data to cipher is replaced by a _ciphered thing_
|
||||
|
||||
2. nothing is added or deleted or replaced in sequence, instead the order of _things_ is changed.
|
||||
|
||||
Basically imagine that every _type of thing_ in our data maps to some other _type of thing/thing_ in the data and thus become swapped/reordered.
|
||||
|
||||
# DES - Data Encryption Standard
|
||||
|
||||
Widely used until about 2001 when AES surpassed it as the newer(ish(kinda)) standard.
|
||||
|
||||
DEA was the actual algorithm tho:
|
||||
|
||||
* 64 bit blocks
|
||||
* 56 bit keys
|
||||
* turns a 64-bit input into a 64-bit output (wew)
|
||||
* Steps in reverse also reverse the encryption itself
|
||||
Random example: Using a keylogger to log keystroke before sending those
|
||||
logs to a server for processing could be a passive attack since you're
|
||||
still in a *gathering data* sort of mode. Finally using that data to
|
||||
trying logging into some service would be the active portion of a
|
||||
full-scale attack.
|
||||
|
||||
Reference in New Issue
Block a user