Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
FinalPresentationMaggieMallernee,ZacharySilber,MichaelTong,RichardZhang,JoshuaZweig
OverviewWhatisC%(andhoweverdoyoupronounceit)?
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
ProjectManagement51PRs,37Closed,282commits
VersionControl
TestingItworks!Thisishowweknow!
ContinuousIntegration
� Executeentiretestsuiteoneverypush/PR� Providedetailedfeedback� Enforcealltestspassing
ArchitectureAjourneyfromsourcecodetosharedsecrets
TheBigPicture
Preprocess• #includestatements• Buildguards
Scan
Parse
Verify • Semanticchecking
GenerateLLVM
• Linktoopensslbignum
• Builtinfunctions• Typespecificbehavior
BigNumArithmetic
openssl/bn.h
(BIGNUM)
special_arith.c
codegen.ml
(stone)
CompilerInterface
� Optionsallowinguseraccesstoeachstepinthecompilationprocess
� Canseethetokenizedprogram,AST,LLVM(sdtoutor.llfile),assembly(.s),andcompiletoafullexecutable
WhatexactlydoesC%doforme?We’regladyouasked
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
ECC:CvC%