nisse@lysator.liu.se (Niels Möller) writes:
So to be concrete on the interface comments, I'd suggest something like
void nist_keywrap16(const void *ctx, nettle_cipher_func *encrypt, const uint8_t *iv, size_t ciphertext_length, uint8_t *ciphertext, cosnt uint8_t *cleartext);
int nist_keyunwrap16(const void *ctx, nettle_cipher_func *decrypt, const uint8_t *iv, size_t cleartext_length, uint8_t *cleartext, const uint8_t *ciphertext);
And it's desirable if in-place operation works efficiently, while for non-inplace operation, the input shouldn't be clobbered.
Regards, /Niels