Skip to content

Instantly share code, notes, and snippets.

View RandyMcMillan's full-sized avatar
🛰️
Those who know - do not speak of it.

@RandyMcMillan RandyMcMillan

🛰️
Those who know - do not speak of it.
View GitHub Profile
@RandyMcMillan
RandyMcMillan / tokio_read_write.rs
Last active August 12, 2025 11:53 — forked from rust-play/playground.rs
tokio_read_write.rs
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::TcpListener;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let listener = TcpListener::bind("127.0.0.1:8080").await?;
println!("Echo server listening on 127.0.0.1:8080");
loop {
let (mut socket, addr) = listener.accept().await?;
@RandyMcMillan
RandyMcMillan / nested_b_tree.rs
Created August 12, 2025 11:47 — forked from rust-play/playground.rs
nested_b_tree.rs
use std::collections::BTreeMap;
fn main() {
// Let's create a nested B-tree structure:
// A BTreeMap where keys are strings (e.g., "country")
// and values are another BTreeMap (e.g., "city" -> population).
let mut world_populations: BTreeMap<String, BTreeMap<String, u64>> = BTreeMap::new();
// Add some data for "USA"
let mut usa_cities = BTreeMap::new();
usa_cities.insert("New York".to_string(), 8_468_000);
@RandyMcMillan
RandyMcMillan / palindromes.rs
Last active July 29, 2025 16:57 — forked from rust-play/playground.rs
palindromes.rs
fn is_palindrome(n: u64) -> bool {
if n < 10 {
return true; // Single-digit numbers are palindromes
}
let s = n.to_string();
s == s.chars().rev().collect::<String>()
}
fn generate_palindromes_up_to(limit: u64) -> Vec<u64> {
let mut palindromes = Vec::new();
@RandyMcMillan
RandyMcMillan / tokio_echo_server.rs
Last active July 26, 2025 12:01 — forked from rust-play/playground.rs
tokio_echo_server.rs
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::TcpListener;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let listener = TcpListener::bind("127.0.0.1:8080").await?;
println!("Echo server listening on 127.0.0.1:8080");
loop {
let (mut socket, addr) = listener.accept().await?;
@RandyMcMillan
RandyMcMillan / rust_to_swift.md
Created July 17, 2025 12:48 — forked from surpher/rust_to_swift.md
Building binaries from Rust to iOS/macOS (PactSwift specific)
@RandyMcMillan
RandyMcMillan / bash_c_example.sh
Created July 16, 2025 20:03 — forked from 84adam/bash_c_example.sh
Bash-C Hello World: Compile and run a C program from a single Bash script
#!/bin/bash
# bash_c_example.sh
# Directory to store the C source file and the executable
EXAMPLES_DIR="$HOME/bash_c_examples"
# Ensure the directory exists, create it if not
mkdir -p "$EXAMPLES_DIR"
# Check if hello_world.c and hello_world executable already exist
@RandyMcMillan
RandyMcMillan / git_vfs.rs
Last active July 15, 2025 16:48 — forked from rust-play/playground.rs
git_vfs.rs
use std::collections::HashMap;
use std::io::{self, Read, Write};
#[derive(Debug, PartialEq)]
enum GitVfsError {
NotFound,
AlreadyExists,
InvalidOperation,
}
@RandyMcMillan
RandyMcMillan / git-clone-gists
Created July 12, 2025 19:00
git-clone-gists
#!/bin/bash
# --- Configuration ---
INSTALL_DIR="/usr/local/bin"
SCRIPT_NAME="git-clone-gists"
# --- Functions ---
# Function to display usage information
show_usage() {
@RandyMcMillan
RandyMcMillan / tokio_oneshot.rs
Last active July 12, 2025 14:28 — forked from rust-play/playground.rs
tokio_oneshot.rs
use tokio::sync::oneshot;
async fn some_computation() -> String {
"represents the result of the computation".to_string()
}
#[tokio::main]
async fn main() {
let (tx, rx) = oneshot::channel();
@RandyMcMillan
RandyMcMillan / ashigaru-vuln-review.md
Created July 12, 2025 02:23 — forked from 84adam/ashigaru-whirlpool-analysis.md
Review of Ashigaru Terminal: Fix for RSA Blinding Deanonymization Vulnerability

Whirlpool RSA Blinding Vulnerability Analysis - Ashigaru Terminal

Executive Summary

After conducting a thorough security analysis of the Ashigaru Terminal codebase, we can definitively conclude that Ashigaru Terminal HAS implemented a fix for the RSA blinding deanonymization vulnerability. The client now uses hardcoded RSA public keys and explicitly rejects any attempts by the coordinator to provide different keys to different clients, effectively preventing the potential deanonymization attack vector.

Background on the Vulnerability

The RSA blinding vulnerability in Whirlpool coinjoins centers around the blind signature mechanism used during the mixing process. In a properly implemented coinjoin system, all participants should use the same RSA public key for blinding their signatures. However, if a malicious coordinator could send different RSA public keys to different clients, it would be able to deanonymize users by correlating the blinded signatures with their unblinded counterparts during