Information Entropy
- Privacy vs Security (Panopticon (Psychologically affect humans))
- Information Security: Base 6 usage, can be used to represent a larger set of numbers.
- The difficulty of compression: explain (Information is more valuabe based on how compressable it is/ not how meaningful it is to me)
- Predictability & Compressability define the Entropy of Information
- Wheather (atmospheric noise) -> the best way to randomize information
- Zipf Law (use this law to see what is the entrop of a password for the most common words (20%))
- Check what sites are using to check the password?
Information Integrity
- Constants can be initialized with a variable
- Write your test first
- Tests are a contract between your clients and your organization
- Follow Test Driven Development (TDD)
- Just write code that passes the tests
- You make your code more beautiful after you have passed your tests
- Analyze the problem, pass your tests, then write beautiful code
- (Protobuffer): to send very compressed data; very different from the transferring of JSON and XML types
- Jumpee - Atom’s plugin to jump around your code
- RuboCop - to check your code for violation of syntax uses in Ruby
- Ruby methods are great (readable) if 5 lines of code are used.
- Map / Reduce to iterate over arrays, etc., instead of for loops.
- In order to understand how to get the most optimized code you must run benchmarks
Bonus:
# Ruby OOP Metaprogramming
attr_accessor
describe 'test' do
it 'test body'
# ...
end
end
# minitest
xxx.must_equal true
Domain Specific Language (DSL)- looks like new code(methods) being embedded into a programming language
YAML: A form of serializing data
Cryptography
- Keyspace: all the possible spaces that’s needed to cover the plaintext
- Confusion: encrypt -> ciphertext
- Diffusion: plaintext -> encrypt -> ciphertext
- Permutation: scramble cipher
- High Diffusion doesn’t necessarily mean High Confusions
- A cipher is secure if there are no real (shortcuts) patterns.
- Kerckhoff’s Principle
- Double Transposition Cipher: Problems with the size of column
- One time pad: keep changing the key
Cryptography Part B
- SK-Cryptography: Stream Ciphers
- RC4 operates with bytes and A5/1 Ciphers operate at bit level (more computational complexity)
- Diffusion is low for A5/1 Ciphers
- Diffusion keeps changing steadily
- WEP weak because of CRC (Cyclic Redundancy Check)
Asymmetric Cryptography
- PK-Cryptography ensures confidentiality (Agent (securing) Handler)
- PK-Cryptography ensures non-repudiation (Agent (signing) Handler)
- First we sign then secure so that the other side decrypts and then remove the signature with Agents public key.
- In the end it all boils down to one human problem: TRUST
- The luhn validator is easy to check and easy to solve
- All P problems and are NP Problems.
Assignments (Coded in Ruby)
- Luhn Algorithm
- Permutation, Substitution and Double Transposition Ciphers
- Advanced Cryptography and Hashing