Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

In jsbn, what is the correct function of variable DV? #39

Open
gil2gm opened this issue Aug 2, 2019 · 0 comments
Open

In jsbn, what is the correct function of variable DV? #39

gil2gm opened this issue Aug 2, 2019 · 0 comments

Comments

@gil2gm
Copy link

gil2gm commented Aug 2, 2019

in jsbn.js file

// (protected) set from integer value x, -DV <= x < DV

function bnpFromInt(x) {
this.t = 1;
this.s = (x < 0) ? -1 : 0;
if (x > 0) this[0] = x;
else if (x < -1) this[0] = x + DV;
else this.t = 0;
}

what is the correct function of variable DV?, i mean, DV -> this.DV? or x.DV? or the function is correct?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant