This document discusses error-correcting codes that can be used to protect encoder and decoder circuitry in memory from soft errors. It introduces Euclidean Geometry Low-Density Parity-Check (EG-LDPC) codes that have fault-secure detector capabilities and can tolerate high bit or nanowire defect rates. Using some smaller EG-LDPC codes, the entire memory system failure-in-time rate can be kept at or below one for memory blocks of 10Mb or larger, with a memory density of 1011 bit/cm and 10nm nanowire pitch. Larger EG-LDPC codes can achieve even higher reliability and lower area overhead.