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
@atoponce
atoponce / dice-tables.md
Created September 16, 2022 17:06
Generating secure passwords with 4-sided, 6-sided, 8-sided, and 10-sided dice.

4-sided dice

Either roll a 4-sided die thrice, or three 4-sided dice once. Each character provides exactly 6 bits security.

1st roll:        1        2        3        4
2nd roll:     1 2 3 4  1 2 3 4  1 2 3 4  1 2 3 4
------------------------------------------------
3rd roll: 1:  ! " # $  1 2 3 4  A B C D  q r s t
          2:  % & ' (  5 6 7 8  E F G H  u v w x
@atoponce
atoponce / readme.md
Last active January 24, 2023 04:01
Spreadsheet password and passphrase generators

Password and passphrase generators

The following code should work for Microsoft Excel and LibreOffice Calc spreadsheet software.

Password generator code

=CONCAT(CHAR(RANDBETWEEN(33,126)),CHAR(RANDBETWEEN(33,126)),CHAR(RANDBETWEEN(33,126)),CHAR(RANDBETWEEN(33,126)),CHAR(RANDBETWEEN(33,126)),CHAR(RANDBETWEEN(33,126)),CHAR(RANDBETWEEN(33,126)),CHAR(RANDBETWEEN(33,126)),CHAR(RANDBETWEEN(33,126)),CHAR(RANDBETWEEN(33,126)),CHAR(RANDBETWEEN(33,126)))

Passphrase generator code

//...
/*****************************************************************
** Skein block function constants (shared across Ref and Opt code)
******************************************************************/
enum
{
/* Skein_256 round rotation constants */
R_256_0_0=14, R_256_0_1=16,
R_256_1_0=52, R_256_1_1=57,
R_256_2_0=23, R_256_2_1=40,
<!doctype html>
<html lang='en'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<title>Randogram</title>
</head>
<body>
<canvas id='randogram' height='400' width='400' style='border:1px solid black;'></canvas>
<script>
const canvas = document.getElementById('randogram')
@atoponce
atoponce / readme.md
Last active May 26, 2022 01:59
Commandline password managers for Unix-like operating systems

Must be updated within the past two years (May 2020) to be on this list. Listed in alphabetical order:

  • 1Password CLI1 and CLI2
    • Written by the 1Password team.
    • Written in Go using the Cobra library.
    • CLI2 has new sub-command syntax that differs from CLI1.
    • JSON output is difficult to work with.
    • Requires 1Password account.
    • Proprietary software.
  • bw
@atoponce
atoponce / .gitignore
Last active April 11, 2022 04:05
Best Wordle guesses
wordle.txt
previous.txt

System

% sudo dmidecode -s processor-version
Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz

5.16.11

Uses SHA-1 as the entropy extractor.

WITH RDRAND

<!DOCTYPE html>
<html lang="en">
<head>
<title>Keystroke Analysis</title>
<meta charset="utf-8">
<style>
#intro {
font-size: large;
}
collect-entropy () {
zmodload zsh/mathfunc
local wordlist=($(grep -P '^[aoeuidhtns]{3,}$' /usr/share/dict/words))
local length=${#wordlist[@]}
local min=$(( 65536 % $length ))
local wordcount=$(( int(ceil(512/log2($length))) ))
local words=()
for ((i=1; i<=${wordcount}; i++ )) do
local rand=$(( 0x$(xxd -ps -l 2 /dev/urandom) ))
until [[ $rand -ge $min ]]
@atoponce
atoponce / vowels.bash
Created January 20, 2022 14:54
Candidate absurdle starting words
#!/bin/bash
results=()
words='/usr/share/dict/american-english-insane'
results+=($(grep -P '^(?=.*a.*)(?=.*e.*)(?=.*i.*)(?=.*o.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*e.*)(?=.*i.*)(?=.*u.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*e.*)(?=.*i.*)(?=.*y.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*e.*)(?=.*o.*)(?=.*u.*)[a-z]{5}$' "$words"))
results+=($(grep -P '^(?=.*a.*)(?=.*e.*)(?=.*o.*)(?=.*y.*)[a-z]{5}$' "$words"))