|
HI,
Insert this piece of code in GenerateRSAKey function.
Integer p, q, d;
unsigned int keybits = 128; // or whatever
const Integer eStart = 17; // or whatever
InvertibleRSAFunction invrsa(randPool, keybits, eStart);
p = invrsa.GetPrime1();
q = invrsa.GetPrime2();
d = invrsa.GetDecryptionExponent();
This works.
Now, I have a question.
How do you get the values of objects of Integer classes as strings?
Are there simple examples for the same?
It will really be helpful if someone could throw more light on this.
|
|
|
|
|
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1794)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
hex.cpp
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1794)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
hrtimer.cpp
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1794)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
ida.cpp
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1794)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
|
|
|
|
|
Hi, I wish I could help you, but I have never incountered this error (anyone else)?? I did go into MSDN and found the meaning of the error...maybe this will help:
Fatal Error C1001
INTERNAL COMPILER ERROR
(compiler file 'file', line number)
This error is most often generated in one of two cases:
Failure to recover the compiler's internal state following detection of a syntax error in the program. The first pass of the compiler will occasionally fail when attempting to recover its state following the detection of a malformed program. Typically, the compiler will have printed an error message (or messages) and will later produce an internal compiler error. In most cases, fixing the errors reported in your code and recompiling will solve the problem.
Failure of the code generator to find a way to generate correct code for a construct. This is most often caused by the interaction of an expression and an optimization option. The optimization has generated a tree which the compiler does not know how to handle. Such a problem can often be fixed by removing one or more optimization options when compiling the particular function containing the line indicated in the error message.
If no error messages have been emitted prior to the internal compiler error, then the next step is to determine which pass of the compiler is emitting the internal compiler error. This can be determined by recompiling the application with the /Bd option included. The /Bd option will cause each pass to print its name and arguments when it is invoked. The last pass invoked before the error is emitted is the one responsible.
If the pass indicated is P1, then the likely problem is still error recovery, as in number one above, but it is happening before the compiler has had a chance to emit the error message for the error it has just discovered. In such a case, examine the line on which the internal compiler error is reported. This line may also contain an unreported syntax error. Fixing any errors you find on that line will solve the internal compiler error in most cases. If you cannot find any error on that line or on the line previous to the one reported, contact Microsoft Product Support Services for help.
If the pass indicated is P2, then the problem can usually be fixed by removing one or more optimization options (or using a different code generator). You can determine which option is at fault by removing them one at a time and recompiling until the message goes away. Generally the last one removed is the problem and all other optimizations can be used safely. The most common culprits are /Og, /Oi, and /Oa. Once the offending optimization is discovered, it need not be turned off for the entire compilation. The offending optimization can be disabled with the optimize pragma while compiling the function where the error occurred, but enabled for the rest of the module.
More rarely, such errors occur at very low optimization levels or even when optimization is disabled. In such cases, rewriting the line where the error is reported (or possibly several lines including the one causing the error) may be a solution. If none of these options works, consult the technical support help file or the technical support section in one of your manuals.
Regards,
Dan
|
|
|
|
|
|
Dear,
Can anyone please also let me know how can i use Elliptic Curve cryptography from Crypto++, as there is no sample in crypto++ for ECC crypto system like there is a sample of RSA in cryptest. I need a sample of ECC using crypto++. Can you help?
Abdul
|
|
|
|
|
I want to know if this versions works with the new 5.0 library. Maybe someone is going to update it?
|
|
|
|
|
Hi,
Yes it works with the 5.0 library
If you can not get it to work, let me know....I did...W2000/VC++ 6.0 SP5
Regards,
Dan
|
|
|
|
|
blumgold.h is "missing" in 5.X versions, it works under 4.2, any suggestion ?
Thanks !
|
|
|
|
|
Great work, Thank you so much!!!
|
|
|
|
|
Thanks! I hope it helps...
Regards,
Dan
|
|
|
|
|
Can u please tell me which is the function to use if i want to use DES encryption but without using passphrase
Beczuse the EncryptString function u are using generates a random key... and thereby different results for a same String encrypted
Can u tell me a DES function and steps of implementation which uses a fixed key...and thereby gives me a result which gives me a constant Encrypted String for a same String to be encrypted
Please do reply ASAP
Bye
|
|
|
|
|
Hi, I just watnted to show you all how to put his examples (the original code writter in a GUI), I would have to dig into the funtions to aswer this one as I haven't had a lot of time to do recently (you can tell by how long it took to answer
Regards,
Dan
|
|
|
|
|
Hi,
I have read many places and found that Crypto++ functions are very much compatible to php mcrypt library. I never knew how to use this in VC++ application. You have dobe such a wonderful work and its so easy to understand that i can compile and run your code easily. But i am having a small problem and hope that you can solve it out. I have to use the mcrypt library of php to encrypt a file at server and i have to decrypt the same file on client side using VC++. I am using Rijndael algorithm for encryption at server side through PHP. as the documentation says...
mcrypt's MCRYPT_RIJNDAEL_128 is compatible with cryptopp-php's CRYPTOPP_CIPHER_AES/ CRYPTOPP_CIPHER_RIJNDAEL, which are just aliases for each other.
and
MCRYPT_MODE_CBC in mcrypt and CRYPTOPP_MODE_CBC in cryptopp-php.
MCRYPT_MODE_ECB in mcrypt and CRYPTOPP_MODE_ECB in cryptopp-php.
Can you tell me how to use crypto++ to do the same. or show me some piece of code to make it easy to understand..I need it urgently..Please help in doing the same. Any help or pointers are highly appreciated.
Thanks a lot in advance..
Regards,
Himanshu
|
|
|
|
|
D:\download\Encryption\CryptestDemo\Cryptest\bench.cpp(9) : fatal error C1083: Cannot open include file: 'adler32.h': No such file or directory
BenchMark.cpp
Cryptest.cpp
D:\download\Encryption\CryptestDemo\Cryptest\Cryptest.cpp(30) : fatal error C1083: Cannot open include file: 'socketft.h': No such file or directory
CryptestDlg.cpp
FileStffDlg.cpp
TCPForwarding.cpp
Validat1.cpp
D:\download\Encryption\CryptestDemo\Cryptest\Validat1.cpp(33) : fatal error C1083: Cannot open include file: 'skipjack.h': No such file or directory
Validat2.cpp
D:\download\Encryption\CryptestDemo\Cryptest\Validat2.cpp(17) : fatal error C1083: Cannot open include file: 'xtrcrypt.h': No such file or directory
Validat3.cpp
D:\download\Encryption\CryptestDemo\Cryptest\Validat3.cpp(11) : fatal error C1083: Cannot open include file: 'adler32.h': No such file or directory
|
|
|
|
|
Hi Jasmine,
Ignore the way I tell you to do it above, do the following:
1) Put the Crypto++ Library in a directory (let's say) "C:\Dev\Crypto42".
2) Put my example in a directory (let's say) "C:\Dev\Crypttest".
3) Now, choose "Insert Project into Workspace" from the "Projects" menu.
4) Go find the "Cryptlib" project in "C:\Dev\Crypto42".
5) Make Crypttest dependant to Cryptlib in "Project | Dependencies".
6) Go to "Project | Settings | Link (tab)" and take the cryptlib.lib out of the "Objects/Library Modules:" area.
7) Last, change the location of the headers (#include "..\\Crypto42\\pch.h").
Hope this helps!
Regards,
Dan
|
|
|
|
|
Hi guys,
First of all i will say this is a brilliant program
Actually i am trying to find a solution out here if someway i can encrypt and decrypt my objects of a particular class using MFC ofcourse
IF anyone can think of a particular solution or a HINT of the way of doing it
Please do let me know
Thanks Buddy
Vishi043
|
|
|
|
|
Hi,
Anyone know how to build Crypto++ library in Windows CE?
Thanks,
-BHKien
|
|
|
|
|
Hi BHKien,
The C++ compiler provided by Microsoft for Windows CE does not handle exceptions.
Jeff
|
|
|
|
|
Jeff,
So is it possible to port Crypto++ to Windows CE platform? Or is there any Crypto API for Windows CE out there?
regards,
|
|
|
|
|
I'm new to C++ and have been trying to compile the CryptestDemo.
Initially I had problems figuring out how to set things like the /MD flag and a few other little nits. I've gotten to the point where it now complains that it is unable to find the include files "pch.h" and "cryptlib.h"
I fixed this by adding an additional include paths on the project property pages back to the original crypto++ directory.
However this starts a new problem
Cryptest error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in cryptlib42r.lib(cryptlib.obj)
Does anyone have an idea as to how I might get past this?
Thanks Mike McGregor
|
|
|
|
|
Hi Mike,
Try setting the (from the menu) "Project|Settings", go to the C++ tab, Catagory: "General". Then go to the "Preprocessor definitions" edit window and take out "_AFXDLL". Now from the Catagory drop-down box, chose "Coode Generation", then change the "Use run time libray:" drop-down box to "Multithreaded".
Let me know if it compiles ok...
Regards,
Dan
|
|
|
|
|
Hi, Dan:
Where Can i get Crypto++ v4.2 Library?
The URL is not accessible.
|
|
|
|
|
Hi,
I was able to connect without a problem...
I will send the ZIP file I downloaded from the site.
Regards,
Dan
|
|
|
|
|
Compiling the library under VC6 (SP5) produced this error:
mqueue.cpp
c:\program files\vs\vc98\include\deque(258) : error C2784: 'struct std::random_access_iterator_tag __cdecl std::_Iter_cat(const _Ty *)' : could not deduce template argument for 'const *' from 'int'
D:\Projects\Globals\Crypto++\mqueue.cpp(10) :
see reference to function template instantiation '__thiscall std::deque<unsigned long,class="" std::allocator<unsigned="" long=""> >::std::deque<unsigned long,class="" std::allocator<unsigned="" long=""> >(int,int)' being compiled
c:\program files\vs\vc98\include\deque(258) : error C2784: '_C __cdecl std::_Iter_cat(const struct std::iterator<_C,_Ty,_D> &)' : could not deduce template argument for 'const struct std::iterator<_C,_Ty,_D> &' from 'int'
D:\Projects\Globals\Crypto++\mqueue.cpp(10) : see reference to function template instantiation '__thiscall std::deque<unsigned long,class="" std::allocator<unsigned="" long=""> >::std::deque<unsigned long,class="" std::allocator<unsigned="" long=""> >(int,int)' being compiled
AFter investigating the code, I changed the constructor in mqueue.cpp from
MessageQueue::MessageQueue(unsigned int nodeSize)
: m_queue(nodeSize), m_lengths(1, 0)
{
}
to
MessageQueue::MessageQueue(unsigned int nodeSize)
: m_queue(nodeSize), m_lengths(1, 0UL)
{
}
which solved the error.
BTW, Your testing GUI runs fine. Thank you.
|
|
|
|
|
This validation will produce an exception
pass=DESValidate() && pass;
Generally very good job
Spiros Prantalos
|
|
|
|
|