#GolfScript - 87#
GolfScript - 87
The cheat here is to build every rotation simultaneously. Since we need to loop over every ROT then every character, let's just loop over every character, slice the whole alphabet, then zip it up. From there proceed as expected: count the score for each ROT and choose the minimum.
Extra golfed:
{97- 26,{97+}%.+''+>}/]{27<}%zip:d{{"etaoinshrdlcumwfgypbvkjxqz"?}%{+}*}%.$0=?.26\-\d=
Only a little golfed:
# the alphabet, and by frequency
26,{97+}%.+''+:a;
"etaoinshrdlcumwfgypbvkjxqz":f;
# build evey ROT decryption
{97-a>}/]{27<}%zip:d
# calculate likelihood
{{f?}%{+}*}%.
# find min
$0=
# output rotation factor and decryption
?.26\-\d=