|
63 | 63 | (11) 37 (45) 37 (59) 52 (62) 67 |
64 | 64 | >> readonly def |
65 | 65 |
|
| 66 | +/auspost.rsprod { |
| 67 | + 64 mul add rstable exch get |
| 68 | +} bind def |
| 69 | + |
66 | 70 | /auspost.latevars dup 8 dict def load /init { |
67 | 71 |
|
68 | 72 | currentglobal |
@@ -98,13 +102,17 @@ begin |
98 | 102 | % |
99 | 103 | /rspoly [ 1 0 0 0 0 ] def |
100 | 104 | 1 1 4 { % i |
101 | | - 1 1 index bitshift % t = 2^i |
| 105 | + 1 1 index bitshift % t = 2^i |
102 | 106 | exch -1 1 { % j = i -> 1 |
103 | | - rspoly 1 index 2 copy 1 sub get % ... rsploy j rsploy[j-1] |
104 | | - rstable rspoly 6 -1 roll get 64 mul 5 index add get % p = rsploy[j] * t |
105 | | - xor put % rspoly[j] = rsploy[j-1] ^ p |
| 107 | + rspoly 1 index 2 copy 1 sub get % ... rsploy j rsploy[j-1] |
| 108 | + rspoly 5 -1 roll get % ... rsploy[j] |
| 109 | + 4 index % ... t |
| 110 | + //auspost.rsprod exec % p = rsploy[j] * t |
| 111 | + xor put % rspoly[j] = rsploy[j-1] ^ p |
106 | 112 | } for |
107 | | - rspoly 0 rstable 64 rspoly 0 get mul 4 index add get put % rspoly[0] = rspoly[0] * t |
| 113 | + rspoly 0 2 copy get % ... rspoly 0 rspoly[0] |
| 114 | + 3 index % ... t |
| 115 | + //auspost.rsprod exec put % rspoly[0] = rspoly[0] * t |
108 | 116 | pop % t |
109 | 117 | } for |
110 | 118 | /rspoly rspoly readonly def |
@@ -255,9 +263,11 @@ begin |
255 | 263 |
|
256 | 264 | rscodes length 5 sub -1 0 { % i |
257 | 265 | 0 1 4 { % j |
258 | | - rscodes 2 index 2 index add 2 copy get % ... rscodes i+j rscodes[i+j] |
259 | | - rstable rspoly 6 -1 roll get 64 mul rscodes 6 index 4 add get add get % p = rspoly[j] * rscodes[i+4] |
260 | | - xor put % rscodes[i+j] = rscodes[i+j] ^ p |
| 266 | + rscodes 2 index 2 index add 2 copy get % ... rscodes i+j rscodes[i+j] |
| 267 | + rspoly 5 -1 roll get % ... rspoly[j] |
| 268 | + rscodes 5 index 4 add get % ... rscodes[i+4] |
| 269 | + //auspost.rsprod exec % p = rspoly[j] * rscodes[i+4] |
| 270 | + xor put % rscodes[i+j] = rscodes[i+j] ^ p |
261 | 271 | } for |
262 | 272 | pop % i |
263 | 273 | } for |
|
0 commit comments