Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
36675daa
Commit
36675daa
authored
May 07, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypto/aes: fix comment
Fixes #3589. R=golang-dev, iant CC=golang-dev
https://golang.org/cl/6190044
parent
dc6ec74f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/pkg/crypto/aes/const.go
src/pkg/crypto/aes/const.go
+2
-2
No files found.
src/pkg/crypto/aes/const.go
View file @
36675daa
...
...
@@ -11,11 +11,11 @@ package aes
// http://www.csrc.nist.gov/publications/fips/fips197/fips-197.pdf
// AES is based on the mathematical behavior of binary polynomials
// (polynomials over GF(2)) modulo the irreducible polynomial x⁸ + x⁴ + x
²
+ x + 1.
// (polynomials over GF(2)) modulo the irreducible polynomial x⁸ + x⁴ + x
³
+ x + 1.
// Addition of these binary polynomials corresponds to binary xor.
// Reducing mod poly corresponds to binary xor with poly every
// time a 0x100 bit appears.
const
poly
=
1
<<
8
|
1
<<
4
|
1
<<
3
|
1
<<
1
|
1
<<
0
// x⁸ + x⁴ + x
²
+ x + 1
const
poly
=
1
<<
8
|
1
<<
4
|
1
<<
3
|
1
<<
1
|
1
<<
0
// x⁸ + x⁴ + x
³
+ x + 1
// Powers of x mod poly in GF(2).
var
powx
=
[
16
]
byte
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment