[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: private/public key support ?
- From: Sam Roberts <vieuxtech@...>
- Date: Mon, 15 Mar 2010 12:40:33 -0700
On Mon, Mar 15, 2010 at 12:24 PM, Luiz Henrique de Figueiredo
>> what I want to do is private/public encrypt/decrypt, and not simple
>> SHA-1 hashing. Does your code help with that as well?
> Yes. lbc has powmod, which is the equivalent of BigInt_ModPower of sha1-rsa
> librayr. All that is missing is BigInt_HexToNum if you really need it.
If you do go this route, remember that raw RSA exponentiation isn't
secure, you need to implement the schemes described in PKCS1, like
OAEP for encryption. They are mostly conventions on padding, and are
easy to do.
I'd be surprised if it wasn't easier to use lxyssl or luasec, even if
you had to extend their interfaces to expose the functions you want.
You'd get x.509, for a start.