Breaking Codes with Genetic Algorithms
Imagine that you’ve been tasked with protecting the integrity of your firm’s data. One day, a hacker manages to get on your system and encrypts all of your data before demanding a ransom to decrypt it.
Luckily, the hacker decided to use a basic XOR cipher with what appears to be a 64-bit key. That means, if you’re able to determine the key, you’ll be able to easily apply the cipher in reverse to restore all of your data.
XOR ciphers are reversible ciphers that work by applying a bitwise XOR with a key on every character in a string. Unicode characters are represented with 16-bits. Given a key and a string, you can encrypt the string by applying an XOR of every character with your key. The following image ...
Get Genetic Algorithms in Elixir now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.