Sign the SHA-256 digest with RSA-1024: what size?

I was wondering: 1) if I calculate the digest of some data using SHA-512 =>, which leads to a hash of 64 bytes 2), and then I sign this hash with RSA-1024 =>, so there is a block of 128 bytes, which more than 64 bytes digest

=> does this mean that eventually my signed hash will be 128 bytes?

Thanks so much for any info.

+3
source share
1 answer

In RSA, as indicated by PKCS # 1 , the data to be signed is first hashed by a hash function, then the result is complemented (a more or less complex operation that converts the hash result into a modular integer), and then the RSA mathematical operation is applied to this number. The result is an n-bit integer, where n is the "module" bit length, commonly called the "RSA key size". Basically, for RSA-1024 n is 1024. A 1024-bit integer is encoded as 128 bytes, exactly in accordance with the encoding method described in PKCS # 1 (PKCS # 1 is very readable and not too long).

n- RSA -, m, . , , , n m, . 1024- SHA-512 ( 512- ). 640- SHA-512 ( , 640- RSA - ).

+6

Source: https://habr.com/ru/post/1724726/


All Articles