Friday, July 28, 2017

GPG explanation and how to use Ruby GPGME

I made a Ruby::GPGME example implementation code:

https://github.com/keitaroemotion/gpgme_sample

GPG workflow is very simple.

 The one who decript the document has to generate the key pair first. So:

1. decryptor generate the gpg key pair. ($gpg --gen-key)
2. decryptor send the public key (1.) to the encryptor.
3. encryptor encrypt the document with the public key(2.) and send that encrypted document(cipher) to decryptor.
4. decryptor decrypt the cipher (3.) with the private key he generated earlier (1.)

Yet this does not include the sign ( I recognize it as sort of additional salt value), and sign part is a little bit not easy for me yet it take both private and public keys.







Im so sleepy so now  i have to go to bed

No comments:

Post a Comment