COMPSCI 92L Lecture Notes - Lecture 7: App Inventor For Android, Pseudorandom Number Generator, Modular Arithmetic

16 views1 pages
11 May 2016
Professor
COMPSCI 92L
Astrachan
Spring 2016
3-2-16
Lecture 7: Abstraction and Encryption
Whitfield Diffie and Martin Hellman designed an unbreakable encryption code for the
Enigma (WWII machine), but Alan Turing broke it eventually
Apple’s password encryption algorithm makes it harder to break into someone’s phone
with the wrong password because you have to wait longer with each wrong submission
Apple v FBI case: Apple, the plaintiff, won a major court victory against the FBI by
refusing to create a backdoor to decrypt the San Bernadino shooter’s iPhone
HTTPS: secure hypertext transfer protocol
Caesar cipher: use single number to encrypt/decrypt a number
The number is the number of lexographic letters off you transfer each time. One
message only has one key.
Diffie-Hellman one-way function: easy in one direction, hard in reverse direction
Ex. of x1’s private color, x2’s private color, when both colors are mixed, you get
mixed color
Easy to mix colors
Hard to go back from mixed color to separate private colors
https://www.youtube.com/watch?v=3QnD2c4Xovk
Bob picks secret color, so does Alice
Bob #008000, Alice #FF00FF Both mix with secret
Bob: #001A57 + #008000= #009A57
Alice: #001A57 + #FF00FF= #FF1B56
Bob sends to Alice and vice versa
Bob computes #FF1B56 + #008000 = #FF9B56
Alice computes #009A57+ #FF00FF = #FF9B56
Pseudo Random Number Generator (PRNG) - uses a seed to choose a random number
from a previously generated list
Applications in casino gaming slot machines: computer chip in these slot
machines is set to a designated “tightness” level (ie 93% return on average). All
actions on these slot machines depends on the PRNG on the computer chip.
The odds of winning jackpot are constant, as are the tightness levels between
slot machines. Slot machines are rarely adjusted to make the return level
different.
I Love Candy app:
Every texting phone number added to the list gets an Index
App Inventor 2 PRNG generates a random index
The index is used to pull the corresponding phone number from the list
Clock arithmetic - used to better approximate randomness
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 1 pages and 3 million more documents.

Already have an account? Log in

Get OneClass Notes+

Unlimited access to class notes and textbook notes.

YearlyBest Value
75% OFF
$8 USD/m
Monthly
$30 USD/m
You will be charged $96 USD upfront and auto renewed at the end of each cycle. You may cancel anytime under Payment Settings. For more information, see our Terms and Privacy.
Payments are encrypted using 256-bit SSL. Powered by Stripe.