I've been told it is important to use matching DIMMs when installing memory to take advantage of the 128 bit throughput. I'm looking to buy a new 27" iMac (mid 2011) which has 4 memory slots. If I put matching 2x2GB in 2 of the slots and matching 2x4GB in the other two slots, will that reduce its throughput or cause any problems? 

Do all 4 have to match or do each set of 2 need to match?


Question: Understanding one-way hash functions construction
Answer: First, it's important to understand that no one knows how to build a practical hash function that is provably secure.

The stuff you've read about games and advantage are part of a theory for proving schemes secure, but that theory doesn't help you build a provably secure hash function all that much.  Rather, it starts from the assumption that a particular hash function is secure (or a block cipher or stream cipher is secure), and then builds more complicated stuff out of those basic building blocks.  So, that theory doesn't help us design the basic building blocks, like hash functions, in the first place.  (Sometimes the theory is used to help guide the design of the structure of a hash function, where designers build a hash function out of a building block like a compression function.  The designers might use the theoretical analysis to demonstrate that if the compression function is good, then the hash function will be good -- but it doesn't help you with the question of how to design a good compression function.)

For more details on how we know that a hash function is secure, see my answer to a similar question (on the IT Security Stack Exchange site).

Generally speaking, to learn how to build a secure hash function, you start by learning about all of the various attacks on hash functions.  Then, you try to design a hash function that will resist all of those attacks (as well as all others you can imagine).  Therefore, a good starting place for you would be to read about attacks on hash functions.

You could start by reading Chapter 9 of the Handbook of Applied Cryptography.  Also check out Wikipedia's articles on cryptographic hash functions and the Merkle–Damgård construction.
Then, you could read all of the submissions to the NIST hash algorithm competition; most of the submissions should provide a design rationale and security analysis, which should give you a chance to read about some of the attacks on hash functions and design strategies.  They should also cite related papers in the research literature, so next you could read papers in the research literature on hash function cryptanalysis -- you might start by reading the papers cited in the Wikipedia links mentioned above, then proceed to reading papers that are cited in submissions to the NIST competition or that you find through others means.  For instance, it's worth reading about parallel collision search, multicollision attacks, indifferentiability, and the sponge construction.

After several years of study, you'll be well on your way to becoming an expert in hash function cryptanalysis, and then you might be ready to start thinking about designing your own hash function.