If you're used to solving cryptic puzzles, or deciphering texts using crypt-analytical cribs, it can be useful to know the relative frequency of letters in the distribution of words. Wordle has a built-in list of 5-letter words. That list isn't the same as all of the five letter words in the dictionary, or even only the common ones. Perfectly common words like 'tudor' are omitted. This gist contains a few useful tables that are worth familiarizing yourself with if you want to solve wordle puzzles logically.
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
extern crate sha2; | |
extern crate nix; | |
extern crate libc; | |
use sha2::{Sha256, Digest}; | |
use nix::request_code_write; | |
use std::os::unix::prelude::*; | |
use std::os::raw::c_int; | |
use std::fs::File; | |
use std::mem; |
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
import sys | |
# choose() is the same as computing the number of combinations. Normally this is | |
# equal to: | |
# | |
# factorial(N) / (factorial(m) * factorial(N - m)) | |
# | |
# but this is very slow to run and requires a deep stack (without tail | |
# recursion). | |
# |
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
import sys | |
def factorial(n): | |
if n == 0: | |
return 1 | |
else: | |
return n * factorial(n - 1) | |
def choose(n, m): | |
return factorial(n) / (factorial(m) * factorial(n - m)) |
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
diff --git a/tls/s2n_connection.c b/tls/s2n_connection.c | |
index 27a9c04..8a3f42e 100644 | |
--- a/tls/s2n_connection.c | |
+++ b/tls/s2n_connection.c | |
@@ -206,6 +206,7 @@ int s2n_connection_wipe(struct s2n_connection *conn) | |
conn->mode = mode; | |
conn->config = config; | |
conn->close_notify_queued = 0; | |
+ conn->current_user_data_consumed = 0; | |
conn->initial.cipher_suite = &s2n_null_cipher_suite; |
In TLS, at a high level there are two phases: a handshake phase where asymmetric cryptography is used by two ends (server and client) to agree on a shared key, and a second phase for data transmission where that shared key is used to encrypt/decrypt data. The first phase is generally more expensive than the second; it's computationally intense to agree on a key, and it takes several network round trips to do.
Problem statement
x! = (7!)! / 7! # solve for x
Solution
Let 7! be N. Re-express as
x! = N! / N
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 <openssl/rand.h> | |
void example() { | |
/* Initialize the random subsystem. generally called prior to chroot, may fail if /dev/urandom is not available. */ | |
RNG_init(); | |
/* alternatively, a more future-flexible OpenSSL init that calls RNG_init() internally. Similar to SSL_library_init, but more general. */ | |
OPENSSL_init(); | |
/* Instantiate an RNG */ |
I hereby claim:
- I am colmmacc on github.
- I am colmmacc (https://keybase.io/colmmacc) on keybase.
- I have a public key whose fingerprint is AD0A 9656 5D4A 027F CF43 AD31 843C 9675 D3C0 3962
To claim this, I am signing this object:
NewerOlder