Skip to content

Instantly share code, notes, and snippets.

ethan2-0

Block or report user

Report or block ethan2-0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ethan2-0
ethan2-0 / README.md
Created Sep 27, 2016
A Python script to generate permutations of the set of 32-bit strings
View README.md

This provides a 32-bit block cipher based on four 16-bit pseudorandom functions, precomputed based on the output of a stream cipher. To compute the F_j(i), the jth PRF evaluated at i, we take the two bytes starting at the (j * 2^16 + i) * 2th byte of the output of the stream cipher. (This particular implementation actually uses four distinct stream cipher output streams, and uses os.urandom() in place of a stream cipher, but you get the idea.) These four PRFs F_0, F_1, F_2, F_3 are used as the F-functions of a four-round Feistel network.

Usage

@ethan2-0
ethan2-0 / READMEmd
Created Sep 15, 2016
A 32-bit block cipher with a security reduction to a stream cipher
View READMEmd
This provides a 32-bit block cipher based on four 16-bit pseudorandom functions,
precomputed based on the output of a stream cipher. To compute the `F_j(i)`,
the `j`th PRF evaluated at `i`, we take the two bytes starting at the
`(j * 2^16 + i) * 2`th byte of the output of the stream cipher. (This particular
implementation actually uses four distinct stream cipher output streams, and
uses `os.urandom()` in place of a stream cipher, but you get the idea.) These
four PRFs `F_0`, `F_1`, `F_2`, `F_3` are used as the F-functions of a four-round
Feistel network.
# Usage
@ethan2-0
ethan2-0 / README.md
Last active Aug 19, 2016
A Python 3 libnetfilter_queue handler intended to mitigate CPU load covert channels based on ping timings
View README.md

Usage

To install the dependencies, run the script install_deps.sh as root.

To set up the filter, run setup_iptables.sh as root. You may need to change the queue-num parameter if you already have some NFQUEUE-based iptables rules.

To run the filter, run python3 main.py as root. If you used a queue number other than 0, you'll need to pass it as the first parameter to main.py.

@ethan2-0
ethan2-0 / energydietrankings.txt
Last active Apr 17, 2016
Energy Diet Challenge video rankings
View energydietrankings.txt
Generated Sun Apr 17 13:54:26 EDT 2016
1. (1275 votes) Room 11 Lumley
2. (1173 votes) Pulsifer Grade 4
3. (1162 votes) 6 Van den Eynden
4. (988 votes) GRADE 5 LAGO AZUL
5. (860 votes) Whitney Wolves
6. (690 votes) The Green Team
7. (686 votes) NDC 3/4
8. (660 votes) Suzuki Student Success
9. (648 votes) Gillis Green Team
View rc5DecryptionPseudocode.txt
for i = 2*n to 1:
l = l - K % 2^64
l = l >>> r
l = l xor r
(l, r) = (r, l)
@ethan2-0
ethan2-0 / rc5EncryptionPseudocode.txt
Last active Feb 26, 2016
RC5 Encryption Pseudocode
View rc5EncryptionPseudocode.txt
for i = 1 to 2*n:
l = l xor r
l = l <<< r
l = l + K[i] % 2^64
(l, r) = (r, l) # Swap l and r
View primes.java
import java.util.ArrayList;
// Stuff to remember:
// * ellipseMode -> can take CENTER to do what you expect
final int width = 600;
final int height = 600;
boolean[] primality;
final int scale = 5;
void setup() {
size(600, 600);
primality = sieve();
@ethan2-0
ethan2-0 / mandelbrot.py
Created Jul 22, 2015
Mandelbrot/Julia set in Processing/Python.
View mandelbrot.py
# IF YOU WANT A JULIA SET, SET isMandelbrot TO False.
# Copyright (c) 2015 Ethan White. Licensed under 3-clause BSD.
# Requires the Python mode for Processing.
import time
import math
# Fudge factors
startSize = (1000, 1000)
widthMultFudge = float(4)
heightMultFudge = float(4)
widthAddFudge = 10
You can’t perform that action at this time.