Here’s another function to help identify a specific cipher type, in this case Portax.
function Ptaxtest(S:string): integer; var i,hi, lo : integer; begin hi :=0; lo := 0; for i :=1 to Length(S) do begin if S[i] in ['w','j','m','b'] then hi := hi+1; if S[i] in ['r','s','y','z'] then lo := lo+1; end; if lo=0 then lo:=1; Ptaxtest := Round(20*hi/lo); end;
The letters w,j,m,b are more frequent in Portax ciphers because they tend to encipher the high-frequency plaintext letters on the same columns on the lower (sliding) part of the key slide. Similarly the second set of letters tend to be low-frequency. Computing the ratio of these two sets is a good indicator of a Portax.