Thanks Dan,

The intention was not to loosen the validation requirements. I will make that 
clearer in the next version. I will also remove the two questionable sentences 
with naturally and benign in the security considerations.

Safecurves states:
“An implementation that receives a compressed point, such as x and just one bit 
of y, will naturally detect invalid inputs when it reconstructs the missing 
coordinate. However, point compression costs some time and, more importantly, 
some implementation effort, again creating a conflict between simplicity and 
security.”
https://safecurves.cr.yp.to/twist.html <https://safecurves.cr.yp.to/twist.html>


The “benign malleability” as discussed in [SEC1] was supposed to refer on 
on-path flipping the sign of the y-coordinate in the key share, but TLS 1.3 
would detect such a change. I will remove this in the next update.


Cheers, 
John 

From: Dan Brown <[email protected]>
Date: Tuesday, 17 January 2023 at 19:04
To: Scott Fluhrer (sfluhrer) <[email protected]>, John Mattsson 
<[email protected]>, [email protected] <[email protected]>
Subject: RE: New Version Notification for draft-mattsson-tls-compact-ecc-00.txt 

Hi John and Scott, 

For even greater clarity, you might want to address these points: 

If the receiver uses an x-only ladder (e.g. Brier-Joye) and re-uses private ECC 
key, then, upon decoding the peer’s compress public key (represented via x), 
the receiver ought to check that x^3+ax+b is a square? [SafeCurves says to do 
check this, but, of course, also adds the twist secure can avoid this check.] 

Actually, it's a little bit tricky to find invalid x where y = 
(x^3+a+b)^((p+1)/4) gives (x,y) of low order. I mentioned this to CFRG: 
https://mailarchive.ietf.org/arch/msg/cfrg/nzxkGIo97GlIGszJirvS_TFUUio/ 
<https://mailarchive.ietf.org/arch/msg/cfrg/nzxkGIo97GlIGszJirvS_TFUUio/> 
Despite this extra wrinkle of difficulty, an attack is avoided by validating a 
decompressed point. (So, I’m not sure if the statement “the implementation will 
naturally detect invalid points when it …” is entirely realistic. [Safecurves 
say this where, by the way?] 

I’m a little confused by the sentence “As not even the sign of the y-coordinate 
is encoded, compact representation avoids ‘benign malleability’ where an 
attacker changes the sign”. Is this about the attack changing (r,s) to (r,p-s)? 
Since r and s are integers, there are no y coordinates in play, the change from 
(r,s) to (r,p-s) is possible regardless of y coordinates. (Ok, there is a 
connection to y coordinates: a point R, of which r is the x coordinate (mod p), 
does implicitly change by way of negating its y coordinate, but R is not sent 
in ECDSA, instead, ECDSA only sends x (via r). I.e. r is already a “compact” 
version of R.) 

Best regards, 
​​​​​ 
Dan 


From: TLS <[email protected]> On Behalf Of Scott Fluhrer (sfluhrer)
Sent: Tuesday, January 17, 2023 11:10 AM
To: John Mattsson <[email protected]>; [email protected]
Subject: Re: [TLS] New Version Notification for 
draft-mattsson-tls-compact-ecc-00.txt 



CAUTION - This email is from an external source. Please be cautious with links 
and attachments. (go/taginfo) 



It looks good; just one comment: 

The current draft says (section 3.2) 
A full validation according to Section 5.6.2.3.3 of 
[SP-800-56A] can be achieved by also checking that 0 ≤ x < p and that 
y^2 ≡ x^3 + a ⋅ x + b (mod p) 
(emphasis added). 

I believe such a validation check should be mandatory. For the curves listed in 
the draft, the corresponding twists are not of prime order; hence someone 
injecting an invalid curve point has some advantage at recovering the peer’s 
secret value (and hence if an implementation reuses ECDHE private values, that 
gives them some advantage at recovering the keys for other sessions). 

Yes, this is not a major point (this relies on the device under attack reusing 
private values, which they’re not supposed to do); on the other hand, the 
expense is fairly minimal (just computing y^2 (after all, you’ve already 
computed x^3+a+b), and the additional complexity needed to perform this check), 
hence I believe it is warranted. 

Alternatively, you can mandate a safe curve (e.g. X25519), which is immune to 
this sort of attack. 

From: TLS <[email protected] <mailto:[email protected]>> On Behalf Of 
John Mattsson
Sent: Monday, January 16, 2023 4:45 PM
To: [email protected] <mailto:[email protected]>
Subject: [TLS] FW: New Version Notification for 
draft-mattsson-tls-compact-ecc-00.txt 



Hi, 

I wrote a draft specifying new optimal fixed-length encodings for ECDHE and 
ECDHA with the NIST P-curves. This seems to be exactly what is needed for cTLS. 
The new encodings are defined as a subset of the old encodings which hopefully 
makes them easy to implement.

Cheers,
John 

From: [email protected] <mailto:[email protected]> 
<[email protected] <mailto:[email protected]>>
Date: Monday, 16 January 2023 at 22:38
To: John Mattsson <[email protected] 
<mailto:[email protected]>>, John Mattsson <[email protected] 
<mailto:[email protected]>>
Subject: New Version Notification for draft-mattsson-tls-compact-ecc-00.txt 


A new version of I-D, draft-mattsson-tls-compact-ecc-00.txt
has been successfully submitted by John Preuß Mattsson and posted to the
IETF repository.

Name: draft-mattsson-tls-compact-ecc
Revision: 00
Title: Compact ECDHE and ECDSA Encodings for TLS 1.3
Document date: 2023-01-16
Group: Individual Submission
Pages: 9
URL: https://www.ietf.org/archive/id/draft-mattsson-tls-compact-ecc-00.txt 
<https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-2659ac42a99efdc1&amp;q=1&amp;e=1649fdc9-4f3d-47a8-9f25-00ae247281ba&amp;u=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2Fwww.ietf.org%2Farchive%2Fid%2Fdraft-mattsson-tls-compact-ecc-00.txt__%3B%21%21JoeW-IhCUkS0Jg%21bXX9aX8L0HIfLffteRT0Z-k17pud7MctUPpkwqCx12ez0wqF93lS8DM_ZM8QIdT8cJithLMJF4TzW1kFGC6OIvKFwWOXceQ%24>
Status: https://datatracker.ietf.org/doc/draft-mattsson-tls-compact-ecc/ 
<https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-5d822dbc2c44fe64&amp;q=1&amp;e=1649fdc9-4f3d-47a8-9f25-00ae247281ba&amp;u=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2Fdatatracker.ietf.org%2Fdoc%2Fdraft-mattsson-tls-compact-ecc%2F__%3B%21%21JoeW-IhCUkS0Jg%21bXX9aX8L0HIfLffteRT0Z-k17pud7MctUPpkwqCx12ez0wqF93lS8DM_ZM8QIdT8cJithLMJF4TzW1kFGC6OIvKFfSA2oIQ%24>
Html: https://www.ietf.org/archive/id/draft-mattsson-tls-compact-ecc-00.html 
<https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-f9a305bbf69d9cf3&amp;q=1&amp;e=1649fdc9-4f3d-47a8-9f25-00ae247281ba&amp;u=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2Fwww.ietf.org%2Farchive%2Fid%2Fdraft-mattsson-tls-compact-ecc-00.html__%3B%21%21JoeW-IhCUkS0Jg%21bXX9aX8L0HIfLffteRT0Z-k17pud7MctUPpkwqCx12ez0wqF93lS8DM_ZM8QIdT8cJithLMJF4TzW1kFGC6OIvKFjWfPvvY%24>
Htmlized: https://datatracker.ietf.org/doc/html/draft-mattsson-tls-compact-ecc 
<https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-3de807429343984d&amp;q=1&amp;e=1649fdc9-4f3d-47a8-9f25-00ae247281ba&amp;u=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2Fdatatracker.ietf.org%2Fdoc%2Fhtml%2Fdraft-mattsson-tls-compact-ecc__%3B%21%21JoeW-IhCUkS0Jg%21bXX9aX8L0HIfLffteRT0Z-k17pud7MctUPpkwqCx12ez0wqF93lS8DM_ZM8QIdT8cJithLMJF4TzW1kFGC6OIvKFWVqX8lA%24>


Abstract:
The encodings used in the ECDHE groups secp256r1, secp384r1, and
secp521r1 and the ECDSA signature algorithms ecdsa_secp256r1_sha256,
ecdsa_secp384r1_sha384, and ecdsa_secp521r1_sha512 have significant
overhead and the ECDSA encoding produces variable-length signatures.
This document defines new optimal fixed-length encodings and
registers new ECDHE groups and ECDSA signature algorithms using these
new encodings. The new encodings reduce the size of the ECDHE groups
with 33, 49, and 67 bytes and the ECDSA algorithms with an average of
7 bytes. These new encodings also work in DTLS 1.3 and are
especially useful in cTLS.




The IETF Secretariat 



________________________________________

This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful. 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
TLS mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/tls

Reply via email to