Thanks Paul for the detailed reply. Let me try this... i will get back to you in case of any doubts...
On Fri, Jul 2, 2010 at 9:26 AM, Paul Richard Ramer <free10...@gmail.com>wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Wed, 30 Jun 2010 15:12:06 +0530, Rahul R wrote: > > I have a request from one of my client that they need me to digitally > > sign their files in my server with my gpg key after encrypting it with > > their key. I am not familiar with this. ie encrypting a file with a key > > and digitally sign it with another key. > > > > The process that we are trying to perform is to encrypt the file with > > the customer’s public key and then sign the file with our private key. > > There is more than one way to do this. You can create (1) an encrypted > and signed file (that is, a file with the encrypted data and the > signature embedded within it) or (2) an encrypted file with the > signature contained within another file. > > Some visual examples: > > (1) Encrypted and (2) Encrypted file and signature file > signed file > +----------------+ +----------------+ +----------------+ > | Signature | | Encrypted data | | Signature | > |----------------| | | | | > | Encrypted data | +----------------+ +----------------+ > +----------------+ > > For (1) let us suppose that you have a file called My_Secrets and you > are encrypting to Fred. To create the encrypted and signed file you > would run the following command: > > gpg --recipients Fred --output My_Secrets.gpg --sign --encrypt My_Secrets > > This command will encrypt the file My_Secrets to Fred, sign it with your > default key (if you have only one key, then that is your default key), > and create an encrypted and signed file with the name My_Secrets.gpg. > If you prefer to write a shorter command, you can rewrite the above > command as follows: > > gpg -r Fred -o My_Secrets.gpg -se My_Secrets > > Now for (2). To create an encrypted file and a signature file, run the > following commands in sequence: > > gpg --recipients Fred --output My_Secrets.gpg --encrypt My_Secrets > gpg --detach-sign My_Secrets.gpg > > What the first command will do is encrypt the file My_Secrets to Fred > and output the result to a file called My_Secrets.gpg. The second > command will sign the file My_Secrets.gpg and output that to a file > called My_Secrets.gpg.sig (even though you didn't specify an output file). > > With all of these examples, you can specify Fred's key using his name, > e-mail address, or key ID. For example: > > gpg --recipient Fred ... > gpg --recipient f...@example.net ... > gpg --recipient 0xBADDEED5 ... > > If any of this is unclear, please post a reply telling us what you > didn't understand. > > Hope this helps you, > > - --Paul > > > - -- > PGP Key ID: 0x3DB6D884 > PGP Fingerprint: EBA7 88B3 6D98 2D4A E045 A9F7 C7C6 6ADF 3DB6 D884 > -----BEGIN PGP SIGNATURE----- > > iQGcBAEBCAAGBQJMLWHEAAoJEJhBiuhgbQLIP2ML/j//xhhyySDlaDW1coLtV1CN > KDvR0bhzI0v/03+0BBgTx7wEhk6LrNxOW9nUEbOaFJ6xvUQ9k0iaxLnBBbgOWU2x > AY7ic8NvWkkNiedj4SL8tE6XjCHXDKChDx2fCtiBdAyRU5sE4vDyWOcrjUqFeu/s > P6ThBVC2QcePx2QsYNgEc0Yu1+I4Q7gbtjiEVlvPWc4y/DrgoKfHDV/FkcRyhJGh > 5wWthtlrhbTukjzefKeSiR/gnguoOx8jGxPeK4fv+4sJDV171gUtaY+xv3l3v6GA > 7OS9C4QfPFjF1pWhZ37CyyvlVamsZJWCsjjohOt5CGvyNTjfGxJXUFNq3flosKOY > hH5wN+zQrV7PGNTLDVopw7rQhQf5uvX7nRfZzgX1CTabscIfxDMsXEqRbrzhwWn0 > dtjlxwXpFZNHopAYB8SNil2eWn4Iip2Wu6Zp+kr7NSmaLGWMCWj8k5tJfKUF89WO > cZD/qJW92C0pAHa4VyBbvIu0LfKjs66sh8ecpOt48w== > =PPDu > -----END PGP SIGNATURE----- > -- Thanks, Regards, Rahul R Mob: 09008030921
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users