Just an aside, these are entirely optional, just may be helpful. I've decided to leave them out of CryptX for now for the sake of their heftiness and my inexperience with assembly to write them sufficiently optimized. To that end, I'll post them here and if anyone feels up to helping out, feel free to do so and we'll see what more we can add using them.
1. A second powmod function.
The function jacobly wrote a while back does vint * u24 mod vint. This was designed for an encryption-only RSA implementation with support for 65537 as the public exponent. If we wish to support RSA signing and decryption, we need a function that supports:
Code:
This would differ from the existing in that while base and modulus are assumed to be the same length, exponent can now be of variable length.
2. RSA key generation.
I tried to do this once in C and it took like 30 minutes to run.
We'd need an algorithm to generate RSA keypairs between 1024 and 2048 bits in length.
** In the absence of 1 and 2, we can just use ECC for signing.
3. Koblitz curve fast field squaring.
Apparently these types of elliptic curves allow you to swap out expensive point doubling operations for field squaring operations, but I'm unsure what this means. IF someone does and wants to take a stab at an implementation for squaring a variable-length binary Galois field, feel free.
Of these, #3 is the only one I really hope someone can help with lol.
1. A second powmod function.
The function jacobly wrote a while back does vint * u24 mod vint. This was designed for an encryption-only RSA implementation with support for 65537 as the public exponent. If we wish to support RSA signing and decryption, we need a function that supports:
Code:
// Can operate in place or take an additional parameter for output
// Endianness doesn't matter as long as it's documented.
powmod_vint(base, exp, exp_len, modulus, modulus_len)
This would differ from the existing in that while base and modulus are assumed to be the same length, exponent can now be of variable length.
2. RSA key generation.
I tried to do this once in C and it took like 30 minutes to run.
We'd need an algorithm to generate RSA keypairs between 1024 and 2048 bits in length.
** In the absence of 1 and 2, we can just use ECC for signing.
3. Koblitz curve fast field squaring.
Apparently these types of elliptic curves allow you to swap out expensive point doubling operations for field squaring operations, but I'm unsure what this means. IF someone does and wants to take a stab at an implementation for squaring a variable-length binary Galois field, feel free.
Of these, #3 is the only one I really hope someone can help with lol.