-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crypto/rsa: doc: reword "coprime to" in doc comments #31721
Comments
Data point: I've always heard and said "x coprime to y". I don't recall ever hearing "x prime to y". cc: @FiloSottile |
@jimmyfrasche The more familiar utterance is "relatively prime to y", although my source text does not mention it |
I've usually heard it said as “X is co-prime with Y”, which follows from the general pattern in English of “X and Y are Z” being often interchangeable with “X is Z with Y”. The usage queried here follows by combining that with another general pattern in 21st century English: to replace “with” with “to” in most common phrase patterns. |
Bourbaki, N. (2003). Algebra II: Chapters 4-7. Berlin: Springer-Verlag. A. VI. 14 I think it's fine the way it's currently written. |
Stewart's text was published in 2015, and authors under the Bourbaki pen name publish their books in French. Is your 2003 source a translation of their original work? |
It is, yes, of their work in 1990, but that is only example. A google scholar search for Taking a look at the original RSA paper, the terminology used is actually "x is relatively prime to y". I suspect that "x is coprime to y" became popular because of its terseness, as well as its ability to clearly communicate that these values are not individually prime. If we were to change anything, I'd gravitate toward "is relatively prime to". |
This seems like an agreeable compromise. |
I found this paragraph in the
crypto/rsa
docs:https://github.com/golang/go/blob/master/src/crypto/rsa/rsa.go#L187-L191
It is a mistake to say
x
is coprime toy
, because co and to convey the same thing. A numberx
,y
can be coprime, but we sayx
is prime toy
.This is explicitly stated by Stewart in Galios Theory 3rd Edition (ISBN 1-58488-393-6), in Definition 3.14 on the topic of coprimes.
The text was updated successfully, but these errors were encountered: