Choosing UWP encryption algorithms
Is the assumption that AES is &quot;best&quot; a valid one, alongside the assumption for AES_GCM?


Opinionated, but Microsoft doesn't implement a lot of modern ciphers, so AES is the tried and true one. If GCM mode is best depends on the use case really, but as it is an authenticated mode - it includes a MAC - it is generally better than e.g. ECB / CBC which aren't.


Is ECDSA actually an encryption algorithm, given the name?


Asking the question is answering it: no it is not. However, using ECIES, you can use the keys both for ECDSA and ECDH, and ECDH enables ECIES, which is an encryption scheme.


Why do the UWP API asymmetric encryption algorithms all reference signing with hashes in their descriptions? Is this really the case, and if so why? Surely if they wanted authentication through signing it would be a separate process?


I don't know, Microsoft webpages are down, I get a 403. Oh, they are up again, and they are as helpful as ever. Off topic here though.


Is OAEP generally considered better than PKCS#1?


PKCS#1 v2.0 is the standard that defines OAEP, so that's a nonsensical question if you take it literally. Yes, generally it is considered more secure than PKCS#1 v1.5, which is what &quot;PKCS#1&quot; usually refers to. Although you could say that this is opinionated as well, at least OAEP has got a proof that it is secure given that RSA is secure.

What is the difference between the ECDSA algorithms which do and don't specify public key size (eg ECDSA_SHA256 vs ECDSA_P256_SHA256)?

That's more of an issue with the API, maybe the P256 one assumes the Certicom named curve with the NIST standardized name. Again, not specified.

What difference do the hash sizes (and public key sizes for ECDSA if relevant) make, and what about if authentication isn't needed (which I guess would be why they're hashing and signing in the first place).

Hashes are used for a lot of things, e.g. OAEP uses them internally as well, but not to authenticate the message. In ECDSA they are used to hash the message, which is then used in signature generation and verification. Generally a larger hash output size / key size means more secure.