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.
This file contains 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 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(); |
This file contains 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
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 |
This file contains 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
for i = 2*n to 1: | |
l = l - K % 2^64 | |
l = l >>> r | |
l = l xor r | |
(l, r) = (r, l) |
This file contains 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
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 |
This file contains 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
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 |
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.
This file contains 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
# 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 |