SlideShare a Scribd company logo
Intro
◦ Roy Wasse
◦ Co Founder OpenValue
◦ Dutch JUG leader
◦ Love technochange
◦ Disclaimer: no heavy math
ΚΡΥΠΤΕΙ
ΓΡΑΦΩ
CAESAR CIPHER
◦ Invented by Leon Battista in 1467
◦ Uses multiple alphabets (polyalphabetic)
◦ Circumvents frequency analysis
A T T A C K A T D A W N
L E M O N L E M O N L E
L X F O P V E F R N H R
Vigenère cipher
Repetition is deadly
Playfair
◦ Key PLAYFAIR EXAMPLE
◦ Plaintext HI DE TH EG OL DI NT HE TR EX ES TU MP
◦ Ciphertext BM OD ZB XD NA BE KU DM UI XM MO UV IF
Image http://kerryb.github.io/enigmaa/
tps://hackaday.com/2016/04/29/centennial-birthday-of-claude-e-shannon-the-math-and-ee-
pioneer/
One time pad
◦ If and only if:
◦ Key length >= Source text
◦ Key is generated randomly
◦ Any key is used only once
◦ Only sender and receiver have key
One time function
Source T H I S I S S E C R E T
Position 20 8 9 19 9 19 19 5 3 18 5 20
KEY X V H E U W N O P G D L
+ 23 21 7 4 20 22 13 14 15 6 3 12
Result 43 29 16 23 29 41 32 19 18 24 8 32
Mod 26 17 3 16 23 3 15 6 19 18 24 8 6
Ciphertext R D Q X D P G T S Y 9 G
Disadvantages
One time pad
Works fine in some use
cases (pen & paper)
1 GB file requires 1 GB
random key
No access to true
random input
Key can only be used
once
Semantic
security
Shorter key
Pseudo random generator
Ciphers for varying message
length
Safe enough for vast amount of
computing power
Practical encryption !=
Mathematical safe
STREAM CIPHER
Middle Squares
method
◦ Take random input number (11)
◦ Square number (11 * 11 = 121)
◦ Select # middle chars (0121)
◦ add trailing zero if needed
◦ Square those (12 * 12 = 144)
◦ Repeat until key is long enough
ATTACK AT NOON
◦ Key needed consisting of 12 chars (spaces removed)
Sum Outcome Key Length PRG key
11 * 11 0121 12 2
12 * 12 0144 1214 4
14 * 14 0196 121419 6
19 * 19 0361 12141936 8
36 * 36 1296 1214193629 10
84 * 84 7056 121419362905 12
Position 1 2 3 4 5 6 7 8 9 10 11 12
Input A T T A C K A T N O O N
Key 1 2 1 4 1 9 3 6 2 9 0 5
Pseudo Random is hard
Nonce
◦ Cipher algorithm that uses a Nonce
next to a Seed
◦ Seed * Nonce => ~Cipher text
◦ Reuse key because s1*n0 != s1*n1
◦ IV = Initialization Vector, example of
Nonce
◦ * In WPA Nonce reuse was
predictable
C M V H
F R O M M O L L Y
Position 6 18 15 13 13 15 12 12 25
KEY X V H U W N O P G
+ 23 21 7 20 22 13 14 15 6
Result 29 39 22 33 35 28 26 27 31
Mod 26 3 13 22 7 9 2 0 1 5
Ciphertext C M V H J C A B X
F R O M A L I C E
Position 6 18 15 13 1 12 9 3 5
KEY D B J E L L M W A
+ 4 2 10 13 1 12 9 3 5
Result 10 20 25 26 2 24 18 6 10
Mod 26 10 20 25 0 2 24 18 6 10
Ciphertext K U Z A C Y S G K
C Y S G KK U Z A
J C A B X
HASHING
VERSUS
ENCRYPTION
Checksum
◦ Based on hash function
◦ Small change in input, totally different
output
◦ Sender embeds a checksum in
encrypted message
◦ Receiver checks if he can reproduce
the checksum
Block ciphers
Plaintext A B C D E F
Ciphertext F A B C D E
Ciphertext E F A C
Plaintext F A C E
Asymmetric encryption
Quantum computing
◦ Sohr‘s algorithm mid 90’s showed RSA is vulnerable
◦ ECC even more vulnerable
◦ To guess Private key in reasonable amount of time few thousand qubits needed
◦ Currently best Quantum computer has 20-50 qubits
◦ Supersingular Isogeny Diffie-Hellman is post-quantum secure
Mixing service & Onion Routing
◦ Implemented in TOR (The Onion Router)
◦ Alice want to send message to Bob’s forum anonymously
◦ Use proxy Carol ( A -> C -> B )
◦ Share a key with Carol and send cyphertext
◦ Use mixing service
Peeling the onion
◦ Use Multiple mixing services: David & Carol
◦ Encrypt message with key shared with David, then with key shared with Carol
◦ Carol doesn’t know she’s the entry point / Alice is a sender
Hash Timelocked
Contracts (HTLC)
◦ Used in Lightning Network
◦ Fast & cheap P2P payments
◦ Used in Atomic Swaps
◦ No need for exchange
◦ Both parties need to sign off
◦ If not, funds return to originator
Alice exchanges 1 BTC for 10 LTC with Bob
1. Create hash from key = BTC contract address
2. Deposit 1 BTC, require key and valid signature, with timelock
3. Send hash to Bob
1. Create same type of LTC contract address from hash
2. Deposit 10 LTC in contract
1. Collect LTC: Present valid signature to LTC contract and present key
2. Contract shares this key with Bob
1. Collect BTC: Present valid signature and
key to BTC contract
Commitment Scheme
◦ Alice & Bob going on a date, but which movie to pick?
◦ Coin flip can be manipulated
◦ Bob make a choice (bit commitment), send to Alice
◦ Coin is flipped, outcome is known to Alice & Bob
◦ Alice can now open envelope
Zero knowledge proof
CC BY 2.5, https://commons.wikimedia.org/w/index.php?curid=313648
◦Sender’s address
◦Amount of coins sent
◦Receiver’s address
Exploiting multiplication to hide
information and verify ownership
Credit: https://medium.com/beam-mw/mimblewimble-explained-like-youre-12-d779a5bb483d
Hiding transaction amounts
Proving that money in = out
Schnorr Signatures
◦ Bitcoin uses script which signs several tx inputs for a
single tx
◦ Signatures take up a lot of space.
◦ Schnorr allows aggregating signatures like:
◦ Input A = Sig 10000
◦ Input B= Sig 5000
◦ Just store 15000 (10000+5000)
◦ This enables scriptless transactions, taproot and
submarine swaps
Image: https://bitcoinmagazine.com/articles/scriptless-scripts-how-bitcoin-can-support-smart-contracts-without-smart-contracts/
Scriptless scripts
◦ Smart contracts without use of a script
◦ No one can see the smart contract
◦ In this year maybe implemented in
bitcoin
Unlock song with signature
Schnorr 8000
Schnorr 7000
Initiate transaction
Schnorr 1000
Zero knowledge proof
Calculate Song Schnorr 7000
Broadcast Schnorr 8000
Finish transaction
Recommended
Reading
Dan Boney & Victor Shoup, A Graduate Course in Applied Cryptography
(September 2017, v0.4). https://crypto.stanford.edu/~dabo/cryptobook/
Applications of Modern Cryptography Technologies, applications and
choices (SURFNet, 2010)
https://www.surf.nl/binaries/content/assets/surf/en/knowledgebase/2010/rap
port_201009_SNcryptoWEB.pdf
Decrypted secrets. Methods & Maixms of Cryptology byF.L Bauer. (2007).
Bitcoin magazine (November 2017)
https://bitcoinmagazine.com/articles/scriptless-scripts-how-bitcoin-can-
support-smart-contracts-without-smart-contracts/
https://medium.com/beam-mw/mimblewimble-explained-like-youre-12-
d779a5bb483d
BIP Scnorr https://github.com/sipa/bips/blob/bip-schnorr/bip-
schnorr.mediawiki
@roywasse for slides

More Related Content

What's hot

Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesDr.Florence Dayana
 
CISSP Week 18
CISSP Week 18CISSP Week 18
CISSP Week 18jemtallon
 
Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3Gene Leybzon
 
CNIT 141: 10. Digital Signatures
CNIT 141: 10. Digital SignaturesCNIT 141: 10. Digital Signatures
CNIT 141: 10. Digital SignaturesSam Bowne
 
Classic Information encryption techniques
Classic Information encryption techniquesClassic Information encryption techniques
Classic Information encryption techniquesJay Nagar
 
Substitution techniques
Substitution techniquesSubstitution techniques
Substitution techniquesvinitha96
 
Non-DIY* Logging
Non-DIY* LoggingNon-DIY* Logging
Non-DIY* LoggingESUG
 
A TLS Story
A TLS StoryA TLS Story
A TLS Storyereddick
 
Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2Mohamed Loey
 
5 stream ciphers
5 stream ciphers5 stream ciphers
5 stream ciphersHarish Sahu
 
Pure Aloha and Slotted Aloha
Pure Aloha and Slotted AlohaPure Aloha and Slotted Aloha
Pure Aloha and Slotted AlohaChun-Kang Luo
 
DevDay: CordaCoin A Permissionless Cryptocurrency on Corda, R3
DevDay: CordaCoin A Permissionless Cryptocurrency on Corda, R3DevDay: CordaCoin A Permissionless Cryptocurrency on Corda, R3
DevDay: CordaCoin A Permissionless Cryptocurrency on Corda, R3R3
 
Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Codemotion
 
Secret key cryptography
Secret key cryptographySecret key cryptography
Secret key cryptographyPrabhat Goel
 
Александр Зайцев - Port Knocking, short notes
Александр Зайцев - Port Knocking, short notes Александр Зайцев - Port Knocking, short notes
Александр Зайцев - Port Knocking, short notes Positive Hack Days
 
September Ethereum Berlin Workshop
September Ethereum Berlin WorkshopSeptember Ethereum Berlin Workshop
September Ethereum Berlin Workshopaeronbuchanan
 
CNIT 141: 11. Hash Functions
CNIT 141: 11. Hash FunctionsCNIT 141: 11. Hash Functions
CNIT 141: 11. Hash FunctionsSam Bowne
 
Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1Mohamed Loey
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesJanani S
 
Computer security
Computer security Computer security
Computer security Harry Potter
 

What's hot (20)

Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
CISSP Week 18
CISSP Week 18CISSP Week 18
CISSP Week 18
 
Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3
 
CNIT 141: 10. Digital Signatures
CNIT 141: 10. Digital SignaturesCNIT 141: 10. Digital Signatures
CNIT 141: 10. Digital Signatures
 
Classic Information encryption techniques
Classic Information encryption techniquesClassic Information encryption techniques
Classic Information encryption techniques
 
Substitution techniques
Substitution techniquesSubstitution techniques
Substitution techniques
 
Non-DIY* Logging
Non-DIY* LoggingNon-DIY* Logging
Non-DIY* Logging
 
A TLS Story
A TLS StoryA TLS Story
A TLS Story
 
Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2
 
5 stream ciphers
5 stream ciphers5 stream ciphers
5 stream ciphers
 
Pure Aloha and Slotted Aloha
Pure Aloha and Slotted AlohaPure Aloha and Slotted Aloha
Pure Aloha and Slotted Aloha
 
DevDay: CordaCoin A Permissionless Cryptocurrency on Corda, R3
DevDay: CordaCoin A Permissionless Cryptocurrency on Corda, R3DevDay: CordaCoin A Permissionless Cryptocurrency on Corda, R3
DevDay: CordaCoin A Permissionless Cryptocurrency on Corda, R3
 
Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...
 
Secret key cryptography
Secret key cryptographySecret key cryptography
Secret key cryptography
 
Александр Зайцев - Port Knocking, short notes
Александр Зайцев - Port Knocking, short notes Александр Зайцев - Port Knocking, short notes
Александр Зайцев - Port Knocking, short notes
 
September Ethereum Berlin Workshop
September Ethereum Berlin WorkshopSeptember Ethereum Berlin Workshop
September Ethereum Berlin Workshop
 
CNIT 141: 11. Hash Functions
CNIT 141: 11. Hash FunctionsCNIT 141: 11. Hash Functions
CNIT 141: 11. Hash Functions
 
Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Computer security
Computer security Computer security
Computer security
 

Similar to Cool crypto concepts JavaZone

4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers Sam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz «Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz 0xdec0de
 
Applied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphersApplied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphersVlad Garbuz
 
HifnCrypto101
HifnCrypto101HifnCrypto101
HifnCrypto101Jim Faith
 
Cryptography - Overview
Cryptography - OverviewCryptography - Overview
Cryptography - OverviewMohammed Adam
 
Random thoughts on IoT
Random thoughts on IoTRandom thoughts on IoT
Random thoughts on IoTMark Carney
 
overview of cryptographic techniques
overview of cryptographic techniquesoverview of cryptographic techniques
overview of cryptographic techniquesShubham Jain
 
Thotcon 2019 - When Strong Encryption Isn't
Thotcon 2019 - When Strong Encryption Isn'tThotcon 2019 - When Strong Encryption Isn't
Thotcon 2019 - When Strong Encryption Isn'tsifukurt
 
Sullivan randomness-infiltrate 2014
Sullivan randomness-infiltrate 2014Sullivan randomness-infiltrate 2014
Sullivan randomness-infiltrate 2014Cloudflare
 
ET4045-2-cryptography-2
ET4045-2-cryptography-2ET4045-2-cryptography-2
ET4045-2-cryptography-2Tutun Juhana
 

Similar to Cool crypto concepts JavaZone (20)

4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz «Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
 
Applied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphersApplied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphers
 
HifnCrypto101
HifnCrypto101HifnCrypto101
HifnCrypto101
 
Cryptography - Overview
Cryptography - OverviewCryptography - Overview
Cryptography - Overview
 
Random thoughts on IoT
Random thoughts on IoTRandom thoughts on IoT
Random thoughts on IoT
 
Intro to blockchain
Intro to blockchainIntro to blockchain
Intro to blockchain
 
overview of cryptographic techniques
overview of cryptographic techniquesoverview of cryptographic techniques
overview of cryptographic techniques
 
Thotcon 2019 - When Strong Encryption Isn't
Thotcon 2019 - When Strong Encryption Isn'tThotcon 2019 - When Strong Encryption Isn't
Thotcon 2019 - When Strong Encryption Isn't
 
Cryptography and Network security # Lecture 4
Cryptography and Network security # Lecture 4Cryptography and Network security # Lecture 4
Cryptography and Network security # Lecture 4
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Sullivan randomness-infiltrate 2014
Sullivan randomness-infiltrate 2014Sullivan randomness-infiltrate 2014
Sullivan randomness-infiltrate 2014
 
Cryptography - 101
Cryptography - 101Cryptography - 101
Cryptography - 101
 
Cryptography-101
Cryptography-101Cryptography-101
Cryptography-101
 
1 DES.pdf
1 DES.pdf1 DES.pdf
1 DES.pdf
 
ET4045-2-cryptography-2
ET4045-2-cryptography-2ET4045-2-cryptography-2
ET4045-2-cryptography-2
 

More from Roy Wasse

Definitive answer to developer productivity v1 .2 Devworld.pptx
Definitive answer to developer productivity v1 .2 Devworld.pptxDefinitive answer to developer productivity v1 .2 Devworld.pptx
Definitive answer to developer productivity v1 .2 Devworld.pptxRoy Wasse
 
How good of developer are you v1 .1 ASML.pptx
How good of developer are you v1 .1 ASML.pptxHow good of developer are you v1 .1 ASML.pptx
How good of developer are you v1 .1 ASML.pptxRoy Wasse
 
How good of developer are you v1.1 DevWorld.pdf
How good of developer are you v1.1 DevWorld.pdfHow good of developer are you v1.1 DevWorld.pdf
How good of developer are you v1.1 DevWorld.pdfRoy Wasse
 
How good of developer are you?
How good of developer are you?How good of developer are you?
How good of developer are you?Roy Wasse
 
Software development in the modern age
Software development in the modern ageSoftware development in the modern age
Software development in the modern ageRoy Wasse
 
Blockchain talk isense 30-5-2018
Blockchain talk isense 30-5-2018 Blockchain talk isense 30-5-2018
Blockchain talk isense 30-5-2018 Roy Wasse
 
Blockchain talk open value meetup 31-8-17
Blockchain talk open value meetup 31-8-17Blockchain talk open value meetup 31-8-17
Blockchain talk open value meetup 31-8-17Roy Wasse
 

More from Roy Wasse (7)

Definitive answer to developer productivity v1 .2 Devworld.pptx
Definitive answer to developer productivity v1 .2 Devworld.pptxDefinitive answer to developer productivity v1 .2 Devworld.pptx
Definitive answer to developer productivity v1 .2 Devworld.pptx
 
How good of developer are you v1 .1 ASML.pptx
How good of developer are you v1 .1 ASML.pptxHow good of developer are you v1 .1 ASML.pptx
How good of developer are you v1 .1 ASML.pptx
 
How good of developer are you v1.1 DevWorld.pdf
How good of developer are you v1.1 DevWorld.pdfHow good of developer are you v1.1 DevWorld.pdf
How good of developer are you v1.1 DevWorld.pdf
 
How good of developer are you?
How good of developer are you?How good of developer are you?
How good of developer are you?
 
Software development in the modern age
Software development in the modern ageSoftware development in the modern age
Software development in the modern age
 
Blockchain talk isense 30-5-2018
Blockchain talk isense 30-5-2018 Blockchain talk isense 30-5-2018
Blockchain talk isense 30-5-2018
 
Blockchain talk open value meetup 31-8-17
Blockchain talk open value meetup 31-8-17Blockchain talk open value meetup 31-8-17
Blockchain talk open value meetup 31-8-17
 

Recently uploaded

GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisNeo4j
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfkalichargn70th171
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...Alluxio, Inc.
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1KnowledgeSeed
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion Clinic
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesKrzysztofKkol1
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfOrtus Solutions, Corp
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAlluxio, Inc.
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAlluxio, Inc.
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILNatan Silnitsky
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfmbmh111980
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEJelle | Nordend
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfMeon Technology
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
 

Recently uploaded (20)

GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 

Cool crypto concepts JavaZone

  • 1.
  • 2. Intro ◦ Roy Wasse ◦ Co Founder OpenValue ◦ Dutch JUG leader ◦ Love technochange ◦ Disclaimer: no heavy math
  • 5.
  • 6.
  • 7. ◦ Invented by Leon Battista in 1467 ◦ Uses multiple alphabets (polyalphabetic) ◦ Circumvents frequency analysis A T T A C K A T D A W N L E M O N L E M O N L E L X F O P V E F R N H R Vigenère cipher
  • 9.
  • 10. Playfair ◦ Key PLAYFAIR EXAMPLE ◦ Plaintext HI DE TH EG OL DI NT HE TR EX ES TU MP ◦ Ciphertext BM OD ZB XD NA BE KU DM UI XM MO UV IF
  • 11.
  • 14. One time pad ◦ If and only if: ◦ Key length >= Source text ◦ Key is generated randomly ◦ Any key is used only once ◦ Only sender and receiver have key
  • 15. One time function Source T H I S I S S E C R E T Position 20 8 9 19 9 19 19 5 3 18 5 20 KEY X V H E U W N O P G D L + 23 21 7 4 20 22 13 14 15 6 3 12 Result 43 29 16 23 29 41 32 19 18 24 8 32 Mod 26 17 3 16 23 3 15 6 19 18 24 8 6 Ciphertext R D Q X D P G T S Y 9 G
  • 16.
  • 17. Disadvantages One time pad Works fine in some use cases (pen & paper) 1 GB file requires 1 GB random key No access to true random input Key can only be used once
  • 18. Semantic security Shorter key Pseudo random generator Ciphers for varying message length Safe enough for vast amount of computing power Practical encryption != Mathematical safe
  • 20. Middle Squares method ◦ Take random input number (11) ◦ Square number (11 * 11 = 121) ◦ Select # middle chars (0121) ◦ add trailing zero if needed ◦ Square those (12 * 12 = 144) ◦ Repeat until key is long enough
  • 21. ATTACK AT NOON ◦ Key needed consisting of 12 chars (spaces removed) Sum Outcome Key Length PRG key 11 * 11 0121 12 2 12 * 12 0144 1214 4 14 * 14 0196 121419 6 19 * 19 0361 12141936 8 36 * 36 1296 1214193629 10 84 * 84 7056 121419362905 12 Position 1 2 3 4 5 6 7 8 9 10 11 12 Input A T T A C K A T N O O N Key 1 2 1 4 1 9 3 6 2 9 0 5
  • 23. Nonce ◦ Cipher algorithm that uses a Nonce next to a Seed ◦ Seed * Nonce => ~Cipher text ◦ Reuse key because s1*n0 != s1*n1 ◦ IV = Initialization Vector, example of Nonce ◦ * In WPA Nonce reuse was predictable
  • 24. C M V H F R O M M O L L Y Position 6 18 15 13 13 15 12 12 25 KEY X V H U W N O P G + 23 21 7 20 22 13 14 15 6 Result 29 39 22 33 35 28 26 27 31 Mod 26 3 13 22 7 9 2 0 1 5 Ciphertext C M V H J C A B X F R O M A L I C E Position 6 18 15 13 1 12 9 3 5 KEY D B J E L L M W A + 4 2 10 13 1 12 9 3 5 Result 10 20 25 26 2 24 18 6 10 Mod 26 10 20 25 0 2 24 18 6 10 Ciphertext K U Z A C Y S G K C Y S G KK U Z A J C A B X
  • 26. Checksum ◦ Based on hash function ◦ Small change in input, totally different output ◦ Sender embeds a checksum in encrypted message ◦ Receiver checks if he can reproduce the checksum
  • 27. Block ciphers Plaintext A B C D E F Ciphertext F A B C D E Ciphertext E F A C Plaintext F A C E
  • 28.
  • 30.
  • 31. Quantum computing ◦ Sohr‘s algorithm mid 90’s showed RSA is vulnerable ◦ ECC even more vulnerable ◦ To guess Private key in reasonable amount of time few thousand qubits needed ◦ Currently best Quantum computer has 20-50 qubits ◦ Supersingular Isogeny Diffie-Hellman is post-quantum secure
  • 32.
  • 33. Mixing service & Onion Routing ◦ Implemented in TOR (The Onion Router) ◦ Alice want to send message to Bob’s forum anonymously ◦ Use proxy Carol ( A -> C -> B ) ◦ Share a key with Carol and send cyphertext ◦ Use mixing service
  • 34. Peeling the onion ◦ Use Multiple mixing services: David & Carol ◦ Encrypt message with key shared with David, then with key shared with Carol ◦ Carol doesn’t know she’s the entry point / Alice is a sender
  • 35. Hash Timelocked Contracts (HTLC) ◦ Used in Lightning Network ◦ Fast & cheap P2P payments ◦ Used in Atomic Swaps ◦ No need for exchange ◦ Both parties need to sign off ◦ If not, funds return to originator
  • 36. Alice exchanges 1 BTC for 10 LTC with Bob 1. Create hash from key = BTC contract address 2. Deposit 1 BTC, require key and valid signature, with timelock 3. Send hash to Bob 1. Create same type of LTC contract address from hash 2. Deposit 10 LTC in contract 1. Collect LTC: Present valid signature to LTC contract and present key 2. Contract shares this key with Bob 1. Collect BTC: Present valid signature and key to BTC contract
  • 37. Commitment Scheme ◦ Alice & Bob going on a date, but which movie to pick? ◦ Coin flip can be manipulated ◦ Bob make a choice (bit commitment), send to Alice ◦ Coin is flipped, outcome is known to Alice & Bob ◦ Alice can now open envelope
  • 38. Zero knowledge proof CC BY 2.5, https://commons.wikimedia.org/w/index.php?curid=313648
  • 39. ◦Sender’s address ◦Amount of coins sent ◦Receiver’s address
  • 40. Exploiting multiplication to hide information and verify ownership Credit: https://medium.com/beam-mw/mimblewimble-explained-like-youre-12-d779a5bb483d
  • 42. Proving that money in = out
  • 43. Schnorr Signatures ◦ Bitcoin uses script which signs several tx inputs for a single tx ◦ Signatures take up a lot of space. ◦ Schnorr allows aggregating signatures like: ◦ Input A = Sig 10000 ◦ Input B= Sig 5000 ◦ Just store 15000 (10000+5000) ◦ This enables scriptless transactions, taproot and submarine swaps Image: https://bitcoinmagazine.com/articles/scriptless-scripts-how-bitcoin-can-support-smart-contracts-without-smart-contracts/
  • 44. Scriptless scripts ◦ Smart contracts without use of a script ◦ No one can see the smart contract ◦ In this year maybe implemented in bitcoin
  • 45. Unlock song with signature Schnorr 8000 Schnorr 7000 Initiate transaction Schnorr 1000 Zero knowledge proof Calculate Song Schnorr 7000 Broadcast Schnorr 8000 Finish transaction
  • 46. Recommended Reading Dan Boney & Victor Shoup, A Graduate Course in Applied Cryptography (September 2017, v0.4). https://crypto.stanford.edu/~dabo/cryptobook/ Applications of Modern Cryptography Technologies, applications and choices (SURFNet, 2010) https://www.surf.nl/binaries/content/assets/surf/en/knowledgebase/2010/rap port_201009_SNcryptoWEB.pdf Decrypted secrets. Methods & Maixms of Cryptology byF.L Bauer. (2007). Bitcoin magazine (November 2017) https://bitcoinmagazine.com/articles/scriptless-scripts-how-bitcoin-can- support-smart-contracts-without-smart-contracts/ https://medium.com/beam-mw/mimblewimble-explained-like-youre-12- d779a5bb483d BIP Scnorr https://github.com/sipa/bips/blob/bip-schnorr/bip- schnorr.mediawiki @roywasse for slides