Skip to content

Instantly share code, notes, and snippets.

View atoponce's full-sized avatar
Crypto coffee

Aaron Toponce atoponce

Crypto coffee
View GitHub Profile

Paces running 10×3' intervals @ 5K-10K pace with 3' recovery between intervals on the same route.

Pace is min/km. Lower pace difference is better.

Interval 9/23 Pace 4/24 Pace Pace Diff
1 4:22 4:05 -0:17
2 4:20 3:59 -0:21
3 4:15 4:01 -0:14
4 4:16 3:53 -0:19
@atoponce
atoponce / trivium.js
Last active April 4, 2024 17:59
Trivium stream cipher with test vectors
"use strict"
/** Class representing the Trivium stream cipher. */
module.exports = class Trivium {
#state // Trivium 288-bit state.
#keystream // Trivium keystream.
/**
* Initialize Trivium with key and IV.
* @param {Uint8Array} key - An 8-bit array of 10 unsigned integers.
@atoponce
atoponce / k4.md
Created March 21, 2024 19:44
No, ChatGPT didn't solve Kryptos 4

So you think ChatGPT solved K4? You're not the only one. First, here's the K4 ciphertext and clues:

                           OBKR
UOXOGHULBSOLIFBBWFLRVQQPRNGKSSO
TWTQSJQSSEKZZWATJKLUDIAWINFBNYP
VTTMZFPKWGDKZXTJCDIGKUHUAUEKCAR

Jim Sandborn, the creator of the sculpture and puzzle has given us clues, revealing that characters:

@atoponce
atoponce / oi.js
Last active January 8, 2024 23:59 — forked from PaulCapestany/oi.js
Dan Kaminsky's DefCon RNG challenge
#!/usr/bin/env node
/**
* Forked from https://gist.github.com/PaulCapestany/6148566. Changes:
* - Beautified code
* - NodeJS-specific (will not work in the browser)
* - Scope variables with let and const keywords
* - 256-bit RNG
* - Remove von Neumann debiasing
* - Remove byte assembly

10,000 seconds RE:

Zone HR RE Ratio
1 80 15 0.0015
1 85 17 0.0017
1 90 19 0.0019
1 95 22 0.0022
1 100 24 0.0024
1 105 26 0.0026
@atoponce
atoponce / strava-hr-to-re.txt
Last active August 28, 2023 00:56
10,000 seconds of constant HR data with its resulting Strava Relative Effort score
First column is HR, second column is RE for 10,000 seconds at that HR.
Header is formula from the lowest HR to the max HR in that segment wihout the intermediate points.
There are 7 separate jumps.
8x/15-83/3
==========
80: 15
85: 17
90: 19
95: 22
@atoponce
atoponce / bibliography.md
Created August 22, 2023 04:42
Bibliography of running power chronologically ordered
test_name ntup OptiHash SHA-256 urandom
diehard_birthdays 0 🟥 🟢 🟢
diehard_operm5 0 🟥 🟥 🟥
diehard_rank_32x32 0 🟥 🟥 🟥
diehard_rank_6x8 0 🟥 🟥 🟥
diehard_bitstream 0 🟥 🟥 🟥
diehard_opso 0 🟥 🟥 🟥
diehard_oqso 0 🟥 🟥 🟥
diehard_dna 0 🟥 🟢 🟥
This file has been truncated, but you can view the full file.
0000: 96a296d224f285c67bee93c30f8a309157f0daa35dc5b87e410b78630a09cfc7
0001: b413f47d13ee2fe6c845b2ee141af81de858df4ec549a58b7970bb96645bc8d2
0002: fcf0a6c700dd13e274b6fba8deea8dd9b26e4eedde3495717cac8408c9c5177f
0003: 583c7dfb7b3055d99465544032a571e10a134b1b6f769422bbb71fd7fa167a5d
0004: 4f35212d12f9ad2036492c95f1fe79baf4ec7bd9bef3dffa7579f2293ff546a4
0005: 9f1afa4dc124cba73134e82ff50f17c8f7164257c79fed9a13f5943a6acb8e3d
0006: 40d88127d4d31a3891f41598eeed41174e5bc89b1eb9bbd66a8cbfc09956a3fd
0007: 2ecd8a6b7d2845546659ad4cf443533cf921b19dc81fa83934e83821b4dfdcb7
0008: b4c43b50bf245bd727623e3c775a8fcfb8d823d00b57dd65f7f79dd33f126315
0009: c87479cd656e7e3ad6bd8db402e8027df454b2b0c42ff29e093458beb98a23d4
#!/bin/bash
i=0
until [[ $i -eq 65536 ]]; do
printf "%04x: " "${i}"
printf "%04x" "${i}" | xxd -r -p | /tmp/c-optihash/c-optihash /dev/stdin
printf "\n"
((i=i+1))
done > /tmp/optihash-hashes.txt