Symmetric encypher with private key decypher

View: New views
4 Messages — Rating Filter:   Alert me  

Symmetric encypher with private key decypher

by Mikmorg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am looking for a way to use symmetric encryption on a day-to-day basis, using a key-file of some sort to decypher the file. I have decided that using my asymmetric private key in the following way was the best for this, using the following method:

dd if=/dev/urandom bs=1024 count=1 | gpg -c --pasphrase-fd=0 -e -r mikmorg "$1"

Is there a better way to do the above? By better, I mean standard / portable. This is just an idea I threw together, and hope its the best. If anyone has any ideas for me, I would love to hear them.

Also, gpg wouldn't cut-out part of the stdin key from dd (expecting text-only), if it encountered an \r, \n, or \0 character, would it? If thats true, I definitely need to find another method.

Thanks,
 Mike Morgan

Re: Symmetric encypher with private key decypher

by David Shaw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Jan 20, 2007 at 12:57:26PM -0800, Mikmorg wrote:

>
> I am looking for a way to use symmetric encryption on a day-to-day basis,
> using a key-file of some sort to decypher the file. I have decided that
> using my asymmetric private key in the following way was the best for this,
> using the following method:
>
> dd if=/dev/urandom bs=1024 count=1 | gpg -c --pasphrase-fd=0 -e -r mikmorg
> "$1"
>
> Is there a better way to do the above? By better, I mean standard /
> portable. This is just an idea I threw together, and hope its the best. If
> anyone has any ideas for me, I would love to hear them.

Given the above syntax, how would you decrypt?  That is, how are you
saving a local copy of the key for later?

> Also, gpg wouldn't cut-out part of the stdin key from dd (expecting
> text-only), if it encountered an \r, \n, or \0 character, would it? If thats
> true, I definitely need to find another method.

It'll stop after \n.  You can pipe your random key through something
that will escape the \n character if you like.

David

_______________________________________________
Gnupg-users mailing list
Gnupg-users@...
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Re: Symmetric encypher with private key decypher

by Alphax (Wikipedia email) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mikmorg wrote:
> I am looking for a way to use symmetric encryption on a day-to-day basis,
> using a key-file of some sort to decypher the file. I have decided that
> using my asymmetric private key in the following way was the best for this,
> using the following method:
>

I think I sort of get what you are trying to do here:

random key -> encrypt data w/ random key
      |
      V
   encrypt key w/ public key

... which is actually what GPG does with bog-standard public key
encryption! Or do you want something else?

--
                Alphax
        Death to all fanatics!
  Down with categorical imperative!
OpenPGP key: http://tinyurl.com/lvq4g



_______________________________________________
Gnupg-users mailing list
Gnupg-users@...
http://lists.gnupg.org/mailman/listinfo/gnupg-users

signature.asc (554 bytes) Download Attachment

Re: Symmetric encypher with private key decypher

by Robert J. Hansen-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alphax wrote:
> ... which is actually what GPG does with bog-standard public key
> encryption! Or do you want something else?

While I agree with you, I've always wondered: what is the appropriate
ISO standard for bogs, and where can I find an ISO-certified supplier of
them?



_______________________________________________
Gnupg-users mailing list
Gnupg-users@...
http://lists.gnupg.org/mailman/listinfo/gnupg-users