Skip to content

Instantly share code, notes, and snippets.

View rickmark's full-sized avatar
🔬
Decoding iOS Formats

Rick Mark rickmark

🔬
Decoding iOS Formats
View GitHub Profile
@rickmark
rickmark / gist:76d1e4df9ead3a776e15eddfa28ca891
Last active November 10, 2026 06:55
Three Residues of One Undisclosed Procedure in the SEC 2 Koblitz Curves
# Three Residues of One Undisclosed Procedure in the SEC 2 Koblitz Curves
Nov 9, 2026 - @Rick Mark
The four prime-field Koblitz curves in SEC 2 carry three regularities the standard never states. Every prime is ≡ 1 (mod 7), every b lies in {3, 5, 7}, and every generator is twice a point built from one shared 156-bit value. We treat all three as residues of a single undisclosed generation procedure.
secp160k1 is where the simplest reading fails twice. It uses the fifth workable prime where the other curves use the first, and it breaks the generator offset rule the other three follow. The prime skip and the shared generator value were noted before; the two prime rules and the offset test appear to be new.
## Background
@rickmark
rickmark / gist:1ecf3a17c79ad454790b85c82e252fd2
Created November 6, 2026 21:20
Microfiche Experts: Geographically Streamed Mixture-of-Experts for Region-Adaptive Autonomous Driving
@Rick Mark · Draft v0.1 · Nov 6, 2026
Abstract
We propose Microfiche Experts, an architecture in which the middle layers of a driving model are a spatial grid of expert modules that slides with the vehicle's position. Perception and general driving skill stay fixed, while a density-warped 16×16 window of regional experts, plus a one-tile fading border ring, crossfades as the vehicle moves, much like a microfiche reader moving a lens across a sheet.
Non-negotiable legal rules sit in separate, hard-switching constraint layers above and below the blended band, so they are never averaged away. We reuse constraint pressure, the strain between a model's learned expectations and observed behaviour, as a single signal for three jobs: per-tile drift hotspots that target retraining, a trigger for tile-scoped expiring weight deltas, and an entry condition for a simulation-trained emergency expert with hysteresis and quiescence-based handback.
This is a design paper. We describe the architecture, estimate its compute and
@rickmark
rickmark / constraint-pressure-draft-v2-2026-10-24.md
Created October 25, 2026 03:13
Constraint Pressure: What Grammar-Constrained Decoding Hides About Prompt Injection — working draft v2, 2026-10-24. Public timestamp of the draft and its SHA-256.

Constraint Pressure: What Grammar-Constrained Decoding Hides About Prompt Injection

Oct 24, 2026 · @Rick

Draft v2, restructured for publication

Abstract

Grammar-constrained decoding guarantees that an LLM classifier emits valid structured output, but it does so by discarding information: at every forced position, the model's own next-token distribution is replaced by a masked one. We show that this discarded distribution is a useful security signal. We define constraint pressure, the divergence between the raw and grammar-masked distributions summed over the output, and argue that it measures how hard the decoder is overriding what the model wanted to say. For a clean input and a well-exemplified format, pressure is near zero. For an input that successfully redirects the model, such as a prompt injection, the model wants to obey the injected instruction or break into prose, and the grammar hides this while pressure records it. The familiar practice of scoring a classifier by the log-probability o

Current local policy:
OS environment:
OS Type : macOS
OS Pairing Status : Not Paired
Local Policy Nonce Hash (lpnh): E390D6EA84FD57A37FD41F35EC4CA3CFD37BF1C9C27F03C8D3A566B5EC58A7A127EEC36777880217CB823C21853E867C
Remote Policy Nonce Hash (rpnh): A2A49BF4A25BFFD75E017FD270BE84CE2D34DC9D25AEC12246C329A9142B7F67E1F007C7EAFE69C553B9F4DE08715785
Recovery OS Policy Nonce Hash (ronh): ED7B8ED249EC4D99568959359B42868B47BA81CC2571EBDD554C56827C8D6AB29C6FF732C225F36C7C568309E33C357E
Local policy:
Pairing Integrity : Valid
This file has been truncated, but you can view the full file.
{
CaptureSourceInfo = {
BuildVersion = 22E252;
CommonSettings = {
10BitVideoHDRSupportedForProRes = 1;
AppleLogSupportedForProRes = 1;
BackgroundBlurSupported = 1;
BackgroundReplacementSupported = 1;
DCProcessorVersion = 1;
DepthDataDeliveryConfigurations = {
try {
(function() {
var exports = exports || {};
!function(t) {
exports.qs = t()
}(function() {
return function t(e, n, i) {
function r(a, s) {
if (!n[a]) {
if (!e[a]) {
@rickmark
rickmark / modules.txt
Created February 28, 2025 09:54
UI Recovery Tampered Modules
# Aliases extracted from modules themselves.
alias fs-squashfs squashfs
alias crypto-crc32c-generic crc32c_generic
alias crc32c-generic crc32c_generic
alias crypto-crc32c crc32c_generic
alias crc32c crc32c_generic
alias devname:loop-control loop
alias char-major-10-237 loop
alias block-major-7-* loop
alias md-level--1 linear
{
"interfaces": [
{
"identification": {
"id": "lo",
"type": "loopback"
},
"status": {
"enabled": true,
"mtu": 65536
#!/bin/sh
exec >> /tmp/syswrapper.log
exec 2>&1
echo "$(date) {$@}"
. /usr/bin/platdep_funcs.sh
. /usr/bin/state_lock_funcs.sh
. /usr/bin/unifi_util_funcs.sh
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd490]
[ 0.000000] Linux version 5.15.72-ui-cn10k (bdd@builder) (aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #5.15.72 SMP PREEMPT Tue Aug 20 15:24:52 CST 2024
[ 0.000000] Machine model: Marvell CN103XX board
[ 0.000000] earlycon: pl11 at MMIO 0x000087e028000000 (options '')
[ 0.000000] printk: bootconsole [pl11] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!
[ 0.000000] NUMA: NODE_DATA [mem 0x7faa7dd00-0x7faa7ffff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000004000000-0x00000000ffffffff]