[gnutls-devel] GnuTLS | crypto-api: add block cipher API with automatic padding (!1611)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Fri Jul 22 08:02:20 CEST 2022
Daiki Ueno commented on a discussion on lib/crypto-api.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1611#note_1034890308
> + } else {
> + ret = _gnutls_cipher_decrypt2(&h->ctx_dec,
> + ctext, ctext_len,
> + ptext, *ptext_len);
> + }
> +
> + if (ret < 0) {
> + _gnutls_switch_fips_state(GNUTLS_FIPS140_OP_ERROR);
> + } else {
> + _gnutls_switch_fips_state(GNUTLS_FIPS140_OP_APPROVED);
> + }
> +
> + if (_gnutls_cipher_type(h->ctx_enc.e) == CIPHER_BLOCK &&
> + (flags & GNUTLS_CIPHER_PADDING_PKCS7)) {
> + uint8_t *p = ptext;
> + uint8_t padding = p[*ptext_len - 1];
The checking is done below in the for loop (I'll add a comment).
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1611#note_1034890308
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/20220722/ca784795/attachment-0001.html>
More information about the Gnutls-devel
mailing list