SlideShare a Scribd company logo
Class 25:
Reversing
Reverse
    cs1120 Fall 2011
    David Evans
    21 October 2011
Reverse Engineering
               What you Want                                                   Design a Solution




                                                Forward (Normal) Engineering
  Understand how it works                                                      Some Artifact
Challenge     Response               Key stream

  RNG              +

                                         f(∙)


               +         +           48-bit LFSR                           Note: when the artifact
                ID                                                         you start with is
 Mutual authentication
           protocol
                             48-bit stream cipher                          natural, this is called
                                                    Reverse Engineering    “science”!
                                                                                                     2
Reversing Crypto Circuits




500x Magnification Microscope

                                Pictures from Karsten Nohl (UVa CpE PhD 2009)
                                                                                3
4 NAND: Y = !(A & B & C & D)




Chip Logic Layer

                                                  4
(Mostly) Automated Analysis




    Identify Logic Gates   Trace Wires Connecting Them


                                                         5
Challenge   Response           Key stream

  RNG            +

                                   f(∙)


             +          +      48-bit LFSR


              ID
Mutual authentication   48-bit stream cipher
        protocol
7
Plan
Review: list-reverse
(Forward and Reversing) mlist-reverse!
Forward and Reverse Lists (Doubly-Linked Lists)

           I still have unclaimed Exams! I will start
           charging exam storage fees Monday.
           Note: if you want to reverse engineering my storage fees
           protocol, you could try waiting later (but I don’t recommend it!)




                                                                               8
Reversing




            9
Analyzing list-reverse
(define (list-reverse p)
  (if (null? p) null
      (list-append (list-reverse (cdr p)) (list (car p)))))




                                                              10
Reversing
(define (list-reverse p)
  (if (null? p) null
      (list-append (list-reverse (cdr p)) (list (car p)))))

Running time is in (N2)
  where N is number of elements in p.
Number of new cons cells:
 for the list-appends: N-1 + N-2 + … + 1 = N2/ 2
 + for the (list (car p)): N
 memory use is in (N2)


                                                              11
mlist-reverse!
Define a mlist-reverse! that reverses the elements of a
mutable list. The output should be a mutable list with
the elements in the reverse order. The number of cons
cells it creates should not scale with the length of the
list. (The input list can be mutated arbitrarily!)




                                                           12
Revers!ing a List


m1:

        1        2   3




            revm1:
14
Close…but not quite
(define (mlist-reverse! p)
 (if (null? (mcdr p))             (define (mlist-reverse! p)
                                   (if (null? (mcdr p))
    p
                                      p
    ((lambda (rest)                   (let ((rest (mlist-reverse! (mcdr p))))
      (begin                            (set-mcdr! p null)
        (set-mcdr! p null)              (mlist-append! rest p)
        (mlist-append! rest p)          rest)))
        rest))
                                           > m1
     (mlist-reverse! (mcdr p)))))          {1 2 3 4}
                                             > (mlist-reverse! m1)
                                             {4 3 2 1}
                                             > m1
                                             {1}

                                                                                15
Charge
Next week:
 Finish mlist-reverse!
 Programming with Objects, Python


          I still have unclaimed Exams! I will start
          charging exam storage fees Monday. You
          can come to my office now to get yours.


                                                       16

More Related Content

What's hot

05211201 A D V A N C E D D A T A S T R U C T U R E S A N D A L G O R I...
05211201  A D V A N C E D  D A T A  S T R U C T U R E S   A N D   A L G O R I...05211201  A D V A N C E D  D A T A  S T R U C T U R E S   A N D   A L G O R I...
05211201 A D V A N C E D D A T A S T R U C T U R E S A N D A L G O R I...
guestd436758
 
Linuxconf 2011 parallel languages talk
Linuxconf 2011 parallel languages talkLinuxconf 2011 parallel languages talk
Linuxconf 2011 parallel languages talk
Lenz Gschwendtner
 
Garbage Collection
Garbage CollectionGarbage Collection
Garbage Collection
Eelco Visser
 
MSc Thesis Defense Presentation
MSc Thesis Defense PresentationMSc Thesis Defense Presentation
MSc Thesis Defense Presentation
Mostafa Elhoushi
 
Q4.11: Using GCC Auto-Vectorizer
Q4.11: Using GCC Auto-VectorizerQ4.11: Using GCC Auto-Vectorizer
Q4.11: Using GCC Auto-Vectorizer
Linaro
 
1st Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
1st  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...1st  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
1st Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
AMD Developer Central
 
Basic constructs ii
Basic constructs  iiBasic constructs  ii
Basic constructs ii
Manjitsing Valvi
 
Building Efficient and Highly Run-Time Adaptable Virtual Machines
Building Efficient and Highly Run-Time Adaptable Virtual MachinesBuilding Efficient and Highly Run-Time Adaptable Virtual Machines
Building Efficient and Highly Run-Time Adaptable Virtual Machines
Guido Chari
 
D vs OWKN Language at LLnagoya
D vs OWKN Language at LLnagoyaD vs OWKN Language at LLnagoya
D vs OWKN Language at LLnagoya
N Masahiro
 
6th Semester Electronic and Communication Engineering (2013-December) Questio...
6th Semester Electronic and Communication Engineering (2013-December) Questio...6th Semester Electronic and Communication Engineering (2013-December) Questio...
6th Semester Electronic and Communication Engineering (2013-December) Questio...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
1st Semester M Tech Computer Science and Engg (Dec-2013) Question Papers
1st Semester M Tech Computer Science and Engg  (Dec-2013) Question Papers 1st Semester M Tech Computer Science and Engg  (Dec-2013) Question Papers
1st Semester M Tech Computer Science and Engg (Dec-2013) Question Papers
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Integrating R with C++: Rcpp, RInside and RProtoBuf
Integrating R with C++: Rcpp, RInside and RProtoBufIntegrating R with C++: Rcpp, RInside and RProtoBuf
Integrating R with C++: Rcpp, RInside and RProtoBuf
Romain Francois
 
Transparent Latent GAN
Transparent Latent GANTransparent Latent GAN
Transparent Latent GAN
Dong Heon Cho
 
Extreme JavaScript Minification and Obfuscation
Extreme JavaScript Minification and ObfuscationExtreme JavaScript Minification and Obfuscation
Extreme JavaScript Minification and Obfuscation
Sergey Ilinsky
 
Data Structure Lecture 4
Data Structure Lecture 4Data Structure Lecture 4
Data Structure Lecture 4
Teksify
 
ClockSystem: Embedding Time in Smalltalk
ClockSystem: Embedding Time in SmalltalkClockSystem: Embedding Time in Smalltalk
ClockSystem: Embedding Time in Smalltalk
ESUG
 
Q4.11: NEON Intrinsics
Q4.11: NEON IntrinsicsQ4.11: NEON Intrinsics
Q4.11: NEON Intrinsics
Linaro
 
Block Cipher vs. Stream Cipher
Block Cipher vs. Stream CipherBlock Cipher vs. Stream Cipher
Block Cipher vs. Stream Cipher
Amirul Wiramuda
 
A petri-net
A petri-netA petri-net
A petri-net
Omar Al-Sabek
 

What's hot (20)

05211201 A D V A N C E D D A T A S T R U C T U R E S A N D A L G O R I...
05211201  A D V A N C E D  D A T A  S T R U C T U R E S   A N D   A L G O R I...05211201  A D V A N C E D  D A T A  S T R U C T U R E S   A N D   A L G O R I...
05211201 A D V A N C E D D A T A S T R U C T U R E S A N D A L G O R I...
 
Linuxconf 2011 parallel languages talk
Linuxconf 2011 parallel languages talkLinuxconf 2011 parallel languages talk
Linuxconf 2011 parallel languages talk
 
Garbage Collection
Garbage CollectionGarbage Collection
Garbage Collection
 
MSc Thesis Defense Presentation
MSc Thesis Defense PresentationMSc Thesis Defense Presentation
MSc Thesis Defense Presentation
 
Q4.11: Using GCC Auto-Vectorizer
Q4.11: Using GCC Auto-VectorizerQ4.11: Using GCC Auto-Vectorizer
Q4.11: Using GCC Auto-Vectorizer
 
1st Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
1st  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...1st  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
1st Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 
Basic constructs ii
Basic constructs  iiBasic constructs  ii
Basic constructs ii
 
Building Efficient and Highly Run-Time Adaptable Virtual Machines
Building Efficient and Highly Run-Time Adaptable Virtual MachinesBuilding Efficient and Highly Run-Time Adaptable Virtual Machines
Building Efficient and Highly Run-Time Adaptable Virtual Machines
 
D vs OWKN Language at LLnagoya
D vs OWKN Language at LLnagoyaD vs OWKN Language at LLnagoya
D vs OWKN Language at LLnagoya
 
6th Semester Electronic and Communication Engineering (2013-December) Questio...
6th Semester Electronic and Communication Engineering (2013-December) Questio...6th Semester Electronic and Communication Engineering (2013-December) Questio...
6th Semester Electronic and Communication Engineering (2013-December) Questio...
 
1st Semester M Tech Computer Science and Engg (Dec-2013) Question Papers
1st Semester M Tech Computer Science and Engg  (Dec-2013) Question Papers 1st Semester M Tech Computer Science and Engg  (Dec-2013) Question Papers
1st Semester M Tech Computer Science and Engg (Dec-2013) Question Papers
 
Integrating R with C++: Rcpp, RInside and RProtoBuf
Integrating R with C++: Rcpp, RInside and RProtoBufIntegrating R with C++: Rcpp, RInside and RProtoBuf
Integrating R with C++: Rcpp, RInside and RProtoBuf
 
Transparent Latent GAN
Transparent Latent GANTransparent Latent GAN
Transparent Latent GAN
 
Extreme JavaScript Minification and Obfuscation
Extreme JavaScript Minification and ObfuscationExtreme JavaScript Minification and Obfuscation
Extreme JavaScript Minification and Obfuscation
 
Data Structure Lecture 4
Data Structure Lecture 4Data Structure Lecture 4
Data Structure Lecture 4
 
ClockSystem: Embedding Time in Smalltalk
ClockSystem: Embedding Time in SmalltalkClockSystem: Embedding Time in Smalltalk
ClockSystem: Embedding Time in Smalltalk
 
Q4.11: NEON Intrinsics
Q4.11: NEON IntrinsicsQ4.11: NEON Intrinsics
Q4.11: NEON Intrinsics
 
Block Cipher vs. Stream Cipher
Block Cipher vs. Stream CipherBlock Cipher vs. Stream Cipher
Block Cipher vs. Stream Cipher
 
A petri-net
A petri-netA petri-net
A petri-net
 

Similar to Class 25: Reversing Reverse

Class 11: Deeper List Procedures
Class 11: Deeper List ProceduresClass 11: Deeper List Procedures
Class 11: Deeper List Procedures
David Evans
 
Computational Techniques for the Statistical Analysis of Big Data in R
Computational Techniques for the Statistical Analysis of Big Data in RComputational Techniques for the Statistical Analysis of Big Data in R
Computational Techniques for the Statistical Analysis of Big Data in R
herbps10
 
Data assimilation with OpenDA
Data assimilation with OpenDAData assimilation with OpenDA
Data assimilation with OpenDA
nilsvanvelzen
 
Class 7: Programming with Lists
Class 7: Programming with ListsClass 7: Programming with Lists
Class 7: Programming with Lists
David Evans
 
Class 28: Entropy
Class 28: EntropyClass 28: Entropy
Class 28: Entropy
David Evans
 
Large-scale computation without sacrificing expressiveness
Large-scale computation without sacrificing expressivenessLarge-scale computation without sacrificing expressiveness
Large-scale computation without sacrificing expressiveness
Sangjin Han
 
Intro to threp
Intro to threpIntro to threp
Intro to threp
Hong Wu
 
dynamic programming Rod cutting class
dynamic programming Rod cutting classdynamic programming Rod cutting class
dynamic programming Rod cutting class
giridaroori
 
Parallelising Dynamic Programming
Parallelising Dynamic ProgrammingParallelising Dynamic Programming
Parallelising Dynamic Programming
Raphael Reitzig
 
Statistical Machine Learning for Text Classification with scikit-learn and NLTK
Statistical Machine Learning for Text Classification with scikit-learn and NLTKStatistical Machine Learning for Text Classification with scikit-learn and NLTK
Statistical Machine Learning for Text Classification with scikit-learn and NLTK
Olivier Grisel
 
NoSQL Smackdown!
NoSQL Smackdown!NoSQL Smackdown!
NoSQL Smackdown!
Tim Berglund
 
zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...
zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...
zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...
Alex Pruden
 
Class 18: Measuring Cost
Class 18: Measuring CostClass 18: Measuring Cost
Class 18: Measuring Cost
David Evans
 
numdoc
numdocnumdoc
numdoc
webuploader
 
Tensorizing Neural Network
Tensorizing Neural NetworkTensorizing Neural Network
Tensorizing Neural Network
Ruochun Tzeng
 
Profiling and optimization
Profiling and optimizationProfiling and optimization
Profiling and optimization
g3_nittala
 
Class 24: Imperative Programming
Class 24: Imperative ProgrammingClass 24: Imperative Programming
Class 24: Imperative Programming
David Evans
 
Graphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks AgeGraphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks Age
Lorenzo Alberton
 
Anil Thomas - Object recognition
Anil Thomas - Object recognitionAnil Thomas - Object recognition
Anil Thomas - Object recognition
Intel Nervana
 
Arrays in database systems, the next frontier?
Arrays in database systems, the next frontier?Arrays in database systems, the next frontier?
Arrays in database systems, the next frontier?
PlanetData Network of Excellence
 

Similar to Class 25: Reversing Reverse (20)

Class 11: Deeper List Procedures
Class 11: Deeper List ProceduresClass 11: Deeper List Procedures
Class 11: Deeper List Procedures
 
Computational Techniques for the Statistical Analysis of Big Data in R
Computational Techniques for the Statistical Analysis of Big Data in RComputational Techniques for the Statistical Analysis of Big Data in R
Computational Techniques for the Statistical Analysis of Big Data in R
 
Data assimilation with OpenDA
Data assimilation with OpenDAData assimilation with OpenDA
Data assimilation with OpenDA
 
Class 7: Programming with Lists
Class 7: Programming with ListsClass 7: Programming with Lists
Class 7: Programming with Lists
 
Class 28: Entropy
Class 28: EntropyClass 28: Entropy
Class 28: Entropy
 
Large-scale computation without sacrificing expressiveness
Large-scale computation without sacrificing expressivenessLarge-scale computation without sacrificing expressiveness
Large-scale computation without sacrificing expressiveness
 
Intro to threp
Intro to threpIntro to threp
Intro to threp
 
dynamic programming Rod cutting class
dynamic programming Rod cutting classdynamic programming Rod cutting class
dynamic programming Rod cutting class
 
Parallelising Dynamic Programming
Parallelising Dynamic ProgrammingParallelising Dynamic Programming
Parallelising Dynamic Programming
 
Statistical Machine Learning for Text Classification with scikit-learn and NLTK
Statistical Machine Learning for Text Classification with scikit-learn and NLTKStatistical Machine Learning for Text Classification with scikit-learn and NLTK
Statistical Machine Learning for Text Classification with scikit-learn and NLTK
 
NoSQL Smackdown!
NoSQL Smackdown!NoSQL Smackdown!
NoSQL Smackdown!
 
zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...
zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...
zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...
 
Class 18: Measuring Cost
Class 18: Measuring CostClass 18: Measuring Cost
Class 18: Measuring Cost
 
numdoc
numdocnumdoc
numdoc
 
Tensorizing Neural Network
Tensorizing Neural NetworkTensorizing Neural Network
Tensorizing Neural Network
 
Profiling and optimization
Profiling and optimizationProfiling and optimization
Profiling and optimization
 
Class 24: Imperative Programming
Class 24: Imperative ProgrammingClass 24: Imperative Programming
Class 24: Imperative Programming
 
Graphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks AgeGraphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks Age
 
Anil Thomas - Object recognition
Anil Thomas - Object recognitionAnil Thomas - Object recognition
Anil Thomas - Object recognition
 
Arrays in database systems, the next frontier?
Arrays in database systems, the next frontier?Arrays in database systems, the next frontier?
Arrays in database systems, the next frontier?
 

More from David Evans

Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!
David Evans
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
David Evans
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero Knowledge
David Evans
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in Bitcoin
David Evans
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm Confirmations
David Evans
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting Transactions
David Evans
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in Paradise
David Evans
 
Bitcoin Script
Bitcoin ScriptBitcoin Script
Bitcoin Script
David Evans
 
Mining Economics
Mining EconomicsMining Economics
Mining Economics
David Evans
 
Mining
MiningMining
Mining
David Evans
 
The Blockchain
The BlockchainThe Blockchain
The Blockchain
David Evans
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More Paranoid
David Evans
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key Signatures
David Evans
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
David Evans
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?
David Evans
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the Masses
David Evans
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of Reserve
David Evans
 
Silk Road
Silk RoadSilk Road
Silk Road
David Evans
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!
David Evans
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, Permacoin
David Evans
 

More from David Evans (20)

Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero Knowledge
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in Bitcoin
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm Confirmations
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting Transactions
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in Paradise
 
Bitcoin Script
Bitcoin ScriptBitcoin Script
Bitcoin Script
 
Mining Economics
Mining EconomicsMining Economics
Mining Economics
 
Mining
MiningMining
Mining
 
The Blockchain
The BlockchainThe Blockchain
The Blockchain
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More Paranoid
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key Signatures
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the Masses
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of Reserve
 
Silk Road
Silk RoadSilk Road
Silk Road
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, Permacoin
 

Recently uploaded

Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 

Recently uploaded (20)

Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 

Class 25: Reversing Reverse

  • 1. Class 25: Reversing Reverse cs1120 Fall 2011 David Evans 21 October 2011
  • 2. Reverse Engineering What you Want Design a Solution Forward (Normal) Engineering Understand how it works Some Artifact Challenge Response Key stream RNG + f(∙) + + 48-bit LFSR Note: when the artifact ID you start with is Mutual authentication protocol 48-bit stream cipher natural, this is called Reverse Engineering “science”! 2
  • 3. Reversing Crypto Circuits 500x Magnification Microscope Pictures from Karsten Nohl (UVa CpE PhD 2009) 3
  • 4. 4 NAND: Y = !(A & B & C & D) Chip Logic Layer 4
  • 5. (Mostly) Automated Analysis Identify Logic Gates Trace Wires Connecting Them 5
  • 6. Challenge Response Key stream RNG + f(∙) + + 48-bit LFSR ID Mutual authentication 48-bit stream cipher protocol
  • 7. 7
  • 8. Plan Review: list-reverse (Forward and Reversing) mlist-reverse! Forward and Reverse Lists (Doubly-Linked Lists) I still have unclaimed Exams! I will start charging exam storage fees Monday. Note: if you want to reverse engineering my storage fees protocol, you could try waiting later (but I don’t recommend it!) 8
  • 10. Analyzing list-reverse (define (list-reverse p) (if (null? p) null (list-append (list-reverse (cdr p)) (list (car p))))) 10
  • 11. Reversing (define (list-reverse p) (if (null? p) null (list-append (list-reverse (cdr p)) (list (car p))))) Running time is in (N2) where N is number of elements in p. Number of new cons cells: for the list-appends: N-1 + N-2 + … + 1 = N2/ 2 + for the (list (car p)): N memory use is in (N2) 11
  • 12. mlist-reverse! Define a mlist-reverse! that reverses the elements of a mutable list. The output should be a mutable list with the elements in the reverse order. The number of cons cells it creates should not scale with the length of the list. (The input list can be mutated arbitrarily!) 12
  • 13. Revers!ing a List m1: 1 2 3 revm1:
  • 14. 14
  • 15. Close…but not quite (define (mlist-reverse! p) (if (null? (mcdr p)) (define (mlist-reverse! p) (if (null? (mcdr p)) p p ((lambda (rest) (let ((rest (mlist-reverse! (mcdr p)))) (begin (set-mcdr! p null) (set-mcdr! p null) (mlist-append! rest p) (mlist-append! rest p) rest))) rest)) > m1 (mlist-reverse! (mcdr p))))) {1 2 3 4} > (mlist-reverse! m1) {4 3 2 1} > m1 {1} 15
  • 16. Charge Next week: Finish mlist-reverse! Programming with Objects, Python I still have unclaimed Exams! I will start charging exam storage fees Monday. You can come to my office now to get yours. 16