The first half of the course will be about sym. enc. and the second half will be about public key enc.
The core of cryptography is about:
- establishing a secret key between two parties
| # factorization algorithm based on gcd | |
| # | |
| # could be vastly improved, this is barely better than | |
| # naive | |
| function fac(n::BigInt) | |
| factors = Dict{BigInt,BigInt}() | |
| while !isprime(n::BigInt) |
| int maxiter = 500; | |
| //float zoom = 0.005; | |
| //float fx = -0.745; | |
| //float fy = 0.1; | |
| float zoom = 4; | |
| float fx = 0; | |
| float fy = 0; |
| from sys import argv | |
| import re | |
| # open the file and get read to read data | |
| file = open(argv[1], "r"); | |
| p = re.compile("\d+"); | |
| # initialize the graph | |
| vertices, edges = map(int, p.findall(file.readline())) | |
| graph = [[0]*vertices for _ in range(vertices)] |
| from sys import argv | |
| import math | |
| N = int(argv[1]) | |
| S = set(); | |
| k = N | |
| for j in range(1,N+1): | |
| S.add(j) |
| var algorithms = require("algorithms"), | |
| fs = require("fs"); | |
| var dynamicLowMem = function(capacity, values, weights){ | |
| var max = function(x, y){ | |
| return x ^ ((x ^ y) & -(x < y)); | |
| } | |
| var items = values.length, | |
| value = 0, |
| using Winston | |
| x = Int[] | |
| y = Int[] | |
| for i = 2:20, j = 2:20 | |
| if (rem(i,j) != 0) && (rem(BigInt(i)^i,BigInt(j)^j) == 0) | |
| push!(x,i) | |
| push!(y,j) | |
| end |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <script> | |
| navigator.webkitGetUserMedia({audio:true}, function(s){ | |
| window.AudioContext = window.AudioContext || window.webkitAudioContext; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Gaussian Distributions</title> | |
| <script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
| <style> | |
| .chart div { | |
| background-color: steelblue; | |
| font: 10px sans-serif; | |
| border: 2px solid white; |