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
#!/usr/bin/python | |
import os | |
import binascii | |
keys = [ | |
'AUTH_KEY', | |
'SECURE_AUTH_KEY', | |
'LOGGED_IN_KEY', | |
'NONCE_KEY', |
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
#!/usr/bin/python | |
from fractions import gcd | |
import random | |
def lcm(a,b): | |
return (a*b)//gcd(a,b) | |
def egcd(a, b): | |
if a == 0: |
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
After installing, add: | |
Useful | |
-------- | |
vim | |
emacs-nox | |
net-tools | |
tmux | |
tcpdump | |
nmap |
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
P=1024 Q=160 | |
Seed=000000000000000000000000000000000000021 | |
-----BEGIN X9.42 DH PARAMETERS----- | |
MIIBHwKBgQCEoKuNbWMqbPuFOqSWKMGJyQ8VMSWLMtQ80wj0Is3RxrGpz0Bpshd7 | |
Q9EL7BVjwTi+bZe68bXwU8GsHNLq6qplevvfsmpeHaJn0vt/gHRjmWWB68phAuPe | |
+CcU9X4ESl8e869AkSq3rnCnpTHauBDMkOWvXiMRUNEE5QbPdNHlhQKBgQCBrdzE | |
HRHk662S9/WZnuZpAeZjQCZZug1DToG97W4Z9xOycttPZ50N5mC4+NOhmfV4t3a+ | |
1wTe7vuYdL8zHt/dcIx9ow/uriqlaFX2Hh/jTYeC8r0m1JDcBxKV21aE5QLqpCfu | |
Jr8h/76s55aY1m2OWaR1K//y54GWZ4sxoxgS8gIVANnk4S2TxAhgZKmIVOksz0sn | |
dNlL |
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
!/usr/bin/python | |
import json | |
import hashlib | |
import binascii | |
from pyasn1.codec.der.decoder import decode as der_decoder | |
from pyasn1.type.univ import Sequence | |
from pyasn1.type.univ import Integer | |
from pyasn1.type.namedtype import NamedTypes | |
from pyasn1.type.namedtype import NamedType |
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
#!/usr/bin/python | |
from math import log, pow, sqrt | |
import sys | |
# Estimate Miller-Rabin error probability based on bitsize (k) | |
# and number of MR tests (t) | |
# https://www.math.dartmouth.edu//~carlp/PDF/paper88.pdf |
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 <botan/fpe_fe1.h> | |
#include <assert.h> | |
#include <iostream> | |
using namespace Botan; | |
BigInt power(size_t g, size_t x) | |
{ | |
BigInt r = 1; | |
for(size_t i = 0; i != x; ++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
Pallier Cryptosystem | |
Voting protocols, systems, mixnets | |
Homomorphic encryption (ElGamal, mixnets, voting) | |
Sigma protocols | |
Zero Knowledge Proofs, Fiat-Shamir Transform | |
ID based signatures and encryption | |
SNARKs | |
Ring signatures, group signatures | |
Signcryption | |
Pairings, uses thereof |
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
/* | |
Compile time string switch | |
Requires C++14 constexpr | |
*/ | |
#include <cstdint> | |
#include <cstdio> | |
#if 0 | |
// C++14 version |
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
*** This is just my personal todo file for botan. It is not supposed | |
to make any sense to you. Some of these things may happen some day. | |
If something in here excites you feel free to take it on though. | |
The easy way to do a FIPS 140 validation is to not need to do a FIPS 140 validation. | |
FIPS just cares about the crypto impl, if we're just an 'application calling OpenSSL FIPS object' | |
that happens to implement TLS, all is well. This requires a special mode that enables | |
only OpenSSL's AES, SHA, RSA, ECDSA, RNG, etc and disable the builtins including our | |
HMAC_DRBG (instead AutoSeeded_RNG calls OpenSSL's FIPS RNG), plus probably 2-3 | |
exposed API functions for the application to control the OpenSSL self tests and etc. |