Closed Bug 1395833 Opened 7 years ago Closed 7 years ago

Logically dead code in Curve25519

Categories

(NSS :: Libraries, defect, P5)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Sylvestre, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: [CID 1417203], hacl)

Coverity considers that this line is useless        
if (ctr > (uint32_t)0)
            Hacl_Bignum_Fmul_shift_reduce(input);
https://hg.mozilla.org/projects/nss/file/7fcf7848095c/lib/freebl/verified/hacl_curve25519_64.c#l222
because ctr is always > 0:
uint32_t ctr = (uint32_t)5 - (uint32_t)3 - (uint32_t)1;
It probably is. But we won't change this code manually. It's auto-generated and proven to be correct. Dead code gets compiled out.
We'll work with the INRIA folks to improve the code generation to get rid of this. But that might take a while.
I will just ignore it in coverity then :) Do you want to leave it open?

I used to be an Inria engineer, make me happy to see that name here ;)
Let's leave it open so we can track it.
Severity: normal → minor
Priority: P1 → P5
Whiteboard: [CID 1417203] → [CID 1417203], hacl
Coverity didn't pick up the change yet but the offending code is gone.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.35
You need to log in before you can comment on or make changes to this bug.