Jump to content

[SOLVED] Strange problem with linked libUnigine and crypto++


photo

Recommended Posts

Posted

Hello

 

We have some simply encryption implemented with crypto++.

This works in general but there are some cases where only garbage is created as soon as libUnigine is linked.

    Crypto *crpt = new Crypto("729308A8E815F6A46EB3A8AE6D5463CA7B64A0E2E11BC26A68106FC7697E727E37011");
    std::cout << crpt->decrypt("1AFF5FA2726FD39BB6E994F56718175B4C625AA40B0FDC40355C6819B5EE27C69E5A2337D906CA6254682A06B0CF36BAD398AD64360AC8CB230744A3D3CFC0864B7D6330C1E57935B74F39461FB36472");

    std::cout << std::endl;

    Crypto *crpt2 = new Crypto("C63C3CDD41FB7E139ACE0663247590008275D01D0DF50BA29EE10FB47F77992D43D9785FDE5B1E48A9D742457DC49837D8E984158DDC013043939A601FAA784C");
    std::cout << crpt2->decrypt("EEC90516CBC469CF0E09A26050DA4BE4DD8D5762392883C91A7B58B59BD1C106B619E3631C493E0B0FB2B7F345F573FAA3BA41258E85BB07C9AE957AB124A6DEC9DA20164B086233999D7D7AA469EAB9");

Output with Unigine linked:

 

 

?2{?q~`M

L{|H:lҦM6-yyҘVF3

yir0MdJfpt9YAnRvDwNC79mCNQZNDuqXiQYye5iYy4kHCi1jDIyEbc5BFy8RXXFa5ni

 

Output without unigine linked:

 

 

yir0MdJfpt9YAnRvDwNC79mCNQZNDuqXiQYye5iYy4kHCi1jDIyEbc5BFy8RXXFa5ni

yir0MdJfpt9YAnRvDwNC79mCNQZNDuqXiQYye5iYy4kHCi1jDIyEbc5BFy8RXXFa5ni

 

If we adjust the key-length it seems to work but I don't understand why the corruption is happening.

Attached the samples with linked unigine and without it.

 

Greets

Manuel

roa_linked.zip

roa_not_linked.zip

Posted

Hello unclebob

 

Thanks for your answer. sadly I have no access to the linked page:

 

Not enough rights for access

 

Greets

Manuel

Posted

Hello silent,

 

The problem does not occurs with Unigine 2.0.

 

Just out of curiosity what exactly is happening if linked against unigine 1.0? Never faced such a behavior before in a c++ application. :)

 

Greets

Manuel

Posted

Somehow crypto++ library is using our internal memory allocator (operators new() and delete()). We've removed these symbols from the Unigine 2.0 library to avoid such behavior in future.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Hello silent,

 

Thanks. :)

 

Greets

Manuel

×
×
  • Create New...