Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Oracle's ORA_HASH "random"?

Ora_hash is deterministic in that the keeping the input and seed constant will produce a definite output.

But, for any seed (including the default), will the output of an ora_hash necessarily have the property that:

"No method exists that can be used to predict what the result of an ORA_HASH will be with any level of success higher than purely random guessing?"

like image 291
Jeremy Avatar asked Mar 22 '23 08:03

Jeremy


1 Answers

Probably not, no. ORA_HASH is not designed as a particularly robust hashing algorithm-- it's certainly not something you would use as part of a cryptography library, for example, you'd use the DBMS_CRYPTO.HASH choosing an appropriate algorithm and options. ORA_HASH is designed to distribute items into buckets effectively (i.e. what happens when you hash partition a table) and to be a relatively lightweight hashing algorithm. It is not designed to be secure from attack.

like image 102
Justin Cave Avatar answered Apr 07 '23 14:04

Justin Cave