final presentation - cs.columbia.edu sedwards/classes/2017/4115-spring/reports... · final...
Post on 30-Mar-2018
220 Views
Preview:
TRANSCRIPT
WhyC%?
CryptographyImplementationisHard
Goals
EncourageCorrectness
ImproveReadability
Extensibility
Easetheburdenoflargenumberarithmetic
Overview
BasicsofC%� CompilestoLLVM
� C-likesyntaxandsemantics
� Heapmemorymanagement:malloc()andfree()
� Userinput:printf()andscanf()
TheBigStuff� Cryptographictypes:Stones,Mints,EllipticCurves,andPoints
� Painlessarbitraryprecisionarithmetic
� Overloadedoperatorscoveringgroupoperationsofmodularintegersandpointsovercurves
ContinuousIntegration
� Executeentiretestsuiteoneverypush/PR� Providedetailedfeedback� Enforcealltestspassing
TheBigPicture
Preprocess• #includestatements• Buildguards
Scan
Parse
Verify • Semanticchecking
GenerateLLVM
• Linktoopensslbignum
• Builtinfunctions• Typespecificbehavior
CompilerInterface
� Optionsallowinguseraccesstoeachstepinthecompilationprocess
� Canseethetokenizedprogram,AST,LLVM(sdtoutor.llfile),assembly(.s),andcompiletoafullexecutable
TheJist
� It’slikeC!� Syntax/Comments� Expressions/Statements� ControlFlow
� KeyFeatures� Pre-processing� Input/Output� Scoping� Declarationflexibility� Memorymanagement� Operatoroverloading
CryptographicTypes
� Stones:Basisofallothercryptographictypes,linkstoOpenSSL/BN
� Mints:Integersinafinitefieldmodulosomeprimep
� Curves:Ellipticcurves,comprisedoftwomints
� Points:Pointsonacurve,withoperationsrelativetothatcurve
CaesarCipher?Wehaveyoucovered
CryptographyLibrary
� Weprovidesomecoolexamples!� CaesarCipher
� SimpleshiftingusingMints� StreamCipher
� MintsandAccessmethodsprovideeasytrackingofrepeatedvaluesmodaconstantmoduliwithimprovedreadbility
� DiffieHellman(ModularintegerandECC)� Pointsimprovereadability� NoconfusiononPointarithmetic
� ElGamalEncryption� ExtremelyintuitiveandclearwhenusingbuiltinCurvesandPoints
top related