Figure out ciphers automatically

resolve #50