On Mon, 30 Nov 2020 21:07:03 GMT, Valerie Peng <valer...@openjdk.org> wrote:
> > > Based on CurveDB line 141, it seems we uses the first one and discards > > > the rest? Are you sure we keep the last one? > > > Don't have answers for your questions though. > > > > > > Before this change both sect163k1 and sect163r2 have "BD" so both will be > > added to lengthMap and the 2nd one wins out. > > Hmm, ok, I re-read the code and it's true that both are added to the > lengthMap. Actually, non-PD/non-BD entries are added to the length map too if > no entries for such length in length map is present at time of the add() > call, right? Yes, I think that's what "if there are multiple matches for the given size, an arbitrary one is returns" in the comment of `lookup(int)` means. If there is a PD/BD with the same length, the previously added will be substituted anyway. ------------- PR: https://git.openjdk.java.net/jdk/pull/1485