From: "ordex (Code Review)"
Date: Tue, 12 Nov 2024 08:26:21 +0000
In-Reply-To:
References:
Reply-To: a@...2181..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, frank@...2641...,
gert@...1296...
Message-ID: <0a187d4df9f8d832aef1ef71a2925be2d0ef7ee6-EmailReviewComments-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="4KyaiGyJq6M="; charset=UTF-8
Subject: [Openvpn-devel] [M] Change in openvpn[master]: Use XOR instead of
concatenation for calculation of IV from implicit IV
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: plaisthos
Cc: cron2 , flichtenheld , openvpn-devel
--4KyaiGyJq6M=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: flichtenheld, plaisthos.
ordex has posted comments on this change. ( http://gerrit.openvpn.net/c/ope=
nvpn/+/797?usp=3Demail )
Change subject: Use XOR instead of concatenation for calculation of IV fro=
m implicit IV
......................................................................
Patch Set 2:
(5 comments)
Commit Message:
http://gerrit.openvpn.net/c/openvpn/+/797/comment/b59359cf_8e31314e :
PS2, Line 12: IV generation code later.
Question: what is the advantage or XOR'ing the IV with the packet ID? And w=
hy is the implicit IV growing from 32bits to 64?
File src/openvpn/crypto.h:
http://gerrit.openvpn.net/c/openvpn/+/797/comment/c99a7cfb_275919d0 :
PS2, Line 168: size_t implicit_iv_len; /**< The length of implicit_=
iv */
why is the len being removed? What is the underlying assumption allowing us=
to drop the len?
My wild wild guess: implicit IV len =3D=3D packet ID size. Is that correct?
http://gerrit.openvpn.net/c/openvpn/+/797/comment/a758a11d_0ceb58dd :
PS2, Line 173: uint8_t implicit_iv[OPENVPN_MAX_IV_LENGTH];
I believe I understand the comment above, but I have troubles combining it =
with OPENVPN_MAX_IV_LENGTH that is 128 bits with OpenSSL.
Does it mean we actually only fill part of the array when using AEAD (i.e. =
32 bits)?
Is this going to change with the new format and become 64 bits?
Is the rest of the array therefore unused?
Maybe this is explained somewhere else, but this comment alone leaves me wi=
th these open questions.
File src/openvpn/crypto.c:
http://gerrit.openvpn.net/c/openvpn/+/797/comment/ae81c136_3aaad761 :
PS2, Line 102: * XOR of packet and implicit IV */
This comment doesn't fully compile. Are you saying that "implicit part =3D =
packet id XOR implcit iv"? If that's the case, I'll rephrase it a bit, like:
"Remainder of IV is the result of packet id XOR'd with impliciti IV (the re=
sult is expected to be unique per session)."
Or something along those lines.
http://gerrit.openvpn.net/c/openvpn/+/797/comment/f435a313_33ac03a7 :
PS2, Line 445: * XOR of packet counter and implicit IV */
same comment as before
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/797?usp=3Demail
To unsubscribe, or for help writing mail filters, visit http://gerrit.openv=
pn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I74216d776d3e0a8dc987ec7b1671c8e8dcccdbd6
Gerrit-Change-Number: 797
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos
Gerrit-Reviewer: flichtenheld
Gerrit-CC: cron2
Gerrit-CC: openvpn-devel
Gerrit-CC: ordex
Gerrit-Attention: plaisthos
Gerrit-Attention: flichtenheld
Gerrit-Comment-Date: Tue, 12 Nov 2024 08:26:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
--4KyaiGyJq6M=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: flichtenheld, plaisthos.
View C=
hange
5 comments:
Question: what is =
the advantage or XOR'ing the IV with the packet ID? And why is the impl=
icit IV growing from 32bits to 64?
File src/openvpn/crypto.h:
Patch Set #2, Line 168: size_t implicit_iv_len; /**< The leng=
th of implicit_iv */
why is the len being removed? What is the underlying assumpt=
ion allowing us to drop the len?
My wild wild guess: implicit IV len =3D=3D packet ID si=
ze. Is that correct?
- =
Patch Set #2, Line 173: uint8_t implicit_iv[OPENVPN_MAX_=
IV_LENGTH];
I believe I understand the comment above, but I have troubles combini=
ng it with OPENVPN_MAX_IV_LENGTH that is 128 bits with OpenSSL.
Does it =
mean we actually only fill part of the array when using AEAD (i.e. 32 bits)=
?
Is this going to change with the new format and become 64 bits?
Is =
the rest of the array therefore unused?
Maybe this is explained somewhere else, but this=
comment alone leaves me with these open questions.
File src/openvpn/crypto.c:
Patch Set #2, Line 102: * XOR of packet and i=
mplicit IV */
This comment doesn't fully compile. Are you saying that "i=
mplicit part =3D packet id XOR implcit iv"? If that's the case, I&=
#39;ll rephrase it a bit, like:
"Remainder of IV is the result of packet id XOR'=
;d with impliciti IV (the result is expected to be unique per session).&quo=
t;
Or somethi=
ng along those lines.
Patch Set #2, Line 445: * XOR of packet counter an=
d implicit IV */
same comment as before
To view, visit =
change 79=
7. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I74216d776d3e0a8dc987ec7b167=
1c8e8dcccdbd6
Gerrit-Change-Number: 797
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <arne-openvpn@...1711...=
27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...=
1...>
Gerrit-CC: cron2 <gert@...1296...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-CC: ordex <a@...2181...>
Gerrit-Attention: plaisthos <arne-openvpn@...220...=
..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...=
41...>
Gerrit-Comment-Date: Tue, 12 Nov 2024 08:26:21=
+0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
--4KyaiGyJq6M=--