Security 101 Image attribution: Randall Munroe https://xkcd.com/936/ ELCA for

Security 101 or what do we owe our parents? Moral responsibility and obligations of IT workers (But the talk mostly is about know-how)

2 Who am I?

– Dániel Kovács

– Currently working @ ELCA • as senior software engineer • and self-appointed security enthusiast

– Beforehand @ IBM Research – Zurich Research Lab • as software engineer in the “Security & Privacy Group”

– Before that Junior Mainframe Administrator, Master’s, etc. • in Hungary

Security 101 An important note

– Do not trust the exact algorithm and protocol names mentioned in this presentation • Anything can become outdated from one day to the next

– Always consult your own (hopefully in-house) experts before doing anything security related

Security 101 1. Introduction

Agenda 2. Becoming more security-aware

3. Distributing the knowledge

Security 1015 Introduction The range of “security people”

Security Laymen Developers Cryptographers Specialists

Security 101 The range of “security people”

Security Laymen Developers Cryptographers Specialists

Security 101 Image attribution: ? The range of “security people”

Security Laymen Developers Cryptographers Specialists

Security 101 Who are cryptographers?

– We are talking here about guys like (arbitrary list): • Whitfield Diffie, Martin Hellman, Ralph Merkle ⇒ Diffie–Hellman(–Merkle) -exchange, a.k.a. DH • Ron Rivest, Adi Shamir, Leonard Adleman ⇒ RSA • Daniel J. Bernstein (Salsa20, ChaCha20, Ed25519, SipHash) • Dan Boneh – Remote Timing Attacks are Practical (Brumley, Boneh) – Threshold From Threshold Fully Homomorphic (Boneh, Gennaro, Goldfeder, Jain, Kim, Rasmussen, Sahai) • Countless others – like my former colleagues: Camenisch, Lehmann, Neven, Lyubashevsky, Boschini, Drijvers, et al.

Security 101 Who are cryptographers?

– Designing games with: • Alice  (Person A) • Bob  (Person B) • Eve 🧞‍♀️ (the Eavesdropper) • Mallory  (the Malicious) – Nowadays doing “verifiable ”, like the UC-Framework • And creating equations and protocols like

Security 101 Who are cryptographers?

– Nowadays doing “verifiable cryptography”, like the UC-Framework • And creating equations and protocols like

“Optimal Distributed Verification” Security 101 (Camenisch, Lehmann, Neven, CCS 2015 https://www.zurich.ibm.com/pdf/csc/CCS15_passwords.pdf) Who are cryptographers?

– Nowadays doing “verifiable cryptography”, like the UC-Framework • And creating equations and protocols like

“Elligator: Elliptic-curve points indistinguishable from uniform random strings” Security 101 (Bernstein et al. 2013 ACM SIGSAC https://elligator.cr.yp.to/elligator-20130828.pdf) Who are cryptographers?

– Nowadays doing “verifiable cryptography”, like the UC-Framework • And creating equations and protocols like

“Elligator: Elliptic-curve points indistinguishable from uniform random strings” Security 101 (Bernstein et al. 2013 ACM SIGSAC https://elligator.cr.yp.to/elligator-20130828.pdf ) The range of “security people”

Security Laymen Developers Cryptographers Specialists

Security 101 Who are security specialists?

– Mediate between the ideal world of cryptography and the real world

– Main goal is to create software systems, which are: secure, fast, usable

– Whom you can ask what to use for a certain task • Can answer, why you should use exactly that method

– Mostly understand how the method works • Although they most probably don’t hold a PhD in cryptography

– Follows news regarding security and are usually up-to-date • Although not always, nobody knows all CVEs by heart

Security 101 The range of “security people”

Security Laymen Developers Cryptographers Specialists

Security 101 Who are developers?

– Most probably: you

– Average in the sense that they do not care – and should not care – details and internals of security methods (protocols, algorithms, etc.)

– The ones who actually build the systems • Uses whatever the specialists provide them

– They do not need to understand the details, just follow the best practices • This does not mean that they cannot understand, it is just not necessary

– Most of the IT is around this point and this is good

Security 101 The range of “security people”

Security Laymen Developers Cryptographers Specialists

Security 101 Who are laymen?

– They are the ones who use the systems • Your family and friends; bosses and managers; customers

– They trust the other actors (usually) without second guesses • This does not mean that they do not care

– Their trust is implicit but in the recent times more and more questions arise

– We did not necessarily wanted this trust, but we have it, it is there

– Now we have to educate ourselves and them in order to • do not lose their trust • thus do not lose them

Security 101 Becoming more security-aware The range of “security people”

Security Laymen Developers Cryptographers Specialists

Security 101 The range of “security people”

Security Laymen Developers Cryptographers Specialists

Security 101 What is security?

– Common mistake, this is actually “just” authentication • Arguably the most important part – As it is the entry point – It is your first line of defense

– Let’s discuss authentication in more details, before diving head-first into security en bloc

Security 101 Image attribution: Cornel Stefanache & Constantin Orasanu https://www.monkeyuser.com/2017/security/ What is authentication?

– Authentication is the answer to the question: “Who are you?”

– Nowadays the basic in IT is username and password, usually explained as:

– But that is not an answer to “who are you?” • This answers the question “do you hold the key? (regardless of who you are.)”

Security 101 What is authentication?

– For our primitive brains the answer the “who are you?” is

– But currently that is identity, and not authentication.

– Authentication is proving a claim that you are who you were, when registering: • 0-factor authentication: ID-based (“username”, ID-card, biometrics, etc.) – Fingerprints are Usernames, not by Dustin Kirkland • 1-factor authentication: password, key, etc. • 2-factor authentication: a second password, a second key, etc. – the point being it is independent of the 1st factor • n-factor authentication: generalize to n

Security 101 How should we authenticate?

– Primitive 1: hash

– What is hashing?

F ≔ a non-linear function ⊕ ≔ addition mod 232

⋘s ≔ shift by s bits

One round of MD5

Security 101 Image attribution: https://en.wikipedia.org/wiki/MD5 by https://en.wikipedia.org/wiki/User:Matt_Crypto How should we authenticate?

– Primitive 1: hash

– What is hashing?

⊕ ≔ addition mod 232 Ch(E, F, G) ≔ (E ∧ F) ⊕ (¬E ∧ G) Ma(A, B, ) ≔ (A ∧ B) ⊕ (A ∧ C) ⊕ (B ∧ C)

∑0(A) ≔ (A ⋙ 2) ⊕ (A ⋙ 13) ⊕ (A ⋙ 22) ∑1(E) ≔ (E ⋙ 6) ⊕ (E ⋙ 11) ⊕ (E ⋙ 25)

One round of SHA2

Security 101 Image attribution: https://en.wikipedia.org/wiki/SHA-2 by https://commons.wikimedia.org/wiki/User:Kockmeyer How should we authenticate?

– Primitive 1: hash

– What is hashing? N-times

Security 101 How should we authenticate?

– 1st factor is currently in 99.9999% the cases is a password • Please do not store them as plaintext, it does not matter how convenient that is – Also: non-compliant with GDPR • Please do not store them as a simple one-round SHA1 or SHA2 (256/512) hash – You think it is irreversible? a80b18fcf1d66cfcf86b50d493b0ba0406184855 – The internet does not think so: numerous sites where you will find the input of this hash – Reverse-indexes even for multi-round basic hashes are freely available (so-called rainbow tables) • Ask your security specialist what are current best practices, as far as I am aware – Use PBKDF2, , or with settings so it is not painful for the end-user – Always use a random “” (i.e., extra randomly generated value, stored next to the username and password) • We will talk about so-called password policies towards the end

– There are alternatives but they are still not widespread, used currently as 2nd factors

Security 101 How should we authenticate?

– 2nd factor is currently in 99.9999% the cases is an SMS • Don’t. Just don’t. Remember Eve the Eavesdropper? – Look on the net for attacks against SS7 (a.k.a. Signaling System 7, a.k.a. Common Channel Signaling System 7) – Sometimes SMSs are in the plain on the net (just like passwords) – Social engineering (re-registering, scam calls/texts, etc.)

– If you want to provide second factors, there are some good alternatives • Authenticator apps for smartphones (like ELCARD, etc.) – Issue: channel is often not really separated • Physical tokens, mostly for more tech-savvy users (like FIDO, RSA-tokens, etc.) – Only for tech-savvy because of portability, drivers, etc.

Security 101 What is authorization?

– Authorization is the answer to the question: “What do you want?”

– This is more well-known in the physical world • signature rights • door opening rights • etc.

– There are standardized solutions, mostly hidden behind acronyms • IBAC/ACL (Identity-Based Access Control/Access Control List) • ABAC (Attribute-Based Access Control) • RBAC (Role-Based Access Control)

– Thus XACML was born

Security 101 Image attribution: Randall Munroe https://xkcd.com/2077/ How should we authorize?

– Sadly no one-size-fits-all solution

– It will pretty much depend on the actual software

– Some key points: • At the lowest level: always do it, even if it’s a duplicate check • Do not do it more granular than needed • Pre vs. Post authorization • Function vs. Data authorization

– Attacks: privilege escalation

Security 101 What is verification?

 ✓

Security 101 What is verification?

  ✓

Security 101 What is verification?

  

Security 101 What is verification?

  ⚠

So-called integrity verification

Security 101 What is verification?

  ⚠

Security 101 What is verification?

  ⚠

So-called authenticity verification

Security 101 What is verification?

  ⚠

– Primitive 2: MAC ( Code)

– Nowadays not really used in itself, but it is a primitive • has be known and well understood • part of lot of more complex stuff, as we’ll see

– Key properties (as long as the key is kept secret) • data integrity: the data is not modified, it is exactly as sent • authentication: the message comes from somebody who has the key

Security 101 What is verification?

 🧞‍♀️ ✓

– Primitive 2: MAC (Message Authentication Code)

– Nowadays not really used in itself, but it is a primitive • has be known and well understood • part of lot of more complex stuff, as we’ll see

– Key properties (as long as the key is kept secret) • data integrity: the data is not modified, it is exactly as sent • authentication: the message comes from somebody who has the key

Security 101 What are random numbers?

– Primitive 3: CSPRNG (Cryptographically Secure Pseudo-Random Number Generator) – They are the basis of any kind of key generation

– Real random numbers would be good but are very hard to obtain • There are some devices, based on quantum mechanics

Security 101 Image attribution: Randall Munroe https://xkcd.com/221/ What are random numbers?

– Primitive 3: CSPRNG (Cryptographically Secure Pseudo-Random Number Generator)

– PRNGs are a process, where from a seed value and a deterministic algorithm • Yes, they are deterministic • Nowadays usually a so-called Mersenne Twister, with a period of 219937−1 iterations (≈4.3×106001)

– CSPRNGs are a similar process but with security considerations • /dev/random too; please always use /dev/urandom! https://www.2uo.de/myths-about-urandom/ • there is a huge difference between Random and SecureRandom – Java: 48 vs. 128 bit space + source of seed – Period of SecureRandom around 264 (2 exabits), but period is not really security relevant

Security 101 Image attribution: Randall Munroe https://xkcd.com/221/ What is entropy in this context?

– Primitive 3: CSPRNG (Cryptographically Secure Pseudo-Random Number Generator)

– Well… ± the real randomness in the system

– In current OSs there is an “entropy pool” • filled from different sources, mostly timings of input and other system events • bias needs to be pro-actively removed

– Problems with entropy in virtualized environments • there are workarounds for them (haveged, rng-tools, etc.) • if you need really good entropy (banking, gambling), you will anyways use an HSM

Security 101 Image attribution: Randall Munroe https://xkcd.com/221/ What is encryption?

 ✓

Security 101 What is encryption?

 ✓

Security 101 What is encryption?

 ✓

Security 101 What is encryption?

   ?

Some ciphers are “malleable” E.g., Caesar-cipher over ASCII with key = 3 Plaintext: TRANSFER $0000100.00 TO ACCOUNT #199 : WUDQVIHU ‘3333433133 WR DFFRXQW &4<< Altered: WUDQVIHU ‘4333333133 WR DFFRXQW &4<<

Security 101 What is encryption?

  ⚠

Some ciphers are “malleable” E.g., Caesar-cipher over ASCII with key = 3 Plaintext: TRANSFER $0000100.00 TO ACCOUNT #199 Ciphertext: WUDQVIHU ‘3333433133 WR DFFRXQW &4<< Altered: WUDQVIHU ‘4333333133 WR DFFRXQW &4<< Countering with: MAC or use a CCA2 secure cipher Note: Kerckhoffs's principle: the details of any implementation are always known to the public

Security 101 What is encryption?

  ⚠

Some ciphers are “malleable” E.g., Caesar-cipher over ASCII with key = 3 Plaintext: TRANSFER $0000100.00 TO ACCOUNT #199 Ciphertext: WUDQVIHU ‘3333433133 WR DFFRXQW &4<< Altered: WUDQVIHU ‘4333333133 WR DFFRXQW &4<< Countering with: MAC or use a CCA2 secure cipher → in practice use AES with HMAC Note: Kerckhoffs's principle: the details of any implementation are always known to the public

Security 101 The limits of symmetric encryption

– Well… it’s symmetric        

⇒ Key distribution and management quickly becomes a problem

• “The hotline between Moscow and Washington D.C., established in 1963 after the Cuban missile crisis, used teleprinters protected by a commercial one-time tape system. Each country prepared the keying tapes used to encode its messages and delivered them via their embassy in the other country. A unique advantage of the OTP in this case was that neither country had to reveal more sensitive encryption methods to the other.” https://en.wikipedia.org/wiki/One-time_pad#Historical_uses

– Quadratic number of keys needed (unless keys are shared)

needed for the keys for each pair of correspondents

Security 101 The idea behind asymmetric encryption

 

Security 101 The idea behind asymmetric encryption

 

Security 101 The idea behind asymmetric encryption

 

Security 101 The idea behind asymmetric encryption

  

Security 101 The idea behind asymmetric encryption

  

Security 101 The idea behind asymmetric encryption

  

Security 101 The idea behind asymmetric encryption

  

Security 101 The idea behind asymmetric encryption

  

Security 101 The idea behind asymmetric encryption

  

Security 101 The idea behind asymmetric encryption

  

Security 101 The idea behind asymmetric encryption

  

Security 101 The idea behind asymmetric encryption

  

Security 101 The idea behind asymmetric encryption

  

Security 101 Making asymmetric cryptography a reality

– Primitive 4: Public

– Thought to be impossible for a very long time

– We discussed the basic idea • Diffie–Hellman–Merkle is basically what we described with a slight twist (not recovering the original message, but creating a shared, secret message) – Is based on discrete math: A = (ga mod p)b mod p = (gb mod p)a mod p = B where p is prime, g is a primitive root module p in the multiplicative group of integers modulo p – public a is the secret of Alice, b is the secret of Bob

Security 101 Making asymmetric cryptography a reality

– Primitive 4: Public public-key exchange

– Thought to be impossible for a very long time

– We discussed the basic idea • Diffie–Hellman–Merkle is basically what we described with a slight twist (not recovering the original message, but creating a shared, secret message) – Is based on discrete math: A = (ga mod p)b mod p = (gb mod p)a mod p = B where p is prime, g is a primitive root module p in the multiplicative group of integers modulo p – public a is the secret of Alice, b is the secret of Bob

Security 101 Making asymmetric cryptography a reality

– Primitive 5: Public-key encryption    

Security 101 Making asymmetric cryptography a reality

– Primitive 5: Public-key encryption    

Security 101 Making asymmetric cryptography a reality

– Primitive 5: Public-key encryption    

Security 101 Making asymmetric cryptography a reality

– Primitive 5: Public-key encryption    

Security 101 Making asymmetric cryptography a reality

– Primitive 5: Public-key encryption    

Security 101 Making asymmetric cryptography a reality

– Primitive 5: Public-key encryption    

Security 101 Making asymmetric cryptography a reality

– Primitive 5: Public-key encryption    

Security 101 Making asymmetric cryptography a reality

– Primitive 5: Public-key encryption Some implementations

– RSA (Rivest–Shamir–Adleman)  • Assumption: – Cramer–Shoup   • Assumption: – ECC • Assumption: discrete logarithm over elliptic curves  – NTRUEncrypt • Assumption: lattice basis reduction

Security 101 Creating digital signatures

– Primitive 6: Public-key signatures    

Security 101 Creating digital signatures

– Primitive 6: Public-key signatures    

Security 101 Creating digital signatures

– Primitive 6: Public-key signatures    

Security 101 Creating digital signatures

– Primitive 6: Public-key signatures    

Security 101 Creating digital signatures

– Primitive 6: Public-key signatures    

Security 101 Creating digital signatures

– Primitive 6: Public-key signatures Some implementations  – DSA, ElGamal, Boneh–Lynn–Shacham • Assumption: discrete logarithm

– ECDSA, EdDSA   • Assumption: discrete logarithm on elliptic curves

– NTRUSign  • Assumption: lattice basis reduction

Security 101 A side-note about performance

– Public-key crypto is computationally expensive (and not just for attackers), when compared to symmetric crypto

Algorithm Throughput on “a modern CPU core”™ (single core of i7-8850H) MD5 800 MBps SHA-1 1.1 GBps SHA-2/256 525 MBps SHA-2/512 713 MBps AES128-CBC 133 MBps AES256-IGE 125 MBps RSA 2048 bit (Sign / Verify) 3.8 MBps ( 1875/s) 118 MBps (60652/s) DSA 2048 bit (Sign / Verify) 9 MBps ( 4501/s) 11 MBps ( 5252/s) ECDSA (secp160r1; Sign / Verify) 2 MBps (18884/s) 0.9 MBps ( 5779/s) ECDSA (nistp256; Sign / Verify) 7.5 MBps (30060/s) 3.5 MBps (14946/s)

Security 101 A side-note about performance

– Public-key crypto is computationally expensive (and not just for attackers), when compared to symmetric crypto

Algorithm Throughput on “a modern CPU core”™ (single core of i7-8850H) MD5 800 MBps SHA-1 1.1 GBps SHA-2/256 525 MBps SHA-2/512 713 MBps AES128-CBC 133 MBps AES256-IGE 125 MBps RSA 2048 bit (Sign / Verify) 3.8 MBps ( 1875/s) 118 MBps (60652/s) DSA 2048 bit (Sign / Verify) 9 MBps ( 4501/s) 11 MBps ( 5252/s) ECDSA (secp160r1; Sign / Verify) 2 MBps (18884/s) 0.9 MBps ( 5779/s) ECDSA (nistp256; Sign / Verify) 7.5 MBps (30060/s) 3.5 MBps (14946/s)

Have a look @ https://www.keylength.com/ for determining a proper key-size for the current year

Security 101 Putting it all together and creating a PKI

– Primitive 7: Public-key infrastructure

   🧞‍♀️

“Let’s buy for 10x!” “Ah you bought X!” (Impersonation) (Privacy violation)

Security 101 Putting it all together and creating a PKI

– Primitive 7: Public-key infrastructure

   🧞‍♀️

“I can change “I can reuse the keys” the keys” (Impersonation) (Man in the middle)

Security 101 Putting it all together and creating a PKI

– Primitive 7: Public-key infrastructure

   🤷‍♀️

“I can still change “What are you talking the public keys” about?” (Man in the middle)

Security 101 Putting it all together and creating a PKI

– Primitive 7: Public-key infrastructure

 

Security 101 Putting it all together and creating a PKI

– Primitive 7: Public-key infrastructure

 

Security 101 Putting it all together and creating a PKI

– Primitive 7: Public-key infrastructure

 

Security 101 Putting it all together and creating a PKI

– Primitive 7: Public-key infrastructure

 

Security 101 Putting it all together and creating a PKI

– Primitive 7: Public-key infrastructure

 

Security 101 Putting it all together and creating a PKI

– Primitive 7: Public-key infrastructure

   🤷‍♀️

“What happened?!” “What are you talking (As long as a PFS-cipher about?” is in use and CA is OK)

Security 101 Distributing the knowledge The range of “security people”

Security Laymen Developers Cryptographers Specialists

Security 101 The range of “security people”

Security Laymen Developers Cryptographers Specialists

Security 101 Pareto-Security

– Pareto-Secure: A definition of security using the theory of Pareto Efficiency • A work-in-progress paper by Ian Grigg • Vilfredo Pareto: Italian engineer, sociologist, economist, political scientist, and philosopher[Wikipedia] • You most probably know him for the 80/20 Principle – Pareto Principle • We will be talking about the Pareto Efficiency: – Pareto efficiency or Pareto optimality is a state of allocation of resources from which it is impossible to reallocate so as to make any one individual or preference criterion better off without making at least one individual or preference criterion worse off.[Wikipedia]

Security 101 Pareto-Security

Image attribution 1: Home Alone https://www.yahoo.com/entertainment/home-alone-thief-daniel-stern-responds-to-171255993.html Security 101 Image attribution 2: Ocean’s 11 https://www.moviefone.com/2016/12/05/oceans-11-george-clooney-facts/ Pareto-Security

Image attribution 1: Home Alone https://www.yahoo.com/entertainment/home-alone-thief-daniel-stern-responds-to-171255993.html Security 101 Image attribution 2: Ocean’s 11 https://www.moviefone.com/2016/12/05/oceans-11-george-clooney-facts/ Pareto-Security

Image attribution 1: Home Alone https://www.yahoo.com/entertainment/home-alone-thief-daniel-stern-responds-to-171255993.html Security 101 Image attribution 2: Ocean’s 11 https://www.moviefone.com/2016/12/05/oceans-11-george-clooney-facts/ Pareto-Security

Image attribution 1: Home Alone https://www.yahoo.com/entertainment/home-alone-thief-daniel-stern-responds-to-171255993.html Security 101 Image attribution 2: Ocean’s 11 https://www.moviefone.com/2016/12/05/oceans-11-george-clooney-facts/ Pareto-Security

Image attribution 1: Home Alone https://www.yahoo.com/entertainment/home-alone-thief-daniel-stern-responds-to-171255993.html Security 101 Image attribution 2: Ocean’s 11 https://www.moviefone.com/2016/12/05/oceans-11-george-clooney-facts/ Pareto-Security

Image attribution 1: Home Alone https://www.yahoo.com/entertainment/home-alone-thief-daniel-stern-responds-to-171255993.html Security 101 Image attribution 2: Ocean’s 11 https://www.moviefone.com/2016/12/05/oceans-11-george-clooney-facts/ Pareto-Security

Military, Intelligence, Banks, Casinos, etc.

2013 – Adobe 3M credit card records, 150M Username + PWD (38M “active”)

https://krebsonsecurity.com/2013/10/adobe-breach-impacted-at-least-38-million-users/

Security 101 Pareto-Security

Military, Intelligence, Banks, Casinos, etc.

2014 – Home Depot 56M (unique!) payment cards https://www.csoonline.com/article/2686192/data-protection/home-depot-confirms-breach-impacted-56-million-customers.html

Security 101 Pareto-Security

Military, Intelligence, Banks, Casinos, etc.

2011 – RSA Security SecureID tokens compromised; no further details https://www.csoonline.com/article/2127820/malware-cybercrime/the--hack-faq.html

Security 101 Pareto-Security

Military, Intelligence, Banks, Casinos, etc.

2010 – VeriSign ??? https://www.csoonline.com/article/2130847/data-protection/faq-about-the-verisign-data-breaches.html

Security 101 Pareto-Security

Military, Intelligence, Banks, Casinos, etc.

2015 – Anthem 80M SSN, DoB, etc. http://fortune.com/2017/01/09/anthem-cyber-attack-foreign-government/

Security 101 Pareto-Security

Military, Intelligence, Banks, Casinos, etc.

2015 – Anthem 80M SSN, DoB, etc. http://fortune.com/2017/01/09/anthem-cyber-attack-foreign-government/

Security 101 Pareto-Security

Military, Intelligence, Banks, Casinos, etc.

2012 – LinkedIn 6.5M Username + PWD https://lifehacker.com/5916177/65-million-linkedin-accounts-may-be-compromised-change-your-passwords-now

Security 101 Pareto-Security

Military, Intelligence, Banks, Casinos, etc.

2014 – Sony 40GB of various data https://www.buzzfeednews.com/article/tomgara/sony-hack

Security 101 Pareto-Security

Military, Intelligence, Banks, Casinos, etc.

2014 – Sony 40GB of various data https://www.buzzfeednews.com/article/tomgara/sony-hack

Security 101 Pareto-Security

Military, Intelligence, Banks, Casinos, etc.

Astonishing list on Wikipedia, although not at all complete: https://en.wikipedia.org/wiki/List_of_data_breaches (1 over 1B, 10 over 100M, 45 over 10M in a list of 261)

Security 101 Pareto-Security

Military, Intelligence, We did not Banks, even talk Casinos, about 2018: etc. Facebook, Google+, Astonishing list on Wikipedia, although not at all complete: Marriott, https://en.wikipedia.org/wiki/List_of_data_breaches Qoura, (1 over 1B, 10 over 100M, 45 over 10M in a list of 261) etc.

Security 101 Pareto-Security

You could be Military, Pareto-secure! Intelligence, We did not Banks, even talk Casinos, about 2018: etc. Facebook, Google+, Astonishing list on Wikipedia, although not at all complete: Marriott, https://en.wikipedia.org/wiki/List_of_data_breaches Qoura, (1 over 1B, 10 over 100M, 45 over 10M in a list of 261) etc.

Security 101 Basic countermeasures

– Protect your backups as well as your production • Often a DB dump is stolen in a “hit & grab”-style attack

– Minimize information storage • Good reason now: GDPR • Hard to balance with real-world requirements (customer analysis)

– Encrypt on multiple levels • Storage, Software, Communication (yes, even internal)

– Use state-of-the-art algorithms, nothing home-grown! • DO NOT IMPLEMENT YOUR OWN CRYPTO • NEVER, EVER

Security 101 Image attribution: Daniel Stori http://turnoff.us/geek/python-private-methods/ Basic countermeasures

– Protect your backups as well as your production • Often a DB dump is stolen in a “hit & grab”-style attack

– Minimize information storage • Good reason now: GDPR • Hard to balance with real-world requirements (customer analysis)

– Encrypt on multiple levels • Storage, Software, Communication (yes, even internal)

– Use state-of-the-art algorithms, nothing home-grown! • DO NOT IMPLEMENT YOUR OWN CRYPTO • NEVER, EVER

Security 101 Image attribution: Paul Ducklin https://nakedsecurity.sophos.com/2014/02/24/anatomy-of-a-goto-fail-apples-ssl-bug-explained-plus-an-unofficial-patch/ Basic countermeasures

– Protect your backups as well as your production • Often a DB dump is stolen in a “hit & grab”-style attack

– Minimize information storage • Good reason now: GDPR • Hard to balance with real-world requirements (customer analysis)

– Encrypt on multiple levels • Storage, Software, Communication (yes, even internal)

– Use state-of-the-art algorithms, nothing home-grown! • DO NOT IMPLEMENT YOUR OWN CRYPTO • NEVER, EVER

Security 101 Image attribution: Adam Langley https://github.com/golang/go/issues/20040 Authentication

– Storage: Use PDKF2, bcrypt, or scrypt; and salt the passwords

– Usage: • Push meaningful password policies in your company • Spread the word for family, friend, etc. what a good password is – What is a good password? • At least 12 characters long • Easy to remember • Syntactically and semantically incorrect phrase, best from multiple languages

Security 101 Image attribution: Randall Munroe https://xkcd.com/936/ Authentication

– What is a good password? • At least 12 characters long • Easy to remember • Syntactically and semantically incorrect phrase, best from multiple languages • Process: 1. Take a good line from a good song/book/etc. “One Ring to rule them all” 2. Random swap, which you can remember One rule ring to all them • Of course use variations: 3. Random swap cross-language • First letters of each word? One rule gyűrű to all sie • Replacing some spaces with 1,@,… 4. +1 random l33t and punctuation • Introduce random typos On3 rule gyűrű to all sie? • Etc. (use your imagination)

Security 101 Image attribution: Randall Munroe https://xkcd.com/936/ Authentication

– Business side: • Allow everything: ; ʬ; ʍ; ™;ドラゴンボール • Never, ever enforce maximum length (≤ 128) • Normalize, before hashing (or even transporting) • Please force meaningful complexity rules – On3 rule gyűrű to all sie? vs. On3rulegyűrűtoalsie?

Security 101 Source: https://eco.copyright.gov/eService_enu/start.swe?SWECmd=Start&SWEHo=eco.copyright.gov Authentication

– Business side: • Allow everything: ; ʬ; ʍ; ™;ドラゴンボール • Never, ever enforce maximum length (≤ 128) • Normalize, before hashing (or even transporting) • Please force meaningful complexity rules – On3 rule gyűrű to all sie? vs. On3rulegyűrűtoalsie?

Security 101 Source: https://www.copyright.gov/eco/help-password-userid.html#passwd Authentication

– Business side: • Allow everything: ; ʬ; ʍ; ™;ドラゴンボール • Never, ever enforce maximum length (≤ 128) • Normalize, before hashing (or even transporting) • Please force meaningful complexity rules – On3 rule gyűrű to all sie? vs. On3rulegyűrűtoalsie?

But: ✓

Security 101 Authentication

– Business side: • Allow everything: ; ʬ; ʍ; ™;ドラゴンボール • Never, ever enforce maximum length (≤ 128) • Normalize, before hashing (or even transporting) • Please force meaningful complexity rules – On3 rule gyűrű to all sie? vs. On3rulegyűrűtoalsie? • Don’t try to be smarter than the user – DO NOT disable right-click, copy-paste, etc. • Don’t offer “security questions” – A plain reset via e-mail / 2nd factor is more than enough • Don’t enforce password renewal – At least never more frequently than 1-year – The problem is the “cognitive entropy pool”: Everybody has a restricted amount of quotes 

Security 101 Image attribution: Daniel Stori http://turnoff.us/geek/welcome-to-hell/ Authentication

– Business side: • Allow everything: ; ʬ; ʍ; ™;ドラゴンボール • Never, ever enforce maximum length (≤ 128) • Normalize, before hashing (or even transporting) • Please force meaningful complexity rules – On3 rule gyűrű to all sie? vs. On3rulegyűrűtoalsie? • Don’t try to be smarter than the user – DO NOT disable right-click, copy-paste, etc. • Don’t offer “security questions” – A plain reset via e-mail / 2nd factor is more than enough • Don’t enforce password renewal – At least never more frequently than 1-year – The problem is the “cognitive entropy pool”: Everybody has a restricted amount of quotes 

Image attribution: ? Security 101 Authentication

– User side: • Teach the above described process • Promote the usage of password managers (KeePass, LastPass, OnePass, WhatEverTheNewestHypeIsPass) • Promote the usage of non-SMS 2nd Factors • Explain why good passwords are important • Explain why password-reuse is bad – There will always be somebody who doesn’t care and will store plain-text passwords • Explain that it’s for their own good

Security 101 Image attribution: Randall Munroe https://xkcd.com/538/ Encryption / Privacy

– Storage: • If laptop or smartphone is stolen and there are sensitive data on it • Explain what are the possible problems with cloud-backup – How Apple and Amazon security flaws led to my epic hacking by Mat Honan (2012) – of course these are fixed now

– Communication: • It’s not that you hide something • It’s that you don’t want everybody to know – You have curtains at your home, right? • It’s hard to teach vigilance (not trusting anything blindly) – (Spear) Phising and Scamming (Websites) are tough for professionals too

Security 101 Image attribution: Randall Munroe https://xkcd.com/1807/ Encryption / Privacy – Storage: • If laptop or smartphone is stolen and there are sensitive data on it • Explain what are the possible problems with cloud-backup – How Apple and Amazon security flaws led to my epic hacking by Mat Honan (2012) – of course these are fixed now

– Communication: • It’s not that you hide something • It’s that you don’t want everybody to know – You have curtains at your home, right? • It’s hard to teach vigilance (not trusting anything blindly) – (Spear) Phising and Scamming (Websites) are tough for professionals too – Business side: • There is absolutely NO REASON NOT TO USE TLS • Especially with CAs like https://letsencrypt.org/

Security 101 Image attribution: Daniel Stori http://turnoff.us/geek/we-need-to-talk-about-ssl/ The fear from quantum computing

Algorithm Is vulnerable by quantum computers? – Let’s reiterate MD5 No some algorithms SHA-1 No SHA-2/256 No – Successful experiments with SHA-2/512 No post-quantum algorithms AES128-CBC No – More than a hiccup, but AES256-IGE No definitely no Armageddon RSA 2048 bit (Sign / Verify) Yes DSA 2048 bit (Sign / Verify) Yes • If it would have been 10 years ago… different story ECDSA (secp160r1; Sign / Verify) Yes ECDSA (nistp256; Sign / Verify) Yes NTRUEncrypt / NTRUSign No (as far as we know)

Security 101 The fear from quantum computing

Algorithm Is vulnerable by quantum computers? – Let’s reiterate MD5 No some algorithms SHA-1 No SHA-2/256 No – Successful experiments with SHA-2/512 No post-quantum algorithms AES128-CBC No – More than a hiccup, but AES256-IGE No definitely no Armageddon RSA 2048 bit (Sign / Verify) Yes DSA 2048 bit (Sign / Verify) Yes • If it would have been 10 years ago… different story ECDSA (secp160r1; Sign / Verify) Yes ECDSA (nistp256; Sign / Verify) Yes NTRUEncrypt / NTRUSign No (as far as we know)

Security 101 The fear from quantum computing

Algorithm Is vulnerable by quantum computers? – Let’s reiterate MD5 No some algorithms SHA-1 No SHA-2/256 No – Successful experiments with SHA-2/512 No post-quantum algorithms AES128-CBC No – More than a hiccup, but AES256-IGE No definitely no Armageddon RSA 2048 bit (Sign / Verify) Yes DSA 2048 bit (Sign / Verify) Yes • If it would have been 10 years ago… different story ECDSA (secp160r1; Sign / Verify) Yes ECDSA (nistp256; Sign / Verify) Yes NTRUEncrypt / NTRUSign No (as far as we know)

Security 101 Take-aways

– If you don’t have an in-house security enthusiast/expert: get one

– Push for security and privacy • We are so far away from that what’s possible… but let’s take it step-by-step (transparent privacy-by-design systems; based on zero-knowledge proofs)

– Blockchain only with gloves • Although ELCA / SecuTix has a productive solution based on blockchains 

Security 101 Image attribution: Randall Munroe https://xkcd.com/2030/ Take-aways

Teach your circle, it’s our responsibility at the end of the day

public boolean storePassword(String userName, String password, etc.) { ... passToStore = password.hashCode(); ... }

Security 101 Image attribution: ?