3 Replies Latest reply on Nov 18, 2009 3:41 PM by Aland

    AESEncryptDecrypt sample won't decrypt

    chrisgregg

      I'm testing out the OpenCL sample programs, and I can't get the AESEncryptDecrypt code to decrypt the sample .bmp file (lena512.bmp).  It seems to encrypt it (at least the bmp looks like random 1-bit noise), but when I try to decrypt it, using the command line:

      $ ./AESEncryptDecrypt -d -i output.bmp -o unencryptedOutput.bmp

      I get another 1-bit random noise .bmp back.  What am I missing?  Thanks!

       

      -Chris

       

        • AESEncryptDecrypt sample won't decrypt
          Aland

          Have same problem. Tested both on CPU and GPU - decryption fails, although when using '-e' key it reports 'Passed!'. I've compared results with my own implementation of AES - encryption is right, while decryption is not.

          Although, it runs quite slow - with CUDA i got 256MiB of data encrypted&decrypted in ~7 seconds (on Tesla C1060), while sample from SDK needs ~9 seconds (on GPU) to encrypt only 64MiB (it doesn't process larger files). Just wondering, is this trouble of OpenCL (because it's still beta) or hardware unsuitability for such algorithms?

          (Windows 7 32bit, Firestream 9270, Stream SDK 2.0 beta4)

            • AESEncryptDecrypt sample won't decrypt
              omkaranathan

              Thanks for reporting. The issue has been informed to our developers and they are looking into it.

                • AESEncryptDecrypt sample won't decrypt
                  Aland

                  When i've changed one string in kernel (see code attached), encryption/decryption became correct on nVidia GPUs (nForce v195.89, Tesla c1060 and 280gtx) (although i've tested your kernel separately from whole application, using it for processing just random bytes - i had changed just the part responsible for loading data to be processed, not changing anything directly related to OpenCL), and it was always ok on CPU (with ATI's OpenCL, 2 * amd opteron 2435) . However, it fails on Firestream (even sample, when run with -e option, reports 'Failed' on GPU, not mentioning about decryption results).

                  Btw, Firestream 9270 i'm using has label 'Engineering sample NOT for Qualification' on it. Maybe it's the source of troubles?

                   

                  unsigned char hiBitSet = (a>127?128:0);/*(a & 0x80);*/