Re: Is EVP_CipherFinal required?

Stef Bon <[email protected]> Fri, 29 May 2026 04:13:11 -0700 (PDT)
Newsgroups gmane.comp.encryption.openssl.user
Message-ID <[email protected]>
------=_Part_112286_1224740251.1780053191278
Content-Type: multipart/alternative; 
	boundary="----=_Part_112287_1850175657.1780053191278"

------=_Part_112287_1850175657.1780053191278
Content-Type: text/plain; charset="UTF-8"

Hi,



Op vrijdag 29 mei 2026 om 09:53:45 UTC+2 schreef Matt Caswell:



The effects of EVP_CipherFinal are dependent on a number of things 
including the cipher, any options and the data. For example if you're 
using a block cipher with padding enabled, there will always be a 
final "padding" block. If you're using an AEAD cipher then it's 
typically during the Final that the tag is created/verified. The 
effects of NOT calling Final are undocumented. 

So, basically, in some circumstances you might get away without 
calling it. But if you choose to do so, you better know what you are 
doing. The effects of getting it wrong could be catastrophic for 
security. 


Ok, I'm using (AES-256-CTR, HMAC-SHA256) and CHACHA20-POLY1305-ZT/[email protected] 
for now. 
As I see it the first does not AEAD and extra padding, and for the second I 
cannot oversee this at this moment. It's pretty complicated with two 
ciphers, and a special
construction using poly1305 for checking the tag.

Thanks for your answer,

Stef


-- 
You received this message because you are subscribed to the Google Groups "openssl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openssl-users+unsubscribe-MCmKBN63+Bmbup2nOX2J7Q@public.gmane.org
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-users/2bf6192f-525e-4ff0-aedf-e2aadef6ccd5n%40openssl.org.

------=_Part_112287_1850175657.1780053191278
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div>Hi,</div><div><br /></div><div><br /></div><br /><div><div dir=3D"auto=
">Op vrijdag 29 mei 2026 om 09:53:45 UTC+2 schreef Matt Caswell:<br /></div=
><blockquote style=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb=
(204, 204, 204); padding-left: 1ex;"><br />
<br />The effects of EVP_CipherFinal are dependent on a number of things
<br />including the cipher, any options and the data. For example if you're
<br />using a block cipher with padding enabled, there will always be a
<br />final "padding" block. If you're using an AEAD cipher then it's
<br />typically during the Final that the tag is created/verified. The
<br />effects of NOT calling Final are undocumented.
<br />
<br />So, basically, in some circumstances you might get away without
<br />calling it. But if you choose to do so, you better know what you are
<br />doing. The effects of getting it wrong could be catastrophic for
<br />security.
<br /></blockquote><div><br /></div><div>Ok, I'm using (AES-256-CTR, HMAC-S=
HA256) and CHACHA20-POLY1305-ZT/[email protected] for now.=C2=A0</div><div>As I see =
it the first does not AEAD and extra padding, and for the second I cannot o=
versee this at this moment. It's pretty complicated with two ciphers, and a=
 special</div><div>construction using poly1305 for checking the tag.</div><=
div><br /></div><div>Thanks for your answer,</div><div><br /></div><div>Ste=
f</div><blockquote style=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px sol=
id rgb(204, 204, 204); padding-left: 1ex;"><br /></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;openssl-users&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:openssl-users+unsubscribe-MCmKBN63+BlAfugRpC6u6w@public.gmane.org">openssl-us=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/a/openss=
l.org/d/msgid/openssl-users/2bf6192f-525e-4ff0-aedf-e2aadef6ccd5n%40openssl=
.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/a/op=
enssl.org/d/msgid/openssl-users/2bf6192f-525e-4ff0-aedf-e2aadef6ccd5n%40ope=
nssl.org</a>.<br />

------=_Part_112287_1850175657.1780053191278--

------=_Part_112286_1224740251.1780053191278--