Hello! everyone,
I need to digitally sign text files, how to do this, follow my requirements:

1 - apply the MD5 one-way function only once in the entire file. The result will be a code of 128 bits or 16 ASCII characters, corresponding to a 32 digit hexadecimal number. Should be used in the calculations the hexadecimal number, considering it as a single block;

2 - create a private key of 1024 bits, equivalent to a 256-digit hexadecimal number, known only from a developer;

3 - encrypt the hex code generated as provided in Section 1, using the key referred to in item 2, the RSA public key;

4 - with the outcome of the procedure described in item 3 will retrieve a hexadecimal number with up to 256 digits to be reported in field 02 of the registry type EAD.


Can someone help me?