RSA key generation silently truncates large exponents – need function that accepts exponent as byte array
RSA key generation silently truncates large exponents – need function that accepts exponent as byte array: a task in LegoFlow-SWE (Harbor dataset). When calling rsa make key() with an exponent value larger than what fits in a C long (e.g., a 256‑bit exponent on a platform where long is only 64…
The task
When calling `rsa_make_key()` with an exponent value larger than what fits in a C `long` (e.g., a 256‑bit exponent on a platform where `long` is only 64 bits), the value gets silently truncated to the most significant bytes that fit into a `long`. This leads to incorrect behaviour:
Part of Lego-X/LegoFlow-SWE.