Hash functions to generate a one-time pad Maybe this is a newbie question:

Stream cypher, will XOR message bits with one-time pad bits.
Suppose I have a pseudorandom number generator, like a Mersenne Twister or something similar. I could use the pseudorandom string to XOR the message.
Use the password as the seed of the generator. Same password = same pseudorandom sequence.
Could hashing blocks of the pseudorandom sequence create a stronger one-time pad stream?
First things first: a PRNG (Pseudo Random Number Generator) can not provide a one-time pad.

As a reminder: a one-time pad…


has to be truly random, 
must be at least as long as the plaintext, 
is never reused in whole or in part, and
is kept completely secret.


Only when all four points are met, we´re talking about OTP.

Your PRNG idea fails to meet those parameters as it is neither truly random, nor as long as the plaintext. Also, when not using a CSRNG (Cryptographically Secure Random Number Generator), you´re bound to reuse it in part due to the repeating internal state of regular PRNG algorithms.

Example: the “Mersenne Twister” PRNG you mentioned as example is not cryptographically secure. Given a small amount of output, it´s relatively easy to compute all future outputs. In other words: it´s rather predictable and nothing you want to use when it comes to cryptography. Such algorithms were not build to be cryptographically secure! They were designed for things like Monte-Carlo simulations.

Keeping it short (and actively ignoring other potential issues like missing authentication etc.): the security of your “cipher” will stand and fall with the security of your PRNG – which means that whatever you create with a regular PRNG, can not be considered to be cryptographically secure.

Honestly, when I look at the well-vetted options available (various cryptographically secure stream-ciphers, numerous secure block ciphers which can be run in CTR mode, etc.) I can only wonder why you would even think about creating your own, home-brew solution based on some PRNG. You can trust in the fact that trying to create a stream cipher based on a simple PRNG is a really bad idea.

Same goes for your related key generation ideas… there is a reason why pbkdf solutions exist!