17
Final Presentation Maggie Mallernee, Zachary Silber, MichaelTong, Richard Zhang, Joshua Zweig

Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

FinalPresentationMaggieMallernee,ZacharySilber,MichaelTong,RichardZhang,JoshuaZweig

Page 2: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

OverviewWhatisC%(andhoweverdoyoupronounceit)?

Page 3: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

WhyC%?

CryptographyImplementationisHard

Goals

EncourageCorrectness

ImproveReadability

Extensibility

Easetheburdenoflargenumberarithmetic

Page 4: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

Overview

BasicsofC%�  CompilestoLLVM

�  C-likesyntaxandsemantics

�  Heapmemorymanagement:malloc()andfree()

�  Userinput:printf()andscanf()

TheBigStuff�  Cryptographictypes:Stones,Mints,EllipticCurves,andPoints

�  Painlessarbitraryprecisionarithmetic

�  Overloadedoperatorscoveringgroupoperationsofmodularintegersandpointsovercurves

Page 5: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

ProjectManagement51PRs,37Closed,282commits

Page 6: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

VersionControl

Page 7: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

TestingItworks!Thisishowweknow!

Page 8: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

ContinuousIntegration

�  Executeentiretestsuiteoneverypush/PR�  Providedetailedfeedback�  Enforcealltestspassing

Page 9: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

ArchitectureAjourneyfromsourcecodetosharedsecrets

Page 10: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

TheBigPicture

Preprocess•  #includestatements•  Buildguards

Scan

Parse

Verify •  Semanticchecking

GenerateLLVM

•  Linktoopensslbignum

•  Builtinfunctions•  Typespecificbehavior

Page 11: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

BigNumArithmetic

openssl/bn.h

(BIGNUM)

special_arith.c

codegen.ml

(stone)

Page 12: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

CompilerInterface

�  Optionsallowinguseraccesstoeachstepinthecompilationprocess

�  Canseethetokenizedprogram,AST,LLVM(sdtoutor.llfile),assembly(.s),andcompiletoafullexecutable

Page 13: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

WhatexactlydoesC%doforme?We’regladyouasked

Page 14: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

TheJist

�  It’slikeC!�  Syntax/Comments�  Expressions/Statements�  ControlFlow

�  KeyFeatures�  Pre-processing�  Input/Output�  Scoping�  Declarationflexibility�  Memorymanagement�  Operatoroverloading

Page 15: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

CryptographicTypes

�  Stones:Basisofallothercryptographictypes,linkstoOpenSSL/BN

� Mints:Integersinafinitefieldmodulosomeprimep

�  Curves:Ellipticcurves,comprisedoftwomints

�  Points:Pointsonacurve,withoperationsrelativetothatcurve

Page 16: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

CaesarCipher?Wehaveyoucovered

CryptographyLibrary

� Weprovidesomecoolexamples!�  CaesarCipher

�  SimpleshiftingusingMints�  StreamCipher

�  MintsandAccessmethodsprovideeasytrackingofrepeatedvaluesmodaconstantmoduliwithimprovedreadbility

�  DiffieHellman(ModularintegerandECC)�  Pointsimprovereadability�  NoconfusiononPointarithmetic

�  ElGamalEncryption�  ExtremelyintuitiveandclearwhenusingbuiltinCurvesandPoints

Page 17: Final Presentation - cs.columbia.edu€¦ · Final Presentation Maggie Mallernee, Zachary Silber, Michael Tong, Richard Zhang, Joshua Zweig

ECC:CvC%