Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeDisciplina authored Feb 20, 2019
1 parent c1e19f0 commit fd35097
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,25 +145,25 @@ Concrete usage are as follows.
- same as in [LIGHTER](http://jeremy.jean.free.fr/pub/fse2018_layer_implementations.tar.gz), if `[-a]` is not enabled, available logic gates should be explicitly added in this command line (and weight of each gate should be specified in the provided configure file):

--not1

--and2

--nand2

--or2

--nor2

--nand3

--nor3

--xor2

--xnor2

--maoi1

--moai1

- use `sboxn_GC.pre_compute(args);` to precompute the graph, this will expand the graph from the Identity function, with parameters encoded in `args`, and store the generated graph in binary files. For each configuration (the library of gates `-f <file>` and the limitation for precomputation `-c <value>`), this can be done once for all. Thus, if this has been done, the generated binary files are stored and available, we can directly call the search function.
Expand Down Expand Up @@ -293,28 +293,33 @@ Concrete usage are as follows.
- Sorry for the inconvenience again, but for small efficiency gain, bitslicing of the S-boxes is done in little endian byte and little endian bit order (this is inconsistent with that in [LIGHTER](http://jeremy.jean.free.fr/pub/fse2018_layer_implementations.tar.gz)): the least significant value is placed at the leftmost side in memory and, the least significant bit of the value is placed at the leftmost side in the value, e.g., suppose the LUT:

LUT in hexadecimal (**big endian byte** order and **little endian bit** order):

| 0x0 | 0x1 | 0x2 | 0x3 | 0x4 | 0x5 | 0x6 | 0x7 | 0x8 | 0x9 | 0xa | 0xb | 0xc | 0xd | 0xe | 0xf |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 0xc | 0x5 | 0x6 | 0xb | 0x9 | 0x0 | 0xa | 0xd | 0x3 | 0xe | 0xf | 0x8 | 0x4 | 0x7 | 0x1 | 0x2 |

LUT in binary (**big endian byte** order and **little endian bit** order):

| 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 |
| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| 1100 | 0101 | 0110 | 1011 | 1001 | 0000 | 1010 | 1101 | 0011 | 1110 | 1111 | 1000 | 0100 | 0111 | 0001 | 0010 |

In PEIGEN, bitslicing is done as follows:

LUT in binary in memory (**little endian byte** order and **little endian bit** order):

| 1111 | 1110 | 1101 | 1100 | 1011 | 1010 | 1001 | 1000 | 0111 | 0110 | 0101 | 0100 | 0011 | 0010 | 0001 | 0000 |
| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| 0010 | 0001 | 0111 | 0100 | 1000 | 1111 | 1110 | 0011 | 1101 | 1010 | 0000 | 1001 | 1011 | 0110 | 0101 | 1100 |

Bitslicing (**little endian byte** order and **little endian bit** order):

| 1111111100000000 | 1111000011110000 | 1100110011001100 | 1010101010101010 |
| ---------------- | ---------------- | ---------------- | ---------------- |
| 0000111011011001 | 0011011010000111 | 1010011101001100 | 0110010110011010 |

Condensed bitsliced representation (directly indicate memory):

| ff00_f0f0_cccc_aaaa |
| ------------------- |
| 0ed9_3687_a74c_659a |
Expand Down

0 comments on commit fd35097

Please sign in to comment.