Skip to content

Conversation

@trackoor
Copy link
Contributor

Since 0<= a,b < p, 0<= add.out < 2p. (1) If 0 <= add.out < p, lt.out = 1 and sub.out = add.out, which means that 0 <= sub.out < p. (2) If p <= add.out < 2p, lt.out = 0 and sub.out = add.out - p, which also means that 0 <= sub.out < p. And because p is a bigint of length k, sub.out[k] must be 0.

Since 0<= a,b < p, 0<= add.out < 2p. (1) If 0 <= add.out < p, lt.out = 1 and sub.out = add.out, which means that 0 <= sub.out < p. (2) If p <= add.out < 2p, lt.out = 0 and sub.out = add.out - p, which also means that 0 <= sub.out < p. And because p is a bigint of length k, sub.out[k] must be 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant