문제

RSA signature generation is supposed to be modular exponentiation on big numbers; I understand why OpenSSL needs message digest and its size to calculate RSA signature, however, why it is required to know what is message digest algorithm used to generate input value to calculate its modular exponentiation and generate signature?

도움이 되었습니까?

해결책

The signature is calculated from the hash and the hash algorithm formatted as a PKCS#1 v1.5 DigestInfo (See RFC2313, section 10.1.2). This is required, to ensure that the recipient can recalculate the hash themselves to verify the signature, and it must be included in the signature to ensure that the indicated hash algorithm hasn't been changed by an attacker.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top