Idea for secure password hash-likes, is this feasible/usable/workable? (Hand moved from stackoverflow.com,due to suggestion)

Since breaking password hashes has become a new passtime for scriptkiddies, I thought of the problem and came up with a novel(?) idea. 


store the pass as offset+number instead of hash
the number is a product of two large primes
the password is converted into a number , offset is added and that prime is used to divide the number. If it divides AND the divisor is the larger of the two primes the password is correct. 


by definition , each hash is unique and each password can be hashed in many different ways depending on the offset. Breaking one hash means you have to factor the number(which is hard), then find a word which corresponds to a number that is largerprime-offset (which is trivial). 

To generate use function f() to turn password into a password-number (not important) , generate two random primes larger than 2^4096 or however much is enough. Take the larger prime and calculate prime-passwordnumber=offset. Multiply the primes to get "number". store number and offset. 

To check. use function f() to turn password into a password-number, add offset to find prime. divide number with prime to get the other prime. Check that the first prime was the bigger of the two. If so, password was correct. 

f() might be for example utf-8 encoding of the password understood as a large binary integer.
I don't see anything horribly wrong with your proposal.  On the other hand, the obvious question would be "what advantage would this approach have over, say, PBKDF2 with a good salt"?


In your proposal, it is infeasible to recover the password from the hash (short of brute-force); that's also true of PBKDF2.
In your proposal, the hash is randomized (and so the same password doesn't always result in the same hash); that's also true of PBKDF2.


In addition, in your proposal, generating a hash is moderately expensive (it isn't cheap to find large random primes); with PBKDF2, it's no more expensive than validating a password.  I can't see any reason why you'd want to make generating a hash an expensive operation.  

Given that this proposal doesn't appear to have an advantage over well-accepted techniques, I can't recommend it.