Skip to content

crypto/des: error in comment #41398

@kkoogqw

Description

@kkoogqw

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions