For decades, Elizebeth Smith Friedman worked in near-total secrecy, cracking codes that shaped the outcome of two world wars.