NAME

Crypt::Perl - Cryptography in Pure Perl

DESCRIPTION

Just as it sounds: cryptography with no non-core XS dependencies! This is useful if you don’t have access to other tools that do this work like OpenSSL, CryptX, etc. Of course, if you do have access to one of those tools, they may suit your purpose better.

See submodules for usage examples of:

SUPPORTED PUBLIC KEY ENCRYPTION ALGORITHMS

SECURITY

Given the number of original tests in this distribution, I am reasonably confident that this code is as secure as the random number generation in Bytes::Random::Secure::Tiny can allow. The tests verify the logic here against OpenSSL, on which millions of applications rely every day.

That said: NO GUARANTEES!!! The tests here are original, but the production logic is ported from elsewhere. There has been no formal security review. I found at least one security flaw in one of the source libraries; there may be more.

Of course, OpenSSL has not been trouble-free, either!

Caveat emptor.

SPEED

RSA key generation is slow—too slow, probably, unless you have Math::BigInt::GMP or Math::BigInt::Pari (either of which requires XS). It’s one application where pure-Perl cryptography just doesn’t seem feasible. :-( Everything else, though, including all ECDSA operations, should be fine.

TODO

There are TODO items listed in the submodules; the following are general to the entire distribution.

  • Security audit. A check against OpenSSL or LibTomCrypt would be awesome.

  • Document the exception system so that applications can use it.

  • Add more tests.

  • Make it faster :)

ACKNOWLEDGEMENTS

Much of the logic here comes from Kenji Urushima’s jsrsasign.

Most of the tests depend on the near-ubiquitous OpenSSL, without which the Internet would be a very, very different reality from what we know!

LICENSE

This library is licensed under the same license as Perl.

AUTHOR

Felipe Gasper (FELIPE)