[gnutls-devel] GnuTLS | WIP: Add Linux kernel AF_ALG backend (!1404)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Wed Mar 17 09:11:45 CET 2021




Stephan Mueller commented on a discussion on lib/accelerated/afalg.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1404#note_531147824

> +	struct kcapi_ctx *ctx = _ctx;
> +
> +	if (iv_size > kcapi_cipher_ivsize(ctx->handle))
> +		return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
> +
> +	memcpy(ctx->iv, iv, iv_size);
> +
> +	return 0;
> +}
> +
> +static int afalg_cipher_encrypt(void *_ctx, const void *src, size_t src_size,
> +				void *dst, size_t dst_size)
> +{
> +	struct kcapi_ctx *ctx = _ctx;
> +
> +	if (kcapi_cipher_encrypt(ctx->handle, src, src_size, ctx->iv,

Side note, if we need the stream API, take care on the documentation, the update call cannot be invoked endlessly without a stream_op inbetween.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1404#note_531147824
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20210317/140bc46d/attachment-0001.html>


More information about the Gnutls-devel mailing list