noyanc / ofxLibcrypto

Small openFrameworks addon to encrypt and decrypt strings using the AES-256 algorithm which comes with OpenSSL's libcrypto library integrated into OF core.
MIT License
7 stars 2 forks source link

Example not working #1

Open paolo-scoppola opened 8 years ago

paolo-scoppola commented 8 years ago

I've compiled the example on README.md on OF 0.8.3 on OSX 10.6.8 and OF 0.9.3 on Win 10, but it crashes here:

std::string encrypted_text = aes.encrypt("This is a plain text!");

looking inside the method I've found that the string

unsigned char *ciphertex

looks dirty...

Any solutions?

Thanks a lot, I need to finish a project!

Paolo

noyanc commented 8 years ago

Hi Paolo,

I test the example here with Ubuntu 12.04 and openFrameworks 0.8.4 and it works. Can you please give the crash log?

Noyan

paolo-scoppola commented 8 years ago

Hi Noyan,

the console doesn't tell me nothing. This is what I have in Xcode (the same happen with Visual Studio 2015)

Thanks

Il giorno 01/apr/2016, alle ore 10.13, R.Noyan Culum ha scritto:

Hi Paolo,

I test the example here with Ubuntu 12.04 and openFrameworks 0.8.4 and it works. Can you please give the crash log?

Noyan

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

Paolo Scoppola

www.paoloscoppola.com Via Cremera 8, 00198 Roma +39 339 1625089

noyanc commented 8 years ago

Hi Paolo,

Thank you for reporting the issue. I don't have a mac, nor windows machine now. That's why I can not see your issue.

Did you comment out the ofLogVerbose lines inside ofxLibcrypto.cpp? If so do not comment out these lines. Because this addon uses AES-256 encryption, the cipher chain works too slow. These ofLogVerbose lines helps giving him a time to finish the job.

Regards, Noyan

paolo-scoppola commented 8 years ago

Hi Noyanj,

I didn't comment those lines, just not enabled ofLogVerbose. Now I've done it and these are some snapshot.

I hope this can help you. it seems that the encrypted string has "dirty" values inside...

Here you have a snapshot of the code with ofLogVerbose enabled and the console output Il giorno 01/apr/2016, alle ore 11.18, R.Noyan Culum ha scritto:

Hi Paolo,

Thank you for reporting the issue. I don't have a mac, nor windows machine now. That's why I can not see your issue.

Did you comment out the ofLogVerbose lines inside ofxLibcrypto.cpp? If so do not comment out these lines. Because this addon uses AES-256 encryption, the cipher chain works too slow. These ofLogVerbose lines helps giving him a time to finish the job.

Regards, Noyan

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

Paolo Scoppola

www.paoloscoppola.com Via Cremera 8, 00198 Roma +39 339 1625089

noyanc commented 8 years ago

Dear Paolo, where is the snapshot? I don't see something :)

What do you get when you decrypt the encrypted text? Don't you have the correct value?

paolo-scoppola commented 8 years ago

here are the links to the images

where your code give m problems when I debug https://www.dropbox.com/s/ozmhwef4c7xzkqy/Screenshot%202016-04-01%2012.25.08.png?dl=0

what appears on the console https://www.dropbox.com/s/awwi86h6fwd9kka/Screenshot%202016-04-01%2012.18.05.png?dl=0

other Xcode snapshot (it talks about a strange file it cannot open...) https://www.dropbox.com/s/3hamut5z8htrtcw/Screenshot%202016-04-01%2012.17.36.png?dl=0

otherwise skype paoloscoppola (I'm little busy now, but I have some minutes to share the screen and show you what happens in Xcode)

Thanks!,

Paolo

Il giorno 01/apr/2016, alle ore 12.34, R.Noyan Culum ha scritto:

Dear Paolo, where is the snapshot? I don't see something :)

What do you get when you decrypt the encrypted text? Don't you have the correct value?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

Paolo Scoppola

www.paoloscoppola.com Via Cremera 8, 00198 Roma +39 339 1625089

noyanc commented 8 years ago

Well I don't know yet about what is happening in your case, but the addon does not do something in the encrypted string generation process. The encryption and decryption are being made completely by cipher.

I will look for a way to simulate the problem here.

paolo-scoppola commented 8 years ago

ok thanks a lot!

Paolo

Il giorno 01/apr/2016, alle ore 12.52, R.Noyan Culum ha scritto:

Well I don't know yet about what is happening in your case, but the addon does not do something in the encrypted string generation process. The encryption and decryption are being made completely by cipher.

I will look for a way to simulate the problem here.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

Paolo Scoppola

www.paoloscoppola.com Via Cremera 8, 00198 Roma +39 339 1625089

paolo-scoppola commented 7 years ago

Hi Noyan,

Any news about this issue? It looks that this is the only addon that allow to encrypt data by using key and vector. I need this feature to protect a video installation that I'll send to a festival.

Thanks!

moebiussurfing commented 6 years ago

any success on this? @paolo-scoppola i am looking something similar to protect a text file on an installation

paolo-scoppola commented 6 years ago

Hi moebiussurfing

It was one year ago, I don't remember what I did, but right now I'm using this simple piece of code and it works.

http://www.cplusplus.com/forum/windows/128374/