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:

RsaPublicKeyDecode
RsaSSL_Verify
AesSetKey
AesCbcEncrypt
AesCbcDecrypt
RsaPublicEncrypt
InitRng
RsaPrivateKeyDecode
RsaPrivateDecrypt
RNG_GenerateBlock

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.

Thanks

2

(1 replies, posted in wolfSSL)

Hello, my quest to find a simple C library that implements RSA and ssl for embedded systems has led me to wolfSSL. So far I like what I see (although under-documented).

My question is quite simple:

I want to generate a simple RSA key pair, a public and a private key that I will then be able to use with the wolfSSL API. How can I do this? I've seen one thread in this forum that seemed to indicate it's not possible, but I would like to be sure.

If it's not possible, may I inquire why, it seems like it is a core capability of RSA/

Finally, if it's not implemented in wolfSSL, does anyone have some pointers as to how I can implement it myself?

Thanks