0
$\begingroup$

I am creating a Binary Neural Network that encrypts payloads and I would like to compare it to AES in quality, for example: With BNN you would need XX years to decrypt where with AES would take YY years. How can I do that??

Currently, I have two tests:

  • A graphic representation that shows how random the payload is, like the image below: enter image description here
  • The STS randomness test, which gives me the following numbers: enter image description here

Are there any other test(s) that I can perform to increase the confidence that the encrypted payload is comparable/best/worst than AES??

$\endgroup$
3
  • $\begingroup$ What are you trying to achieve? break the AES? Good luck with that. or trying to distinguish it? After 20 years, we strongly believe that AES is a PRP. Therefore, yo we don't expect you to distinguish it with a simple test especially those in NIST? See the passible attacks here $\endgroup$
    – kelalaka
    Nov 22 '20 at 10:57
  • $\begingroup$ The point of this research is to proof that BNN can be used to create cryptographic systems with high entropy, something Humans had taken decades to develop and analyze, with BNN you can make your own in few hours of training. I will check more about Pseudo Random Permutations and Functions. Really interesting link to possible attacks. $\endgroup$ Nov 22 '20 at 22:00
  • $\begingroup$ There are already working on AI attacks that all failed, AFAIK. Search this site. $\endgroup$
    – kelalaka
    Nov 22 '20 at 22:02
2
$\begingroup$

AES has been studied for many years by experts in the field, and the estimates on how long it would take to break are based on the best known public cryptanalysis. Your algorithm has likely not received any expert study, so any estimates would be meaningless.

Instead of trying to estimate how good the cipher is you could try to understand how the BNN works, what it does to the bits, whether it achieves good mixing, confusion and diffusion, and whether you can find an attack.

Also take note of Schneier's "law": "Any person can invent a security system so clever that he or she can't imagine a way of breaking it". If you don't find an attack, that doesn't mean it's secure.

Please also note, that the statistical randomness tests you perform can give you with some level of confidence an answer that something is broken, but they most definitely cannot tell you that something is secure. The problem with these tests is that they presume an adversary model - that is they take one specific adversary and state that the scheme is secure against this adversary. However, that does not rule out the existence of another adversary that breaks it. Additionally, these tests are statistical, so they will have the same flaws as any other empiric test.

In trying to find an attack you could also look at what other people have done in symmetric cryptography - the obvious ones would be methods like linear and differential cryptanalysis. But you could also look at what other's have looked into regarding neural networks for cryptography. One example here would be: https://arxiv.org/abs/1610.06918 .

I hope I could give you some pointers on what you could do next.

P.S.: Why is there a 1007% success chance at the bottom of the U2 column?

$\endgroup$
6
  • $\begingroup$ Thanks, this explanation is really helpful. As you mention, AES has been studied for many years, my expectation was that possibly there was a "generic" function that could reveal how strong any cryptography algorithm is. Regarding confusion and diffussion, I tried to use NCC values to train the BNN. Trying to find an attack, that is still "work in progress". I will check the paper. The 1007% was a typo, now updated to just 100% $\endgroup$ Nov 22 '20 at 21:46
  • $\begingroup$ @BiSUNAAlgorithm There isn't really a "generic" algorithm that evaluates how good cryptographic algorithms are. Such an algorithm could used to compare something like AES to a truly random function, and (depending on the promises of the generic algorithm) could be used to show that one-way functions exist, which is a large open problem within cryptography (and complexity theory, as it implies $P\neq NP$). $\endgroup$
    – Mark
    Nov 22 '20 at 23:10
  • $\begingroup$ @Mark, thanks for your response, I will keep that in mind when I have to defend the algorithm in front of a reviewer's panel. $\endgroup$ Nov 22 '20 at 23:24
  • 1
    $\begingroup$ @BiSUNAAlgorithm As others have mentioned, creating new cryptographic protocols typically involves more than just proposing some problem which looks random. You generally either reduce it to standard hypothetical hard problems (such as the RSA assumption), or demonstrate the failure of various known attacks (for example differential and linear cryptanalysis). You want to do this all while having the algorithm be as simple as possible, so you can appeal to it not having some "backdoor" that you hardcoded into it $\endgroup$
    – Mark
    Nov 22 '20 at 23:27
  • $\begingroup$ @BiSUNAAlgorithm this last step seems quite difficult to do for the algorithm you are proposing. All this means is that nobody would (or should) consider adopting it in any real context though (it could still be potentially interesting if your algorithm is hard to attack with differential/linear cryptanalysis though, especially if you did not train it to satisfy that property). $\endgroup$
    – Mark
    Nov 22 '20 at 23:29
3
$\begingroup$

What you are trying to do is fundamentally incompatible with cryptographic methods as would be described by this site. You are looking at an analog input, and analog output, and a lossy compression. Neural networks by definition have a stochastic behavior because the axon->dendrite interface is inherently unreliable.

There is a body of work in the encryption of analog signals with chaotic oscillators. I would personally not call it encryption because there is loss, but the brain or machine learning can figure out the output.

The basis of this is Chua's Circuit, and if you look dig around in libraries you can find how these different compression methods were handled in the 90s during the analog to digital channel transistion.

$\endgroup$
2
  • $\begingroup$ The type of BNN are stochastic at creation, but not at inference because it is not using floating point values / continuous activation functions. Instead it is using logic functions and discrete sequences, no translation in-between. Also, there is no loss in the payload, because everything that goes in - goes out exactly as expected. I will check those circuits, thanks. $\endgroup$ Nov 22 '20 at 21:52
  • $\begingroup$ @BiSUNAAlgorithm I guess you could do it that way. I'm not familiar with a non-stochastic neural network. I helped engineer this IC: smartech.gatech.edu/handle/1853/50143 The nice thing about binary is that if you ICs are working, the functions don't change. :) I think that your greatest challenge is that you would have a key optimized to the image (if I understand what you are doing), and that's something that can leak information. Again, I'm apparently not up on BNNs. $\endgroup$
    – b degnan
    Nov 23 '20 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.