Topic: ctaocrypt for basic RSA+AES c lib support

Hello, I'm trying to compile the latest stable version of ctaocrypt in VisualStudio 2013. I've tried using the provided project file, and I've tried creating my own cleaner project for it but I hit the same issue.

All I want is to get the most basic Rsa and AES calls in ctaocrypt, no ssl, no tls, no certs or anything like that, just:


The issue I am finding is that:
a) the project provided as-is does not compile (pretty sure even on older VS versions) since it fails to include memory.c which is required for user-specified alloc functions etc.
b) I can never seem to compile (and link) succesfully without the two following errors:

2>ctaocrypt.lib(asn.obj) : error LNK2019: unresolved external symbol _GetCA referenced in function _ParseCertRelative
2>ctaocrypt.lib(asn.obj) : error LNK2019: unresolved external symbol _GetCAByName referenced in function _ParseCertRelative

I've tried compiling with NO_CERTS, but this causes other dependencies between Rsa/Sha256/Asn. I can't find the right combination of flags to remove these. I can get the GetCAByName to go away by using NO_SKID, but not the GetCA one.

This used to work several versions ago (maybe 1-2 years ago, not sure the exact version), but it looks like asn.c was refactored and broke this.

If it's not a supported "mode" (bare-bones ctaocrypt) anymore, are there any recommendations on a possible alternative. I really just wanted a portable, lightweight RSA+AES implementation in C.



Re: ctaocrypt for basic RSA+AES c lib support

Hi nesnub,

I recently (Mar 18) went through and fixed several issues with the Visual Studio Solutions.

I also was compiling in VisualStudio 2013. I identified the following issue that may help out in your case:

Known Issues: When porting our .sln project file to a version of VS 2012 or later a dialog will appear after a
"One-Way Upgrade" Notification. If the user selects "YES" here our property sheet will be over-written with one that
will enable SAFESEH and also enable EDITANDCONTINUE even though these two settings are not compatible.
I have added a setting in our property sheet to disable SAFESEH and we will get a no-warnings build if the user
selects "no" on this option.

NO_PSK also was not set in the flags which was breaking each solution we had.
See: … 642623fb32
These fixes will be in the next stable release 3.4.6 however were not in previous releases.

For the current development head you can always reference

If these fixes do not help you on your project please do not hesitate to respond here or email me I will try to assist you in getting your project going.