<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div><style id="ms-outlook-ios-style" type="text/css">html {
background-color: transparent;
}

body {
color: #333;
line-height: 150%;
font-family: "-apple-system", "HelveticaNeue";
margin: 0;
}

.ms-outlook-ios-reference-expand {
display: block;
color: #999;
padding: 20px 0px;
text-decoration: none;
}

.ms-outlook-ios-availability-container {
max-width: 500px;
margin: auto;
padding: 12px 15px 15px 15px;
border: 1px solid #C7E0F4;
border-radius: 4px;
}

.ms-outlook-ios-availability-container > .ms-outlook-ios-availability-delete-button {
width: 25px;
height: 25px;
right: -12px;
top: -12px;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAAAXNSR0IArs4c6QAACxpJREFUeAHlnFuMXlUVx/fcOzNtp0ynF0U7hWKrEmKLosZEjUZ9MgZIQBNC0uAtJr745oOJIT74xgskJkQbAlQNJmBMfNDEG0YjEC7GIBQZ6IAI005L79O5+/+dfut0f5dzzt7nu8w37UrWt893zt5rr/U/e6+zL+ucHrcGtLq62q9qd4gnxTeKb6kcc267eEI8Kz4mnhFPi58Rv1g5nunp6VnS8ZVHAqdHPCk+KP6zuBWEHORNinvWNWoYIN4q/o74mLidhHzqob71AxzKij8g/p14LYh6qb97QUM58T7x38TdQOiBPt0FmhQaEf9M3I2EXiNr7tOkBK3pVvGCuJsJ/dCzqVbWWxZxVTygso+InxBz3M2Efuj5SEXvUrqWQloV7lRtT4vfX6rWtS30pqr/uMZp78SqEQ2WgPqQKvmnuKWtaWnFuaWVVbciXl51rk+a9fb2uP6EY80qzL+oHB8RYC8V5vQyRIEloD6tsk965UsdAsyZ+WV35uKyOz+/4uZ0YgmEMqhfyA3397rRoV63eUOf2zzUJxAzMsed/owA+2tokWCwmgVKDcadvLDsZs8vutMXV5zkhepYl08GurENvW5idMCNj/Q5Nb5mKBiwoGoqXe/fZTQCkmNnl9x/Ty+4xZzW0yeLB9WC6Hp0QbLS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2Cd6Ov040O3J06LsV3CKzVpBvqgClPUJQfUcEWO8Dgjoi79UDoaYNp9MeOQPohQJHXfBbHD/NTRDRFooKN2IeLiEyxYh1N0e9t6WmE/hFu4DEr54P1B50MGs2z4E9UMMS0gdDE5eYG9YmsdvygF/rZxBm9/Q2Lgjp/r+vp4zYFS00Nc39cUDi9TPi0TUDZ4X1FCnUjoZfFZqAvekfQd60LUiYFqyLgUaXTlePchMgUwqclLMl3WvtvhCZ2E6EPekHoib4RET9/V7FXk8KVnyqwJJBByI/8DHnHbCkRPm2E/+oWwGpjStHT3wIznXPSe/xWRb4qsCoFDyl9qnJcmBBnTvi0EYC9NLN2PgwfRf3oYYR+kfHwYFDnvxs+FDRIPaDMfHQiaJbJc7U2vJvH85UWB98QLNnOqP4+Jd/jOJTW+g0Lhgf21MNHdeQNC8ARWAymcHIf5X8osVZ01b27AzgC7Holz4nH+B9KDAKvqrfCDBgB9hUdPy4O8l9WjpRFtqvmfUMzXIB9U8cP2v+YFOcf8yYr227sTLHCwexgXb3JasAIsB/oOHgMZuUsxXha2hX/jrQZ3CxgJoe1LSLuCCSLfvteczuWuANXOK3KrDT4ZXIEZA4dsqRXuuRPdD3ah2XJ5DwAEs1C16MV0hXpksznWgSMXz0j1vZ+18FqE2A4/YfFUU9JK7/G6Zuqv9QXQxpNdwpt0YDvN8p0szhoZ6hQYOcyHFZVvDSe+5Z9W9RRCxsU3ydeEnczteQrRy0BUSgdEP+jS9Hqju9n+UgLKL6l9XXx0S4BrTu/zFYDWr/AOig+skagdf83/3zAOBZQvOryRTEf+Donbid15GuS0eOsWlBC/gsl9iW/LP6C+PPi68TN0usS8EcxH6z4be2qZrPCG5XvCFi1FQu8SZ1j6YdXYeC9YuLxiZyGicQltpuoRPiEmJVLwqPgZwXOtNKO0v8BzRAPSFNM7HEAAAAASUVORK5CYII=");
background-size: 25px 25px;
background-position: center;
}

#ms-outlook-ios-main-container {
margin: 0 0 0 0;
margin-top: 120;
padding: 8;
}

#ms-outlook-ios-content-container {
padding: 0;
padding-top: 12;
padding-bottom: 20;
}

.ms-outlook-ios-mention {
color: #333;
background-color: #f1f1f1;
border-radius: 4px;
padding: 0 2px 0 2px;
pointer-events: none;
text-decoration: none;
}

.ms-outlook-ios-mention-external {
color: #ba8f0d;
background-color: #fdf7e7;
}

.ms-outlook-ios-mention-external-clear-design {
color: #ba8f0d;
background-color: #f1f1f1;
}</style>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0">
<!-- This file has been automatically generated. See web/README.md -->
<div>
<div>
<div style="direction: ltr;">Hello,</div>
<div><br>
</div>
<div style="direction: ltr;">I would agree ignoring an (conflicting) option adds confusion. When specifying a curve is a new feature we don’t need to worry about beeing compatible, therefore I would  forbid mixing curve names and keysize at all (even when the
 size matches).</div>
<div><br>
</div>
<div style="direction: ltr;">I guess we cannot remove the option to only pass the keysize (to have the generator pick a curve) to stay compatible. But the chosen curve should be printed, and I would also deprecate this usage.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">I guess clarifying the keysize-only init() method would be a different topic, but something like deprecating it and restricting the selection to „SunEC only selects NIST prime curves“ would be a good thing.</div>
<div><br>
</div>
<div style="direction: ltr;">Gruss</div>
<div style="direction: ltr;">Bernd</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div><br>
</div>
<div class="ms-outlook-ios-signature">
<div style="direction: ltr;">Gruss</div>
<div style="direction: ltr;">Bernd</div>
<div style="direction: ltr;">-- </div>
<div style="direction: ltr;">http://bernd.eckenfels.net</div>
</div>
</div>
<div> </div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="dir="ltr""><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> security-dev <security-dev-bounces@openjdk.java.net> im Auftrag von Xuelei Fan <xuelei.fan@oracle.com><br>
<b>Gesendet:</b> Dienstag, November 6, 2018 7:38 AM<br>
<b>An:</b> Weijun Wang<br>
<b>Cc:</b> security-dev@openjdk.java.net<br>
<b>Betreff:</b> Re: RFR CSR for 8213400: Support choosing curve name in keytool keypair generation
<div> </div>
</font></div>
On 11/5/2018 8:37 PM, Weijun Wang wrote: <br>
> <br>
>> On Nov 6, 2018, at 12:12 PM, Xuelei Fan <xuelei.fan@oracle.com> wrote: <br>
>> <br>
>> On 11/5/2018 7:13 PM, Weijun Wang wrote: <br>
>>> Please take a review at the CSR at <br>
>>> https://bugs.openjdk.java.net/browse/JDK-8213401 <br>
>>> As for implementation, I intend to report an error when -keyalg is not EC but -curvename is provided. If both -curvename and -keysize are provided, I intend to ignore -keysize no matter if they match or not.
<br>
>> Why not use a strict mode: fail if not match. It might be misleading if ignoring unmatched options.
<br>
> <br>
> We can do that, but misleading to what? That we treat -curvename and -keysize the same important?
<br>
> <br>
If the option "-keysize 256 -curvename sect163k1" work, I may think that <br>
the key size if 256 bits. I want to create a 256 bits sect163k1 EC key, <br>
and the tool allows this behavior, so I should get a 256 bits sect163k1 <br>
EC key. Sure, that's incorrect, but I don't know it is incorrect as the <br>
tool ignore the key size. What's the problem of the command, I don't <br>
know either unless I clearly understand sect163k1 is not 256 bits. The <br>
next question to me, what's the key size actually is? 256 bits or 163 <br>
bits? which option are used? It adds more confusing to me. <br>
<br>
We can ignore the -keysize option, but it is complicated to me to use <br>
the tool. <br>
<br>
>> <br>
>>> Another question: in sun.security.util.CurveDB, we have <br>
>>> // Return EC parameters for the specified field size. If there are known <br>
>>> // NIST recommended parameters for the given length, they are returned. <br>
>>> // Otherwise, if there are multiple matches for the given size, an <br>
>>> // arbitrary one is returns. <br>
>>> // If no parameters are known, the method returns null. <br>
>>> // NOTE that this method returns both prime and binary curves. <br>
>>> static NamedCurve lookup(int length) { <br>
>>> return lengthMap.get(length); <br>
>>> } <br>
>>> FIPS 186-4 has 2 recommendations (K- and B-) for a binary curve field size. Do we have a choice?
<br>
>>> In fact, CurveDB.java seems to have a bug when adding the curves: <br>
>>> add("sect163k1 [NIST K-163]", "1.3.132.0.1", BD,... <br>
>>> add("sect163r2 [NIST B-163]", "1.3.132.0.15", BD,... // Another default? <br>
>>> add("sect233k1 [NIST K-233]", "1.3.132.0.26", BD,... <br>
>>> add("sect233r1 [NIST B-233]", "1.3.132.0.27", B,... <br>
>>> and now 163 is sect163r2 and 233 is sect233k1. <br>
>>> I assume we should always prefer the K- one? <br>
>> TLS 1.3 uses secp256r1/secp384r1/secp521r1, no K- curves. <br>
> <br>
> There is no ambiguity for prime curves. <br>
> <br>
>> <br>
>> Do you mean if no -curvename option, there is a need to choose a named curve? <br>
> <br>
> ECKeyPairGenerator::initialize(int) will choose one and keytool will use it. I just meant if we have a bug here and if we should be more public on what curve is chosen.
<br>
> <br>
I see your concerns. <br>
<br>
It might be a potential issue if we use a named curve if no curvename <br>
specified. If the compatibility is not serious, I may suggest supported <br>
named curves only, or use arbitrary curves but with a warning. <br>
<br>
Xuelei <br>
</div>
</body>
</html>