I don't know WHY you would want to do that, but I don't know WHY NOT to give you an objective answer. Maybe you are trying to understand some crypto basics and want to test how a signature scheme works, I don't know. So, what you need is to sign the HASH, not the document.
Sign process: 1) Generate a hash of the document 2) Sign this hash 3) Send hash, public key and the document for the verifier Verify process: 1) Generate a (new) hash of the document 2) Verify (decrypt) the signed hash 3) Compare result of 1 and 2. If the same, signature is ok. But for any porpouse that is not study and understand signature schemes, forget about this. Go for any of the suggestion other people have given here. Cristian 2010/2/1 Namrata Sorte <namrata.so...@gmail.com> > > How do you want to sign or encrypt this document? Do you want to do it > natively from > word? Or do you want to do this from a Unix command > prompt? What formats do you want > it encrypted in? How will the consumer > decrypt or verify the document? Again, do you want > this to happen from the > command line? Transparently when the user opens the file from the > > filesystem? > > > Thanks all for replying to my thread. > > Ya to be more specific, I want to sign and verify Word Document File and > using command line will be fine for now. For this I am using SHA-1 to > generate hash of the input message, than I want to use RSA for signing this > message digest, which finally will be appended to Word Document containing > the input message. > > So now the problem I am facing here is using OpenSSL rsautl > > OpenSSL> rsautl -sign -in file1.doc -inkey private.pem -out sig > > > > Loading 'screen' into random state - done > RSA operation error 660:error:0406C06E:rsa routines: > RSA_padding_add_PKCS1_type_1:data too large for key size: > .\crypto\rsa\rsa_pk1.c:73: error in rsautl > > > What should I do to fix this error so that it supports long word document > files too? > > Thanks, > Namrata > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager majord...@openssl.org >