-
-
Notifications
You must be signed in to change notification settings - Fork 554
Update "a**b" writting to "a^b" in diffie-hellman description #1933
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
Update "a**b" writting to "a^b" in diffie-hellman description #1933
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request! There seem to be some unrelated files in this PR. Could you remove them from the pull request?
|
||
Bob calculates | ||
|
||
s = A**b mod p | ||
s = A^b mod p | ||
|
||
The calculations produce the same result! Alice and Bob now share | ||
secret s. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to suggest adding a note be added at the end of this document that mentions that in some programming languages **
is used as the method to indicate exponentiations instead of ^
.
I think just replacing one form for another doesn't necessarily clear up the confusion for everyone, just shifts it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might it be better to remove any implementation dependent form and instead use the mathematical form? (i.e. aᵇ
).
That is what is being described after all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard agree with @wolf99 comment. For example, in Python, ^
is used as a set
operator, which is why **
is used for exponentiation. It varies widely by programming language.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wolf99 I like your suggestion, however I worry about how the special character will translate for users. If there is no concern to worry about then 👍 from me too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel exactly like @rpottsoh : would aᵇ
render properly in any IDE for people downloading the exercise through CLI?
I would like to suggest adding a note be added at the end of this document that mentions that in some programming languages
**
is used as the method to indicate exponentiations instead of^
.
The note might just mention that a^b means "a raised to the power of b", or "aaa*...*a" b times", so that the description only uses mathematics and no programming conventions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have other exercises that use them. If an IDE can't display standard characters like that, it's most likely a deliberate choice by the student to use an archaic IDE and make their life hard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thus, I see no reason not to use this notation. I'll make a new commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deliberate choice by the student to use archaic IDE
I use ed
(not always) and it displays it, so I wonder if you mean "IDE that sucks" rather than archaic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of trying to abstract it away:
s = (A to the power of b) mod p
Please squash when we have files like .vs that should never be in the history |
I remembered the request that it be removed from the pull request, and since I saw Erik's approval, I did not bother to check (It was not removed from the pull request, only removed as a file). I did not bother to check that it was actually removed from the request. |
I'm surprised the repo settings even allow anything but squash-merges (cc @iHiD) |
EBWODP: We should have the discussion of acceptable ways to merge elsewhere, in #1934 . It is not apparently from the title of this pull request that it may contain this discussion. |
Who is EBWODP? I do not know what that means, and there seems to be no indication in this forum what that means. |
Ehm, but it was 90617be? There is no such thing as checking in a directory in git, a directory only ever exists if it has files in it. |
You are right Erik, the reference to the vs file was carried over from the prior reference to that as a file, rather than the files in the directory. |
Creation of the diffie-hellman-description-simplifying branch
Rewriting from "a**b" to "a^b" for expressing exponentiation