Is it secure to hash an AES key? Let's say I want a way of generating a deterministic public ID for a specific symmetric cryptographic key (AES, for example). Would it be secure to use SHA-3 (or SHAKE) to hash the key, and then distribute the hash as the public ID for the secret key?

Is there an advantage or disadvantage to using a larger or shorter hash length relative to the key length? For example, if the key is 256 bits (32 bytes), using a 256 vs 512 bit SHA3 hash?
Would it be secure to use SHA-3 (or SHAKE) to hash the key, and then distribute the hash as the public ID for the secret key?


Sure; SHA-3 and SHAKE are effective uninvertable.  Now, I suppose someone could try various AES keys and see which hashes to the public identity; on the other hand, they could try various AES keys and see which one decrypts the ciphertext properly. We believe that the second is infeasible, and so the first (which requires no less effort) is also infeasible.


  Is there an advantage or disadvantage to using a larger or shorter hash length relative to the key length?


The only disadvantage to using a shorting hash length is that it increases the probability that two different keys that you actually use will end up with the same public identifier (hash).