Skip to content
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/des: error in comment #41398

Closed
kkoogqw opened this issue Sep 15, 2020 · 2 comments
Closed

crypto/des: error in comment #41398

kkoogqw opened this issue Sep 15, 2020 · 2 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@kkoogqw
Copy link

kkoogqw commented Sep 15, 2020

What version of Go are you using (go version)?

$ go version 1.14.4

Does this issue reproduce with the latest release?

Yes, in the master-branch.

What operating system and processor architecture are you using (go env)?

  • OS: Windows10 (64bit);
  • Arch: amd64
go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\***\AppData\Local\go-build
set GOENV=C:\Users\***\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\***
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,https://proxy.golang.org,direct
set GOROOT=C:\***
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\***\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:***\AppData\Local\Temp\go-build153534510=/tmp/go-build -gno-record-gcc-switches

What did you do?

I found a comment error in src/crypto/des/block.go in line 130:

// block is now b1 b3 b5 b7 b0 b2 b4 b7, the permutation:

What did you expect to see?

I think it should be :

// block is now b1 b3 b5 b7 b0 b2 b4 b6, the permutation:

the last byte may should be "b6" instead of "b7"

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/254980 mentions this issue: crypto/des: fix typo in permuteInitialBlock function comments

@toothrot toothrot changed the title A comment errors crypto/des: A comment errors Sep 15, 2020
@toothrot toothrot changed the title crypto/des: A comment errors crypto/des: error in comment Sep 15, 2020
@toothrot toothrot added this to the Backlog milestone Sep 15, 2020
@toothrot toothrot added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Sep 15, 2020
@toothrot
Copy link
Contributor

/cc @FiloSottile

@golang golang locked and limited conversation to collaborators Sep 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

3 participants