usubalang / usuba

A programming language to write bitsliced ciphers
https://usubalang.github.io/usuba
MIT License
56 stars 11 forks source link

CSE used on `table` #53

Open pedagand opened 2 years ago

pedagand commented 2 years ago

It seems that CSE is used on something not quite usuba0 on chacha20, which makes this special case necessary:

https://github.com/usubalang/usuba/blob/main/src/optimization/CSE.ml#L121

DadaIsCrazy commented 2 years ago

This should be unrelated to Chacha20, as it does not use perm nor table.

I'm not sure why there is a perm special case, but the table one is here because Usuba can keep tables throughout the pipeline when the option --keep_tables is used, which is not valid according to any official documentation of Usuba's semantics, but is useful for debugging (for instance, for photon_vsliced or skinny_vslice).

pedagand commented 2 years ago

Indeed, it's on Photon and Skinny. Apologies!