4
$\begingroup$

I have used AES CTR mode of operation. Each time a file is uploaded an encrypted file is obtained and the corresponding cipher is got – this is a mini project I have done.

I wanted to know so as to what methods I could use to

  1. validate the cipher to just prove that it is a valid cipher got by the actual encryption technique and not just the one generated by some random number generation method

  2. it would be better if I can get a tool that subjects cipher to attacks (brute force, letter frequency analysis) to just prove that the cipher is secure (for validation purpose).

I am aware of the NIST validation, but since this is a mini project, I wanted some simpler solution. Does anyone please have suggestions?

$\endgroup$
6
  • $\begingroup$ any suggestions? $\endgroup$
    – shreya
    Commented May 16, 2016 at 3:56
  • 2
    $\begingroup$ Re #2, such things don't really exist, because they are not useful against modern ciphers. Re #1, do you want to be able to tell that a ciphertext is from your method without having the key? Can't you simply add an identifier, like a magic number. $\endgroup$
    – otus
    Commented May 16, 2016 at 4:44
  • $\begingroup$ richkni.co.uk/php/crypta/vignere.php found this for other ciphers..is there a similar one for aes cipher? $\endgroup$
    – shreya
    Commented May 16, 2016 at 6:12
  • 1
    $\begingroup$ Unless you reject that AES CTR is practically fine, it's practically impossible to distinguish its output from other high-quality PRNGs. So, if on the one side you demand simplicity and on the other side you don't even accept the suggestion mentioned by otus, I am afraid that your desiderata are quite akin to eating a piece of cake and having it too. $\endgroup$ Commented May 16, 2016 at 10:24
  • 1
    $\begingroup$ What about appending signature or a MAC over the file? You could have less strict security requirements for the MAC key or the public key used to verify the MAC or signature. $\endgroup$
    – Maarten Bodewes
    Commented May 16, 2016 at 10:25

1 Answer 1

1
$\begingroup$

The entire premise of modern ciphers is that they're indistinguishable from random by a computationally-bound adversary. If you believe the assertion that a modern cipher is secure, then it follows that you believe you cannot reliably distinguish it from randomness.

If you share a secret key with your clients, what you can do is verify a MAC over the ciphertext to ensure that it was generated by a client who has the same secret key as you (which is a good idea regardless, and the basis behind AEAD modes like GCM).

Your second point doesn't make much sense in the context of modern ciphers. About the only thing you can do is subject ciphertexts to randomness tests, but those results aren't of much use without extremely large amounts of input (on the order of gigabytes).

It's unclear though what exactly you're hoping to gain with such tools.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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