I'm reading rfc5652, there are different references of the two algorithm identifiers. For example in this ASN.1 structure:
SignerInfo ::= SEQUENCE {
version CMSVersion,
sid SignerIdentifier,
digestAlgorithm DigestAlgorithmIdentifier,
signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL,
signatureAlgorithm SignatureAlgorithmIdentifier,
signature SignatureValue,
unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }
There're two types of identifiers: DigestAlgorithmIdentifier
and SignatureAlgorithmIdentifier
.
When using RSA for signing; isn't the digest algorithm represents the hash function used to compute the hash value, that's encrypted using the private key? What's the signing algorithm in this case?