Skip to content

Instantly share code, notes, and snippets.

View numtel's full-sized avatar
🦓
Natural Ungulates Make Teeming Elephants Laugh

Sen Green numtel

🦓
Natural Ungulates Make Teeming Elephants Laugh
View GitHub Profile
@numtel
numtel / convert_webm.sh
Last active April 13, 2026 04:04
Gnome screencast conversions
#!/usr/bin/env bash
# Check if both arguments are provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 input.webm output.mp4"
exit 1
fi
INPUT_FILE="$1"
OUTPUT_FILE="$2"
@numtel
numtel / gemini-log-to-html.js
Created July 1, 2025 19:21
Convert gemini chat log json from ai studio into simple html
#!/usr/bin/env node
/**
* A Node.js script to convert Gemini chat log JSON from stdin to a clean HTML file on stdout.
*
* This script is designed to produce a readable HTML document without any external
* or embedded CSS, relying on semantic HTML tags like <fieldset>, <legend>,
* <details>, and <blockquote> for styling.
*
* Usage:
@numtel
numtel / shell.nix
Created July 1, 2025 15:48
mixxx nix-shell
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
## Development tools
nativeBuildInputs = [
cmake
pkg-config
kdePackages.wrapQtAppsHook
@numtel
numtel / shell.nix
Created June 30, 2025 15:41
tidal-dl-ng on nix
{ pkgs ? import <nixpkgs> {} }:
let
requests_2_32_4 = pkgs.python3Packages.requests.overridePythonAttrs (old: {
version = "2.32.4";
src = pkgs.python3Packages.fetchPypi {
inherit (old) pname;
version = "2.32.4";
sha256 = "sha256-J9AxZoLIopg00yZIIAJLYqNpQgg9Usry8UwFkTNtNCI=";
};

That is precisely the right question to ask, and it delves deep into the field of cryptanalysis.

The answer is: Yes, the security of Keccak degrades gradually as you reduce the number of rounds, and there is no single "magic number" of rounds that is suddenly secure. Security is a spectrum, not a binary switch.

The official Keccak permutation (Keccak-f[1600]) used in SHA-3 and Ethereum has 24 rounds. This number was not chosen arbitrarily. It was selected to provide a very large security margin against all known cryptanalytic attacks.

Let's break down what "security" means here and how it degrades.

The Landscape of Cryptanalytic Attacks

@numtel
numtel / load-from-sdk.sh
Created October 13, 2024 06:15
ZK Email SDK verify on Circuitscan
#!/bin/bash
# Set to any circuit on https://sdk.prove.email/
CIRCUIT="strobe/proof-of-price-2"
INSTANCE_SIZE=128
CHAIN=sepolia
CIRCUIT_DIR="${CIRCUIT//\//-}"
echo "Downloading $CIRCUIT to $CIRCUIT_DIR..."
@numtel
numtel / zkp2p-domain-marketplace_attestation.log
Created September 26, 2024 00:27
Attestation for ZKP2P Domain Marketplace MPC Phase 2 Trusted Setup ceremony
Hey, I'm numtel-518698 and I have contributed to the ZKP2P Domain Marketplace MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (zkp2p-namecheap-push)
Contributor # 5
Contribution Hash: fe6d741b 9695ffb7 c070d609 dc5320ef
1a7de2a9 82753ed4 de258870 ddcb77cd
839c441b a85de980 135b18d6 a3e06c72
e6762b58 0f0486f8 a5f8729a 74516a26
@numtel
numtel / example.sh
Created June 24, 2024 21:42
S3 bucket with Cloudfront and a lambda for uploads with basic auth
# Invoke using a command like this:
curl -X POST "https://klho5x33jfupy46mmaeayx5lbi0ywrdm.lambda-url.us-west-2.on.aws/" \
-H "Content-Type: application/json" \
-d '{
"file": "Rk9PQkFSMjAwMAo=",
"filename": "foo.txt",
"secret": "foobar2000"
}'
@numtel
numtel / anon-aadhaar-v2-trusted-setup-ceremony_attestation.log
Created June 19, 2024 06:16
Attestation for Anon Aadhaar V2 Trusted Setup Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm numtel-518698 and I have contributed to the Anon Aadhaar V2 Trusted Setup Ceremony.
The following are my contribution signatures:
Circuit # 1 (aadhaarverifier)
Contributor # 102
Contribution Hash: 4d46af46 4a095dec 254925d9 3db536b5
d6463150 3ff5802e 257564f1 487be3f1
77fe3466 44fae549 5ce4b907 87c597fd
33a97e06 92bb48fe 1adaaa91 70e9b83f
@numtel
numtel / index.js
Created December 22, 2023 08:30
Shamir's secret sharing using node.js
const crypto = require('crypto');
// All by chatgpt4 except this shim line below
global.window = {};
const secrets = require('secrets.js');
// Function to generate RSA key pair
function generateKeyPair() {
return crypto.generateKeyPairSync('rsa', {
modulusLength: 2048,
publicKeyEncoding: { type: 'spki', format: 'pem' },