What do numbers in a crypto algorithm stand for? Is there a convention? What do the numbers stand for in the names of cryptographic functions, for example AES-256, RSA-1024 or SHA-256?

Do they always refer to key sizes, or is it a different measure for every algorithm? 

Is there some convention about this?
In AES-256 and RSA-1024, the numbers refer to the key size. For SHA-256, it refers to the output size. Though there is no hard, fast rule. For example, in the SHA-3 family, there are hash functions with variable length output, SHAKE128 and SHAKE256. The numbers there refer to the security level.

Then again you have secp256k1, the elliptic curve used, among other places, in BitCoin. It's name stands for:


  sec comes from the standard, p means that the curve coordinates are a prime field, 256 means the prime is 256 bits long, k means it is a variant on a so-called Koblitz curve, and 1 means it is the first (and only) curve of that type in the standard.


Then you have hash functions like MD5, which is the 5th version of function designed by Ron Rivest. It's output size is 128 bits. There is also the stream cipher RC4, again by Ron Rivest. There is also an RC2, RC5, and RC6, but I'm not sure where RC1 and RC3 are. :)

From the comments:


  Don't forget SHA-512/224, which is SHA-2 with an internal state of 512 bits and 224 output size, while SHA-224 is SHA-2 with an internal state of 256 bits and an output size of 224 :)