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 / forking_lemma.rs
Last active June 13, 2026 16:16 — forked from rust-play/playground.rs
forking_lemma.rs
//! Generalizing Cryptographic Reductions and the Forking Lemma in Pure Rust.
//! This implementation relies strictly on the standard library.
use std::collections::HashMap;
use std::cell::RefCell;
// =========================================================================
// 1. Core Mathematical Abstractions (Prime Field & Mock Curve)
// =========================================================================
@RandyMcMillan
RandyMcMillan / byz_fee_engine.rs
Last active June 10, 2026 17:52 — forked from rust-play/playground.rs
byz_fee_engine.rs
use chrono::{DateTime, Duration, Utc, Timelike};
use std::sync::{Arc, Mutex};
use std::time::Duration as StdDuration;
// --- CONSTANTS ---
const SHA256_K: [u32; 64] = [
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
@RandyMcMillan
RandyMcMillan / jupiter_opposition.rs
Last active June 3, 2026 22:29 — forked from rust-play/playground.rs
jupiter_opposition.rs
// Required dependencies in Cargo.toml:
// [dependencies]
// chrono = "0.4"
use chrono::{TimeZone, Utc};
fn main() {
// Jupiter Opposition 2011-10-29 01:34:00 UTC
let datetime = Utc.with_ymd_and_hms(2011, 10, 29, 1, 34, 0).unwrap();
let unix_timestamp = datetime.timestamp();
@RandyMcMillan
RandyMcMillan / perfect_ip.rs
Last active May 31, 2026 19:32 — forked from rust-play/playground.rs
perfect_ip.rs
#[derive(Debug, Clone)]
struct Header {
seq_num: u32,
total_packets: u32,
}
#[derive(Debug, Clone)]
struct ProtocolSlice {
id: String,
header: Header,
@RandyMcMillan
RandyMcMillan / iso-A-series.rs
Last active May 31, 2026 17:30 — forked from rust-play/playground.rs
iso-A-series.rs
#[derive(Debug, Clone)]
struct Rect {
name: String,
x: f64,
y: f64,
width: f64,
height: f64,
}
fn subdivide_paper(rect: Rect, level: u32, max_level: u32) {
@RandyMcMillan
RandyMcMillan / UzumakiPoint.rs
Last active May 18, 2026 11:21 — forked from rust-play/playground.rs
UzumakiPoint.rs
#[allow(unused_imports)]
use std::f64::consts::PI;
/// Represents the output of the Uzumaki function F(n, t)
#[derive(Debug)]
pub struct UzumakiPoint {
pub radial_scale: f64,
pub oscillation: f64,
pub rotation: f64,
}
@RandyMcMillan
RandyMcMillan / HighlightStego.rs
Last active May 17, 2026 12:01 — forked from rust-play/playground.rs
HighlightStego.rs
use std::fs::File;
use std::io::Write;
/// Replicates the 'Highlight' steganography style.
/// Data is hidden in the filter coefficients rather than coordinates.
pub struct HighlightStego {
pub color: String, // #A112ED
}
impl HighlightStego {
@RandyMcMillan
RandyMcMillan / bft_clock_simple.rs
Last active May 11, 2026 17:35 — forked from rust-play/playground.rs
bft_clock_simple.rs
// p2p/src/time_sync.rs
// A verbose example of BFT-influenced time synchronization
// conceptually bridging Gnostr gossip and Bitcoin recalibration logic.
use std::time::{SystemTime, UNIX_EPOCH};
use std::collections::VecDeque;
#[derive(Debug)]
pub struct BFTClock {
local_offset: i64, // Offset in milliseconds from system clock
@RandyMcMillan
RandyMcMillan / svg_stego.rs
Last active May 9, 2026 00:01 — forked from rust-play/playground.rs
svg_stego.rs
use std::fs::File;
use std::io::{Read, Write};
use std::path::Path;
/// A sovereign SVG steganography tool using zero external dependencies.
pub struct SvgStego {
pub width: u32,
pub height: u32,
}
@RandyMcMillan
RandyMcMillan / std_stego.rs
Last active May 8, 2026 18:42 — forked from rust-play/playground.rs
std_stego.rs
use std::fs::File;
use std::io::{Read, Write, BufWriter, BufReader};
use std::path::Path;
pub struct StdStego {
pub pixels: Vec<u8>, // Raw RGB data
pub width: u32,
pub height: u32,
}