I have an API-based service that digitally signs messages with RSA or ECDSA (system decides during runtime). The input is base64 encoded SHA-256 hash and the output is:
- signature of this hash
- signature algorithm, something like: "SHA256WithRSAEncryption" - to indicate if RSA or ECDSA was used by the system.
I now want to add functionality to also allow authentication (using a different certificate pair). For authentication, I don't want users to hash anything, I want the clients to generate random bytes with length (256/8)=32 and pass me the Base64 encoded version of this.
Now I have a problem how to correctly name the signature algorithm since the actual input is not a hash but random bytes. I was thinking like "Raw256WithRSAEncryption" to indicate that it wasn't a hash. But then I started to think if there was some hash algorithm that would actually return the thing itself, something like "Nohash256WithRSAEncryption".