CS178: Introduction to Cryptography
Lecture 11
Rachel Lin
Last Class:
Diffie Hellman Key Agreement
El-Gamal Public Key Encryption
Today:
Signature Schemes
- The public key version of MAC
Digital Signatures
VK, SK
Kg
M, S = SignSK(M)
M
VK
M, S Bob
SK
CS178: Introduction to Cryptography
Lecture 12
Rachel Lin
Last Class:
Signature Schemes
- The public key version of MAC
Today:
Putting tools together for secure communication
Certificate Systems
Secure Communication
Goal: Client and server wants to
CS178: Introduction to Cryptography
Lecture 14
Rachel Lin
Last Class:
Knowledge
Knowledge-based notion of secure encryption
Zero-knowledge proof
Today:
Zero-Knowledge Proof
Zero-Knowledge protocols
Zero-Knowledge (ZK):
A message m contains zero-
CS178: Introduction to Cryptography
Lecture 15
Rachel Lin
Last Class:
Zero-Knowledge Proof
Toy Zero-Knowledge protocols
Simulation
Today:
Zero-Knowledge protocols for Graph 3-coloring
Zero Knowledge Proofs [GMR89]
P(x)
Prover
Paradoxical
V(x)
Veri
import math
def drawPolygon(myTurtle,sideLength,numSides):
turnAngle = 360 / numSides
for i in range(numSides):
myTurtle.forward(sideLength)
myTurtle.right(turnAngle)
import turtle
t = turtle.Turtle()
drawPolygon(t, 50, 5)
def archimedes(numsides):
pi = n
BOND VALUATION 4 249
m
Where K = Z K, is the present value of all redemption amounts for the
[:1
m
entire issue, and F = Z F, is the total redemption amount for the issue.
t=l
If the series of redemptions has a systematic form, such as a level amount
ever
140 > CHAPTER2
The most general case would also allow for varying rates of return
i],i2,.,z' and sinking fund rates j],j2,.,jn.
n
2.5 SUMMARY OF DEFINITIONS AND FORMULAS
Finite Geometric Series
1+x+x2 +-+xk =
(2.1)
Denition 2.1 Accumulated value of
MEASURING THE RATE OF RETURN ON AN INVESTMENT 4 289
5.4 DEFINITIONS AND FORMULAS
Denition 5.1 Internal Rate of Return
Suppose that a transaction has net cashows of amounts C 0,C1 ,.,C n at
times 0,1,.,n. The internal rate of return for the transaction i
CASHFLOW DURATION AND IMMUNIZATION 4 391
for some value of 0 between 0 and n. The value of 0 depends on the nature
of the interest rate shock. If the present value of asset and liability
cashows are matched, and the rst moment of their present values is
m
THE TERM STRUCTURE OF INTEREST RATES 4 345
(c)J Huston McCullach Fn Mar 12 MJS'JX 2004
4.0
3.5
3_0 .5. . . .
2.5.
2.0
1.5
1.0
0.5- -. - _ _
A
CL
8
o
o
.4
t:
O
0
V
E
E
1
L4
<1)
9.
.5
t:
a)
o
5
<1)
9.
05 " '-" 3' "' ' " '- ' " " _ForwardCurve
. Zero Cou
48 > CHAPTER 1
rates are usually quoted as those to be earned in the coming year. In order
to make a meaningful comparison of interest and ination, both rates
should refer to the same oneyear period. Thus it may be more appropriate
to use a projected rate
EQUITY AND FIXED INCOME INVESTMENTS 4 423
A mandatory convertible bond is a type of convertible bond that has a
required conversion or redemption feature. Either on or before a
contractual conversion date, the holder must convert the mandatory
convertible
Python, Part 1
CS 8: Introduction to Computer Science
Lecture #3
Ziad Matni
Dept. of Computer Science, UCSB
A Word About Registration for CS8
This class is currently FULL
The waitlist is CLOSED
4/11/17
Matni, CS16, Sp17
2
Lecture Outline
Numbers and Ar
An Introduction to
Computer Science
CS 8: Introduction to Computer Science
Lecture #2
Ziad Matni
Dept. of Computer Science, UCSB
A Word About Registration for CS8
FOR THOSE OF YOU NOT YET REGISTERED:
This class is currently FULL
If you are on the waitli
Strings in Python 1
Midterm#1 Exam Review
CS 8: Introduction to Computer Science
Lecture #6
Ziad Matni
Dept. of Computer Science, UCSB
Administrative
Turn in Homework #2 today
Homework #3 is assigned and due next Thursday
Lab #2 is due on Friday
Your
Finding Pi
CS 8: Introduction to Computer Science
Lecture #5
Ziad Matni
Dept. of Computer Science, UCSB
Administrative
This class is currently FULL
Sorry, no more adds L
Project #1
The syllabus shows this due today (its not)
Ill assign the 1st projec
Welcome to
Introduction to Computer Science
CS 8: Introduction to Computer Science
Lecture #1
Ziad Matni
Dept. of Computer Science, UCSB
A Word About Registration for CS8
FOR THOSE OF YOU NOT YET REGISTERED:
This class is currently FULL
If you are on th
Python, Part 2
CS 8: Introduction to Computer Science
Lecture #4
Ziad Matni
Dept. of Computer Science, UCSB
A Word About Registration for CS8
This class is currently FULL
The waitlist is CLOSED
4/13/17
Matni, CS16, Sp17
2
Lecture Outline
Numbers and Ar
Department of Computer Science, CoE, UCSB
CS 8 Solving Problems with Computers I
HOMEWORK 1
Print this form and write your answers on it.
SCORE: (out of 40)
Submit this homework (hardcopy) to class. DUE DATE is 04/13/17.
Name: _
Umail: [email protected]
Python, Part 2
Controlling the Flow of a Program
We present the algorithm/program with a conditional statement (if-then-else)
If-Else in Python
Syntax:
if conditional_statement :
statement 1
statement 2
else:
else-statement 1
else-statement 2
Conditional
Python, Part 1
Numbers are Objects to Python
Each object type has: data and related operations
2 basic number types and one derived type
Integers
Floating point numbers
Complex numbers: have two floating point parts, but operations are specific to comp
Department of Computer Science, CoE, UCSB
CS 8 Introduction to Computer Science
HOMEWORK 3
Print this form and write your answers on it.
SCORE: (out of 40)
Submit this homework (hardcopy) to class. DUE DATE is 04/27/17.
Name: _
Umail: [email protected]
Department of Computer Science, CoE, UCSB
CS 8 Introduction to Computer Science
HOMEWORK 2
Print this form and write your answers on it.
SCORE: (out of 40)
Submit this homework (hardcopy) to class. DUE DATE is 04/20/17.
Name: _
Umail: [email protected]
Lab
Department of Computer Science, CoE, UCSB
CS 8 Solving Problems with Computers I
HOMEWORK 00
Worth 50% of Lab00 score (50 total points - easiest points ever!)
Print this form, staple loose pages together, and write your answers on it (or just use t
An Introduction to Computer Science
Computer: A device that can be instructed to carry out an arbitrary set of arithmetic or logical
operations automatically
Algorithm: A step-by-step logical procedure to solve a problem
Abstraction: A mental model that r
>
>
>
>
>
a = 10
b = 20
c = 30
if a = b:
SyntaxError: invalid syntax
> if a = b:
print('ok')
else:
print('no')
no
> b = 10
> if a = b:
print('ok')
else:
print('no')
ok
> if (a = b):
print('ok')
else:
print('no')
ok
> if (a = b) and (c = 30) :
print('ok')
Finding
Ratio of a circles circumference to its diameter
= circumference / diameter for any circle
Irrational number: an infinite series of non-repeating digits (can never be represented exactly,
only approximated)
import math necessary to use math m
Strings in Python 1
Strings are sequences of characters
enclosed in quotes (' or in Python)
objects of a Python class named str: type(kitty) > <class 'str'>
Can assign names like any other type of objec
Lots of built-in functions work for string objects,