Using Crypography to encrypt/decrypt information

Hi guys,

I have recently been making a program that stores passwords and secret information, I have been looking at cryptography techniques and APIs that people use.

I have successfully used CAPICOM but I thought I would use something more up-to-date now. But libraries/toolkits such as openssl and Crypto++ are just impossible to use for a beginner.

The only reason I used CAPICOM was because there was a tutorial on how to use/install and implement it. Everything else I have found either have no or out-of-date installation guides, no tutorial of how to actually use it, and sometimes neither.


I was wondering if anyone here had experience in this field and could give me some help in installing/implementing and compiling a more up-to-date cryptography method that I can use in my program.


Basically I am going to read input from the user, encrypt it, place it into a file. Then the information can be read from the file, decrypted and the read by the user.

Just an information store, but encrypted :)


Many thanks,
Jack
No-one?
closed account (o1vk4iN6)
Well if you already have it working, it's not like new encryptions are created every year, especially if you are using a password. So long as you are using a password for encryption I see no benefit to switching to another method as there is an unknown so the only way would be to bruteforce the password, than depending on what you used it could be easily bruteforced if the password is too short. Which encryption method are you using? If you want to use a specific library than just google for references on how to use that specific API.
Last edited on
I am currently using AES, but only because someone used it in a tutorial!

I am now looking at crypto++ a bit more, I can now build the cryptopp.lib successfully, but I have more problems now: Every time I try and build the test.cpp, it comes up with loads and loads of 'LNK' errors (see buildlog below). I have included the cryptopp.lib in the project folder and changed the Linker Inputs to include where the .lib file is held. I have have also added the location of the additional header files, and I still get the errors.

I cannot work out why it isn't working, can anyone help?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
1
1>  test3.cpp
1>c:\users\ibm_admin\documents\visual studio 2010\projects\test3\test3\test3.cpp(855): warning C4996: 'asctime': This function or variable may be unsafe. Consider using asctime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(153) : see declaration of 'asctime'
1>c:\users\ibm_admin\documents\visual studio 2010\projects\test3\test3\test3.cpp(855): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(112) : see declaration of 'localtime'
1>test3.obj : error LNK2019: unresolved external symbol "void __cdecl FIPS140_SampleApplication(void)" (?FIPS140_SampleApplication@@YAXXZ) referenced in function _wmain
1>test3.obj : error LNK2019: unresolved external symbol "void __cdecl BenchmarkAll2(double,double)" (?BenchmarkAll2@@YAXNN@Z) referenced in function _wmain
1>test3.obj : error LNK2019: unresolved external symbol "void __cdecl BenchmarkAll(double,double)" (?BenchmarkAll@@YAXNN@Z) referenced in function _wmain
1>test3.obj : error LNK2019: unresolved external symbol "bool __cdecl RunTestDataFile(char const *,class CryptoPP::NameValuePairs const &)" (?RunTestDataFile@@YA_NPBDABVNameValuePairs@CryptoPP@@@Z) referenced in function _wmain
1>test3.obj : error LNK2019: unresolved external symbol "bool __cdecl ValidateThreeWay(void)" (?ValidateThreeWay@@YA_NXZ) referenced in function "bool __cdecl Validate(int,bool,char const *)" (?Validate@@YA_NH_NPBD@Z)
1>test3.obj : error LNK2019: unresolved external symbol "bool __cdecl ValidateBlowfish(void)" (?ValidateBlowfish@@YA_NXZ) referenced in function "bool __cdecl Validate(int,bool,char const *)" (?Validate@@YA_NH_NPBD@Z)
1>test3.obj : error LNK2019: unresolved external symbol "bool __cdecl ValidateRC5(void)" (?ValidateRC5@@YA_NXZ) referenced in function "bool __cdecl Validate(int,bool,char const *)" (?Validate@@YA_NH_NPBD@Z)
1>test3.obj : error LNK2019: unresolved external symbol "public: static void __cdecl CryptoPP::Tiger::InitState(unsigned __int64 *)" (?InitState@Tiger@CryptoPP@@SAXPA_K@Z) referenced in function "protected: virtual void __thiscall CryptoPP::IteratedHashWithStaticTransform<unsigned __int64,struct CryptoPP::EnumToType<enum CryptoPP::ByteOrder,0>,64,24,class CryptoPP::Tiger,0,0>::Init(void)" (?Init@?$IteratedHashWithStaticTransform@_KU?$EnumToType@W4ByteOrder@CryptoPP@@$0A@@CryptoPP@@$0EA@$0BI@VTiger@2@$0A@$0A@@CryptoPP@@MAEXXZ)
1>test3.obj : error LNK2001: unresolved external symbol "public: static unsigned int const CryptoPP::PKCS_DigestDecoration<class CryptoPP::SHA1>::length" (?length@?$PKCS_DigestDecoration@VSHA1@CryptoPP@@@CryptoPP@@2IB)
1>test3.obj : error LNK2001: unresolved external symbol "public: static unsigned char const * const CryptoPP::PKCS_DigestDecoration<class CryptoPP::SHA1>::decoration" (?decoration@?$PKCS_DigestDecoration@VSHA1@CryptoPP@@@CryptoPP@@2QBEB)
1>test3.obj : error LNK2001: unresolved external symbol "bool (__cdecl* CryptoPP::g_pAssignIntToInteger)(class type_info const &,void *,void const *)" (?g_pAssignIntToInteger@CryptoPP@@3P6A_NABVtype_info@@PAXPBX@ZA)
1>C:\Users\IBM_ADMIN\Documents\Visual Studio 2010\Projects\test3\Debug\test3.exe : fatal error LNK1120: 146 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Anyone?
closed account (z05DSL3A)
I don't use crypto++, maybe there are not many user of it on this forum.

You may have more luck going to the crypto++ website and looking at the docs, FAQs or see if they have a forum or mailing list and see if you can get help there.

Sorry.
closed account (o1vk4iN6)
It's a basic link error, meaning the compiler can't find the specified functions in current libraries or source for linking. There are any number of reasons why, you aren't including the library by name, you don't have the path to the library included, you are using an incompatible binary (x86 with x64), etc... There's a problem with how you setup your project, can't help anymore than that.
'wmain' indicates that you may have a clash with unicode
Topic archived. No new replies allowed.