Skip to content

Instantly share code, notes, and snippets.

View dbeinder's full-sized avatar

David Beinder dbeinder

  • Chronos Inc.
  • Europe
View GitHub Profile
@dbeinder
dbeinder / mbedtls-errors.txt
Created August 11, 2025 09:41 — forked from erikcorry/mbedtls-errors.txt
Mbed TLS error codes
High level error codes
0x1080 PEM - No PEM header or footer found
0x1100 PEM - PEM string is not as expected
0x1180 PEM - Failed to allocate memory
0x1200 PEM - RSA IV is not in hex-format
0x1280 PEM - Unsupported key encryption algorithm
0x1300 PEM - Private key password can't be empty
0x1380 PEM - Given private key password does not allow for correct decryption
0x1400 PEM - Unavailable feature, e.g. hashing/encryption combination
@dbeinder
dbeinder / Program.cs
Last active September 15, 2022 02:51
X509Chain platform differences, SslStreamCertificateContext test server
using System;
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
namespace X509Test
{
@dbeinder
dbeinder / sun8i_thermal.c
Created July 24, 2020 20:35
xunlong fixes a driver...
void __fastcall sun8i_ths_get_temp(int a1)
{
int v1;
int v2;
int *v3;
int *v4;
int v5;
int (__fastcall *v6)(_DWORD);
int v7;
int v8;
@dbeinder
dbeinder / Makefile
Last active April 11, 2020 00:28
H2/H3 secure call to control reset line of AR100
obj-m += ar100.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
@dbeinder
dbeinder / openssl_poc.py
Last active April 3, 2020 23:32
openssl enc hashcat poc
# install requirements: pip3 install pycryptodome hashlib
import sys, os
from binascii import unhexlify, hexlify
from hashlib import md5, sha256
from Crypto.Cipher import AES
# default setting, "openssl enc" pre v1.1.0
def kdf_aes256_md5(pwd, salt):
h1 = md5(pwd + salt).digest()