cujun / engine-cuda

Automatically exported from code.google.com/p/engine-cuda
GNU General Public License v3.0
0 stars 2 forks source link

Teststate output differs for GPU #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run the teststate application
2. OR: Encrypt a file using the CPU and then attempt to decrypt it using the 
cudamrg engine.

What is the expected output? What do you see instead?
1. Expected GPU and CPU output to match.
...
engine_cudamrg-v0.1.0$ ./teststate 

Successfully found a device supporting CUDA.

AES test vector:
input: 4ec137a426dabf8aa0beb8bcc2b89d6
key (128bit): 95a8ee8e89979b9efdcbc6eb9797528d
key (192bit): 95a8ee8e89979b9efdcbc6eb9797528d432dc26061553818
key (256bit): 95a8ee8e89979b9efdcbc6eb9797528d432dc26061553818ea635ec5d5a7727e
Encrypted output for a 128bit key: d9b65d1232ba199cdbd487b2a1fd646
Encrypted output for a 192bit key: b18bb3e7e1732be1358443a504dbb49
Encrypted output for a 256bit key: 2f9cfddbffcde6b9f37ef8e4d512cf4
Decrypted output for a 128bit key: 9570c34363565b39353a01c0e23b65
Decrypted output for a 192bit key: 29dfd75b85cee4de6e26a88cdc2c9c3
Decrypted output for a 256bit key: 11a3545ce49b84bbb7b3523618fa6e

CBC - IV: 0123456789abcdef
CBC - key 128bit: 2b7e151628aed2a6abf715889cf4f3c
CBC - input for a 128bit key: 7649abac8119b246cee98e9b12e9197d
CBC - Decrypted output for a 128bit key: 6bc1bee22e409f96e93d7e117393172a

Device 0: "GeForce GTX 460"
  CUDA Capability Major revision number:         2
  CUDA Capability Minor revision number:         1
  Number of multiprocessors:                     7
  Integrated:                                    No
  Support host page-locked memory mapping:       Yes

  Using pinned memory: cudaHostAllocDefault

The recommended buffer size is 1835008. Please set it.
The current buffer size is 1835008.

Press any key to start encrypting with a 128bit key...
output GPU: afbd3c7625e859eecb507afa9cb9a976
output CPU: d9b65d1232ba199cdbd487b2a1fd646

Press any key to start encrypting with a 192bit key...
output GPU: afbd3c7625e859eecb507afa9cb9a976
output CPU: b18bb3e7e1732be1358443a504dbb49

Press any key to start encrypting with a 256bit key...
output GPU: afbd3c7625e859eecb507afa9cb9a976
output CPU: 2f9cfddbffcde6b9f37ef8e4d512cf4

Press any key to start decrypting with a 128bit key...
output GPU: df1d599934c96eb842bf74c8f5b82dd4
output CPU: 9570c34363565b39353a01c0e23b65

Press any key to start decrypting with a 192bit key...
output GPU: df1d599934c96eb842bf74c8f5b82dd4
output CPU: 29dfd75b85cee4de6e26a88cdc2c9c3

Press any key to start decrypting with a 256bit key...
output GPU: df1d599934c96eb842bf74c8f5b82dd4
output CPU: 11a3545ce49b84bbb7b3523618fa6e

Press any key to start encrypting with a 128bit key CBC...
output GPU: 936e2ffab086c1db79f4eb0e95e6efc
output CPU: 7649abac8119b246cee98e9b12e9197d

Press any key to start decrypting with a 128bit key CBC...
output GPU: f83299d91ffeaa825fe87f5f136b915f
output CPU: 6bc1bee22e409f96e93d7e117393172a

Total time: 5.293760 milliseconds
---------------------------------------------
2.
openssl-0.9.8o/apps$ ./openssl enc -e -aes-256-ecb -v -in openssl.cnf -out 
openssl.cnf.aes -k c26d8562740cdcea548efc08babd19a3d1aaedf6
bytes read   :    9374
bytes written:    9392

openssl-0.9.8o/apps$ ./openssl enc -engine cudamrg -d -aes-256-ecb -v -in 
openssl.cnf.aes -out openssl.cnf -k c26d8562740cdcea548efc08babd19a3d1aaedf6

Successfully found a device supporting CUDA.
  Using pinned memory: cudaHostAllocDefault

The recommended buffer size is 1835008. Please set it.
The current buffer size is 1835008.

engine "cudamrg" set.
bad decrypt
22572:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad 
decrypt:evp_enc.c:330:

Total time: 46.097088 milliseconds
---------------------------------------------

What version of the product are you using? On what operating system?
* engine_cudamrg-v_0.1.0
* Ubuntu 10.10 64bit, kernel: 2.6.35-22-generic #34-Ubuntu SMP x86_64
* Nvidia driver 260.19.12
* cudatoolkit_3.2.9_linux_64_ubuntu10.04
* gpucomputingsdk_3.2_linux
* openssl-0.9.8o (I manually patched it, based on your provided patch files)

Please provide any additional information below.
* AMD Phenom(tm) II X6 1090T Processor
* Nvidia  GeForce GTX 460

Thanks for the good work, I'm very interested in your engine.

Regards,
Stephen

Original issue reported on code.google.com by sbrob...@gmail.com on 17 Oct 2010 at 9:32

GoogleCodeExporter commented 8 years ago
Sorry if I respond to you only now. What you are reporting is quite strange and 
I'm unable to reproduce that bug on my machine, you aren't the first one that 
report this bug but if I cannot reproduce it I cannot fix it.

Could you report how do you have build openssl (openssl version -a) and the 
engine_cudamrg (head config.log |grep "$ ./configure")?

Could you test the engine on a device with compute capability below 2.0 (1.1 or 
1.3)? 

For now thank you for your detailed report.

Original comment by paolo.ma...@gmail.com on 11 Jan 2011 at 2:26

GoogleCodeExporter commented 8 years ago
Dear Paolo, 

I have the same issue. I can organize remote access to this computer with ssh 
to let you see the issue. Just let me know about.

Original comment by Igor.Kuc...@gmail.com on 12 Jan 2011 at 12:54

GoogleCodeExporter commented 8 years ago
Hi,
Send an email directly to me so we can agree on how to do it, you can obtain my 
email address from the README file contained into the tarball of the engine 
source.

Original comment by paolo.ma...@gmail.com on 12 Jan 2011 at 1:12

GoogleCodeExporter commented 8 years ago
This issue happen when openssl is builded with the '-DNO_ASM ' option; if is 
built with '-DAES_ASM' this bug don't happen; you can verify if your version of 
openssl is built with that option, by doing 'openssl version -a' at the command 
prompt.
To solve this issue you can build openssl with the 'no-asm' option, or use a 
revision above r31 from the svn repository.

Original comment by paolo.ma...@gmail.com on 19 Jan 2011 at 9:16

GoogleCodeExporter commented 8 years ago
hi, are you still on this project?

Original comment by leeiva...@gmail.com on 22 Aug 2012 at 4:11

GoogleCodeExporter commented 8 years ago
Yes, but currently I'm not developing on it.
Why are you writing in this section? 
This is a fixed issue, do you have the same issue on a different configuration?

Original comment by paolo.ma...@gmail.com on 22 Aug 2012 at 7:35

GoogleCodeExporter commented 8 years ago
Sorry for the sudden posting.. yea, i's having the same issue.
Just wondering whether this works on new openssl 1.0.1c, cuda 4.0. I haven 
tried the old tools which is originally used your project.

my spec is quadro 4k and is on ubuntu 12.04

Original comment by leeiva...@gmail.com on 23 Aug 2012 at 3:10