final presentation - cs.columbia.edu sedwards/classes/2017/4115-spring/reports... · final...

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

Upload: phamtu

Post on 30-Mar-2018

220 views

Category:

Documents


6 download

TRANSCRIPT

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%