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 sys | |
LIMB = 64 | |
mod = int(sys.argv[1]) if len(sys.argv) > 1 else 28948022309329048855892746252171976963363056481941560715954676764349967630337 | |
name = sys.argv[2] if len(sys.argv) > 2 else 'Fp' | |
bits = int(mod).bit_length() | |
limbs = (bits + LIMB - 1) // LIMB | |
size = limbs * LIMB |
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
processor : 15 | |
vendor_id : GenuineIntel | |
cpu family : 6 | |
model : 141 | |
model name : 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz | |
stepping : 1 | |
microcode : 0x34 | |
cpu MHz : 2300.000 | |
cache size : 24576 KB | |
physical id : 0 |
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
e = 128 | |
E.<X> = GF(2^e) # E = GF(2^e) | |
P.<Y> = PolynomialRing(E) # P = GF(2^e)[Y] | |
F = E.base_ring() # F = GF(2) | |
V = VectorSpace(F, e) # V = (GF(2))^e | |
# isomorphism \phi : E -> V | |
def to_vector(elem): | |
assert elem in E | |
coeff = map(F, '{:b}'.format(elem.integer_representation())[::-1]) |
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
#include <avr/io.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <util/delay.h> | |
#include "aes.h" | |
#define UART_BAUD 9600 |
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
#!/usr/bin/env python | |
import sys | |
from pwn import * | |
from base64 import urlsafe_b64decode, urlsafe_b64encode | |
from oracle import PaddingOracle | |
from hashpumpy import hashpump | |
import requests |
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 sys | |
ASCII = set( | |
map(chr, range(0x20, 0x7f)) + | |
['\t', '\n'] | |
) | |
def xor(*args): | |
if len(args) > 2: | |
xs, ys = args[0], xor(*args[1:]) |
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 sys | |
import random | |
EQ_CNT = 24 | |
RN_CNT = 10 | |
passwd = sys.argv[1] | |
rnd = lambda n: [random.randrange(0x1, 0x100) for _ in range(n)] | |
assert len(passwd) > 4 |
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
# setup & collect | |
from random import randrange | |
S = [ | |
0xC, 0x5, 0x6, 0xB, | |
0x9, 0x0, 0xA, 0xD, | |
0x3, 0xE, 0xF, 0x8, | |
0x4, 0x7, 0x1, 0x2 | |
] |
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
/* Copyright 2017 rot256 | |
* | |
* Permission is hereby granted, free of charge, | |
* to any person obtaining a copy of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
* | |
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
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
#!/usr/bin/env python2 | |
import os | |
import sys | |
import qrcode | |
''' | |
Converts a file to a pdf filled with QR codes. | |
Depends on: | |
- qrcode |
NewerOlder