Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void doBlockRound(byte[] key, byte[] keyParams, byte[] data, byte[] output) {
- short execute = Util.Random(1,2);
- if (execute == 1) {
- confuse();
- // Do actual crypto
- } else if (execute ==2) {
- // Do actual crypto
- confuse();
- }
- }
- private void confuse() {
- short state = Util.Random(1,3);
- if (state == 1) {
- byte[] dummy = toBytes(Util.Random(0, key.length)); //Random write
- } else if (state == 2) {
- // Some random compute like XORs and ANDs and Shifts
- } else if (state ==3) {
- byte[] dummy = toBytes(Util.Random(0, key.length)); //Random write
- // Some random compute like XORs and ANDs and Shifts
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement