You wrote:
I wrote:
Now that the more ciphers in nettle work with fix key size, maybe it would be a good idea to drop the length argument also from the nettle_set_key_func typedef?
Simon Josefsson simon@josefsson.org writes:
How would you then handle ciphers that accepts arbitrary key sizes?
You should call the algorithm-specific functions which accepts variable key size, e.g., cast128_set_key. But you will no longer be able to pass arbitrary key size via the function pointers nettle_cast128.set_*_key, which will then be a wrapper function specifying a fix key size.
Ok, sounds fine to me.
For aes, aes_set_*_key (which is kept for backwards compatibility) accepts a length parameter, but the new and recommended functions,
If you bump the ABI, is there any reason to keep backwards compatible functions? It sounds like the changes you are considering may break applications anyway, so they might as well take the time to upgrade to the new API.
/Simon