1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
rsa: RSA signature and encryption scheme implementation
This module provides RSA signature and encryption schemes defined in PKCS #1.
The implementation only supports RSA keys with two prime factors. Most of the
RSA operations in this module require buffers to perform. Buffer sizes are
provided for keys of a default maximum size of 4096-bits. [[BITSZ]]
may be changed with compiler flags to support bigger keys. [[MINBITSZ]]
defines the minimum size accordingly.
Public and private keys are stored in byte slices. [[pubkey_init]] is used
to initialize a public key. [[privkey_init]] or [[privkey_initd]] is used
to initialize a private key, depending on which parameters are available.
This is a low-level module which implements cryptographic primitives. Direct
use of cryptographic primitives is not recommended for non-experts, as
incorrect use of these primitives can easily lead to the introduction of
security vulnerabilities. Non-experts are advised to use the high-level
operations available in the top-level [[crypto::]] module.
Be advised that Hare's cryptography implementations have not been audited.
|