]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/des: correct finalPermutation comment from 4-bit to 64-bit
authorcuishuang <imcusg@gmail.com>
Mon, 15 Dec 2025 02:22:03 +0000 (10:22 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 9 Feb 2026 23:23:40 +0000 (15:23 -0800)
The finalPermutation array operates on a 64-bit preoutput block,
not a 4-bit block. This updates the comment to accurately
reflect the size of the data being processed in the DES
algorithm's final permutation step.

Change-Id: Ib6a5828a2e72d8bc8d04a3d413eaac320c15df15
Reviewed-on: https://go-review.googlesource.com/c/go/+/730020
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>

src/crypto/des/const.go

index a20879d57412da256a0bc737a484ba7488ee498a..eb2e1ec3c1e93ed1d64b0b8190da8c349230d691 100644 (file)
@@ -22,7 +22,7 @@ var initialPermutation = [64]byte{
        1, 9, 17, 25, 33, 41, 49, 57,
 }
 
-// Used to perform a final permutation of a 4-bit preoutput block. This is the
+// Used to perform a final permutation of a 64-bit preoutput block. This is the
 // inverse of initialPermutation
 var finalPermutation = [64]byte{
        24, 56, 16, 48, 8, 40, 0, 32,