Program writes public and private keys to files