Posts  / #POST-212682
REDDIT

Floor division in RSA key generation?

A
Nov 19, 2025 · 20:40

Greetings all! This is my very first post.

I'm working to add RSA to a data encryption system which I am authoring in Forth. This as a retirement hobby project. When finished I will put it into the public domain. Please kindly affirm or correct my understanding with respect to floor division.

I presently have a single, unified algorithm which accepts two big-int numbers, generating from them three outputs: their Greatest Common Factor, Bezout's Identities X and Y, plus also their Modular Multiplicative Inverse.

For the GCF and Bezout's Identities ordinary (non-floor) division is used, quotient rounding toward zero. Yes or no?

But for the MMI, floor division is employed, quotient rounding toward negative infinity. Yes or no?

Thanks in advance.