Home > Uncategorized > Cryptanalysis with #ML.NET (#AI / #ML)

Cryptanalysis with #ML.NET (#AI / #ML)


Disclaimer: This approach works only when you have a limited-length plaintext, and plenty (millions) of examples of cyphertext / plaintext pairs. I achieved 90%+  accuracy with this approach, it’s not perfect, and requires several days of training (8 hours per character of plaintext)

So, imagine you have a database held in SQL server that holds a list of cyphertext and corresponding plaintext examples – even if you don’t even know the cypher used, you can still use ML.NET as a means of Cryptanalysis. Without knowing the cypher used, you can’t use brute-force as an approach.

What I did – I broke the cyphertext into individual columns – So one column represented one character of the cyphertext, and I did the same with the plaintext, breaking up the plaintext into one column per character.

Then I ran a classification model for 8 hours on 1 million rows of examples, using the ML.NET model builder, providing each column of the cyphertext as the input, and one column at a time of the plaintext as the label (output).

After 8 days, I had 8 different ML.NET models that could decode the cyphertext.

WITHOUT – even knowing what cypher was being used.


Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: