mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 12:16:20 +08:00
cipher/hctr: add comments for hctrReductionTable
This commit is contained in:
parent
22358080d5
commit
8213fb98c5
@ -87,6 +87,13 @@ func hctrDouble(x *hctrFieldElement) (double hctrFieldElement) {
|
||||
return
|
||||
}
|
||||
|
||||
// hctrReductionTable is stored irreducible polynomial's double & add precomputed results.
|
||||
// 0000 - 0
|
||||
// 0001 - irreducible polynomial >> 3
|
||||
// 0010 - irreducible polynomial >> 2
|
||||
// 0011 - (irreducible polynomial >> 3 xor irreducible polynomial >> 2)
|
||||
// ...
|
||||
// 1000 - just the irreducible polynomial
|
||||
var hctrReductionTable = []uint16{
|
||||
0x0000, 0x1c20, 0x3840, 0x2460, 0x7080, 0x6ca0, 0x48c0, 0x54e0,
|
||||
0xe100, 0xfd20, 0xd940, 0xc560, 0x9180, 0x8da0, 0xa9c0, 0xb5e0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user