This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
/* | |
A toy example of linear cryptnalaysis applying to a simple SPN cipher: y = f[f[f[x]^K1]^K2]^...]^Kn, where f is a composition of "S" and "P" selected freely. | |
*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Python implementation of Rivest's Time-lock Puzzles as described | |
here: http://people.csail.mit.edu/rivest/lcs35-puzzle-description.txt | |
''' | |
import time | |
def GenPuzzle(t, p, q): | |
n = p*q |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 2; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Python Implementation of Courtois Toy Cipher (CTC) | |
CTC is a toy cipher presented for sake of cryptanalysis using algebraic attacks in http://eprint.iacr.org/2006/168.pdf. | |
''' | |
def xorRoundKey(state,roundkey): | |
return state ^ roundkey | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def compare_dir_layout(dir1, dir2): | |
def _compare_dir_layout(dir1, dir2): | |
for (dirpath, dirnames, filenames) in os.walk(dir1): | |
for filename in filenames: | |
relative_path = dirpath.replace(dir1, "") | |
if os.path.exists( dir2 + relative_path + '\\' + filename) == False: | |
print relative_path, filename | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asdasd | |
zxczxcxzc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int* insertion_sort(int A[], int size){ | |
if (size<=0 || A == NULL) | |
return A; | |
int key; | |
for(int i=1; i<size; ++i){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
POC implementation of LBlock Cipher (http://eprint.iacr.org/2011/345.pdf) | |
Uncompatible with Test Vectors given in the paper | |
""" | |
s0 = [14, 9, 15, 0, 13, 4, 10, 11, 1, 2, 8, 3, 7, 6, 12, 5] | |
s1 = [4, 11, 14, 9, 15, 13, 0, 10, 7, 12, 5, 6, 2, 8, 1, 3] | |
s2 = [1, 14, 7, 12, 15, 13, 0, 6, 11, 5, 9, 3, 2, 4, 8, 10] | |
s3 = [7, 6, 8, 11, 0, 15, 3, 14, 9, 10, 12, 13, 5, 2, 4, 1] | |
s4 = [14, 5, 15, 0, 7, 2, 12, 13, 1, 8, 4, 9, 11, 10, 6, 3] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nltk.corpus import reuters | |
mylist = reuters.fileids() | |
f = open('myfile','w') | |
for text in mylist: | |
something = text + '\t' | |
for cat in reuters.categories(text): | |
something += cat + " " | |
something += '\t' + reuters.raw(text).replace('\n', '') + '\n' | |
#print something |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm make git-core -y | |
git clone https://github.com/pooler/cpuminer.git | |
cd cpuminer | |
./autogen.sh | |
./configure CFLAGS="-O3" | |
make | |
# start the miner | |
./minerd --url=your.minerpool.org --user=username --pass=password |