lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


openssl-seal is a best solution for your requirement.


Regards,
Sam

在 2017年8月10日,05:41,Ricardo Ramos Massaro <ricardo.massaro@gmail.com> 写道:

On Wed, Aug 9, 2017 at 9:01 AM, Daniel Silverstone
<dsilvers@digital-scurf.org> wrote:
https://gist.github.com/1lann/6604c8d3d8e5fdad0832

May help.

Note that this is just plain RSA, which is not very secure[1]. To be
secure, RSA must be used with some padding scheme, which is more
complicated than it sounds (PKCS v1.5 was one such scheme that was
eventually found vulnerable, for example).

When in doubt, one really should prefer existing crypto libraries that
have been checked by people who understand crypto.

[1] https://en.wikipedia.org/wiki/RSA_(cryptosystem)#Attacks_against_plain_RSA

- Ricardo