`core:crypto/sm3` is just one of the many cryptographic hashes that exist in Odin. You've just told me you have never done any cryptographic work like SSL, and how useful that is for things like encrypted web protocols.
As for TGA images, that is an image format that people still use, along with many others Odin supports. We want to be able to load an image regardless of its format, be it PNG, TGA, JPEG, etc.
> You've just told me you have never done any cryptographic work like SSL
I'm no ekr, but I think I've been around quite a bit actually :)
TLS (and before it SSL) was plagued by what we call "national vanity" algorithms. Suppose you're the Swedish government's cryptography team. Your political bosses just found out that literally everyone uses North American cryptography† for HTTPS and they demand to know why there aren't Swedish or at least European cryptographic algorithms they can use instead. You could explain why this is very stupid and risk getting fired - or you could publish some mediocre own brand technology with your country's name on it and hope the politicians are distracted by the next news cycle and go away.
SM3 is one of those "mediocre own brand technologies". Twenty years ago, SSL was largely a product of engineers. An actual cryptographer would be asked to glance over the final result, but they weren't integral to the design work - after all this is engineering right? The engineers assumed that if we have a dozen choices then we can more easily pivot if things go wrong and that'd be meaningfully safer. AES-128 broken? Just use this Italian algorithm I read about last year instead. So the "vanity" algorithms proliferated. But once we had cryptographers in the room they were horrified - these algorithms are basically untested, you'd be largely trusting to luck in using one because nobody knows if they're riddled with unsuspected holes.
Accordingly TLS 1.3 deliberately doesn't provide even the broad smear of somewhat known crypto algorithms that had featured in earlier standards, it focuses on a handful of known good options, knowing that if we can't do any of those we're actually fucked and shouldn't waste our time with whatever some random national vanity algorithm does.
SM3 specifically is a Merkle–Damgård construction, which means it was obsolete when it was made. The SHA-2 family (like SHA-512/256) is the tail end of this design, and SM3 is like those except Chinese. Does it being Chinese matter? Not in the least bit. One day, when we need a new cryptographic hash algorithm we will either use SHA-3 or, more likely use what has been learned since SHA-3 to design a more promising sponge construction, we are not going to ship another Merkle–Damgård hash function.
Because it's a national vanity algorithm it has been certified by the appropriate national authority (China's National Cryptography Administration) and is in fact used nowhere.
So that's why it's weird that Odin decided this should live in its "core" library. You aren't using it for "cryptographic work like SSL". Hopefully it's just stubbed out and isn't actually used anywhere at all.
† RSA was invented by Americans, but technically a British man invented the same algorithm first... for the British government, who kept it secret so it was worthless.
You've misunderstand the purpose of having the suite of cryptographic packages. I agree NO ONE __should__ use SM3, but it exists in the wild and thus people do use it.
The `core:crypto` packages match that of the Botan ones (of which we support in `vendor:botan`). It's not about whether or it's a good algorithm or not, but that it exists.
Using your logic, Botan should remove most of its stuff too, but that would stupid to do.
As for TGA images, that is an image format that people still use, along with many others Odin supports. We want to be able to load an image regardless of its format, be it PNG, TGA, JPEG, etc.