tum-i4 / sip-oblivious-hashing

7 stars 4 forks source link

New hashable instructions #68

Open mr-ma opened 6 years ago

mr-ma commented 6 years ago

Issue by anahitH Wednesday May 02, 2018 at 17:40 GMT Originally opened as https://github.com/tum-i22/sip-oblivious-hashing/issues/68


Improve instruction coverage by hashing more instructions. The only requirement from hash function is that the value being hashed should be of integer type. Extend current logic of OH to hash any instruction/operand of instruction which is integer. Make sure there is no redundant hashing. E.g. an instruction is used as an argument in multiple instructions, hence is hashed multiple times.

mr-ma commented 6 years ago

Comment by anahitH Friday May 11, 2018 at 23:15 GMT


Updated numbers with new hashable instructions are: tetris - from 26 oh protected to 39, from 30 short range protected to 39 snake - from 28 to 41 short range oh protected instructions, no increase in global oh protected instructions' number 2048 - no increase in global oh numbers, short range oh protected instructions from 70 to 86

mr-ma commented 6 years ago

Comment by mr-ma Tuesday May 29, 2018 at 14:42 GMT


@anahitH ERR. Any value other than int and float is passed to insertHashBuilder Could this be related to your changes?

mr-ma commented 6 years ago

Comment by anahitH Tuesday May 29, 2018 at 14:48 GMT


It can be. This error message is misleading. This means that data independent instruction we are trying to hash is not of integer or floating type, which in principle is not an error. Probably it will be better to change it from ERR to Warning.

mr-ma commented 6 years ago

Comment by mr-ma Tuesday May 29, 2018 at 15:08 GMT


I believe it was meant to have a safe type check before reaching insertHashBuilder. If we cannot handle an arbitrary data type why bother insertHashBuilder?

mr-ma commented 6 years ago

Comment by anahitH Tuesday May 29, 2018 at 15:21 GMT


Agree, it will be more clear if this check is done before calling insertHashBuilder. Anyway this has nothing to do with this issue, right?

mr-ma commented 6 years ago

Comment by mr-ma Tuesday May 29, 2018 at 16:04 GMT


I thought maybe the commit for new hashable instructions (this issue) is causing this error.

mr-ma commented 6 years ago

Comment by anahitH Tuesday May 29, 2018 at 18:53 GMT


I've modified instruction OH instrumentation process to first check the validity of instruction type being hashed. If the type is not integer or float instruction is recorded as "non-hashable" and insertHashBuilder is not called. The error message mentioned above is removed. Instead there is a info/warning message.