Scoring functions for breaking cryptopals ciphers
The problem is to find a scoring function. A function which assigns a number to the likeliness of a message to be english. What I tried for the score computing function Most of them based on ‘ETAOIN SHRDLU’ (frequency analysis) Position based weighting (higher score is better) def scorecompute(msg): score = 0 positions = 'ETAOIN SHRDLU' for i in positions: weight = len(positions) - positions.find(i) score += msg.upper().count(i) * weight return score doesn’t work so well From this point on higher scores are worse....