RNG interesting idea

I've been reading (a dangerous pastime I know), and I read that there are eight variances on xorshift generators,(plus a few redundant ones)

i.e.
a1 is x ^= x << a; x ^= x >> b; x ^= x << c;
vs
a2 is x ^= x >> a; x ^= x << b; x ^= x >> c;

other varieties shuffle around a, b, and c. Some varieties have the "<<" operator go in the same direction on the first two statements then flip on the third statement.

In any case, all I have seen so far would use only the same generator each time it is called.


So I had the idea, would it add any value or quality to the results, if generator were to have multiple generators of different varieties operating on the same seed, and each call uses a different generator? (I.E. first call uses version A, second call uses version B, third call uses version C, etc)

For example, the basic xorshift generator are said to be good for noncryptographic uses (not sure about the plus or star varieties), so would this alteration increase the quality to cryptographic standards, particularly when used with plus or star varieties?

A neat thing about it is that if this would increase the quality, it would do so without increase the speed of use by much (as choosing which variety to use each pass would be the only addition to the time).

What do you all think?
Last edited on
When you speak about plus or star. Do you mean adding or multiply? They are not symetric, i.e. you cannot reconstruct the result.

The problem of encryption without a key is that no matter how sophisticated your encryption is, the attacker is always able to disassemble the programm and see how it is done.
Plus or star refers to advanced versions of the basic generator,
basic is xorshift
plus is xorshift+
star is xorshift*
each usually has a number indicating the bits of state,
I.E. I'm using a xorshift1024* seeded by a xorshift128+

Besides, aren't the only usable digital encryption programs asymmetric so the unlocking key is different from the locking key? Then would it really matter if the generator was symmetrical?

In any case, I was really only refering to the quality of the output. Some generators are noted as having output that is not suitable for encryption, so I used that as a reference and not specifically in terms of planning. I'm really just having fun building my generator class with distributions, ability to handle floats and negative values, etc. I'll let others worry about the specifics of encryption.
Topic archived. No new replies allowed.