Szycho
Szycho

Reputation: 1

How to create digital signature(RSA) of file's checksum?

Welcome! My job is to implement digital signature. I've read everything about creating public and private key but I'm stuck with this silly thing. How do I encrypt this checksum(SHA256) using RSA algorithm? I mean part: c(m) = m ^ e mod n. Should I convert this checksum(which is HEX?) to int, so that then I can compute ^e mod n?

Upvotes: 0

Views: 1529

Answers (1)

You don't encrypt the checksum but sign it. If you use C#, take a look at RSACryptoServiceProvider class, in particular in MSDN's Cryptographic Signatures section which contains detailed description of the process.

However it seems that you are reinventing the wheel and going too low-level. Maybe higher-level libraries like BouncyCastle or free CryptoBlackbox package of our SecureBlackbox will be easier to use.

Upvotes: 1

Related Questions