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
[remote "origin"] | |
url = git@github.com:randombit/foo.git | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
fetch = +refs/pull/*/head:refs/remotes/origin/pr/* |
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
/** | |
Minimization of https://github.com/randombit/botan/issues/3637 | |
*/ | |
#define CAUSE_CODEGEN_BUG | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <type_traits> | |
#include <cstring> |
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 <argon2.h> | |
#include <stdint.h> | |
#include <time.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
uint64_t timestamp() | |
{ | |
struct timespec ts; | |
if(::clock_gettime(CLOCK_MONOTONIC_RAW, &ts) == 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
via https://twitter.com/mjos_crypto/status/1219610073816801286 | |
Cloned https://github.com/daniel-thompson/pinebook-pro-debian-installer/ | |
Inserted a 32GB sdcard into the built-in slot. | |
./install-debian | |
Installs the a system there, reboot from sdcard. | |
Clone again, now do: | |
./install-debian CRYPT=y BLKDEV=/dev/mmcblk2 | |
Answer questions, done! | |
Supafresh Debian with LUKS on PineBook Pro. |
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
void apply_simple_seccomp_filter(const std::vector<std::string>& allowed_syscalls) | |
{ | |
//scmp_filter_ctx seccomp_ctx = ::seccomp_init(SCMP_ACT_ERRNO(EPERM)); | |
scmp_filter_ctx seccomp_ctx = ::seccomp_init(SCMP_ACT_TRAP); | |
if(seccomp_ctx == NULL) | |
throw std::runtime_error("seccomp_init failed"); | |
for(std::string syscall : allowed_syscalls) | |
{ | |
int syscall_num = ::seccomp_syscall_resolve_name(syscall.c_str()); |
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/python | |
import os | |
import binascii | |
keys = [ | |
'AUTH_KEY', | |
'SECURE_AUTH_KEY', | |
'LOGGED_IN_KEY', | |
'NONCE_KEY', |
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/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 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 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 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 |
NewerOlder