Fwd: Re: Encrypt /decrypta file with ssh keys.

Jack Dodds brmdamon at hushmail.com
Sat Aug 6 03:19:32 AEST 2016

Respectful question:

What would be the advantage of this over GPG, which is expressly
designed for encryption/decryption/signing of files?

Jack Dodds

Colin Leavett-Brown <crlb at uvic.ca> wrote:
> As per Alex's suggestion, attached is the proof of concept
> "sfile" script. If there is anyone out there with great C
> skills who can recreate this functionality "out of the box", I
> think there would be a few happy campers (at least two,
> anyways).
> -------- Forwarded Message --------
> Subject: 	Re: Encrypt /decrypta file with ssh keys.
> Date: 	Fri, 5 Aug 2016 17:24:35 +0100
> From: 	Alex Bligh <alex at alex.org.uk>
> To: 	Colin Leavett-Brown <crlb at uvic.ca>
> CC: 	Alex Bligh <alex at alex.org.uk>
> Colin,
> > On 5 Aug 2016, at 17:03, Colin Leavett-Brown <crlb at uvic.ca> wrote:
> >
> > Hi Alex, I think this should be part of Openssh. Do you want to try the wrapper? I've attached the code and it does exactly what you want. Let us know what you think. "sfile" without any parms will tell you how to use it. Colin.
> I read the code. Interesting. I suspect you will need to
> rewrite it in C (without relying on distro specific things like
> readlink -f) and paying close attention to e.g. minimising
> temporary files, ensuring they are created with the right modes
> and deleted on signals etc. in order to get it submitted. I
> think I might make the magic code longer so it can be more
> easily detected by 'file' etc. But it's an interesting proof of
> concept - TBH I'd just post it to the list as such.
> Alex
> >
> >
> > On 16-08-05 08:50 AM, Alex Bligh wrote:
> >>> On 5 Aug 2016, at 16:30, Colin Leavett-Brown <crlb at uvic.ca> wrote:
> >>>
> >>> Hello,  I needed to share some secret info with one or two specific individuals and wrote a short wrapper script to encrypt/decrypt files using ssh keys (everyone has at least one pair). In searching, I found others wanting this functionality and borrowed heavily from this doc "http://www.czeskis.com/random/openssl-encrypt-file.html" in writing the script. I am willing to share the code if anyone is interested.
> >> I was asking for this functionality only yesterday. My particular use was to encrypt a file with someone else's public key, to send to them so they could decrypt with their private key.
> >>
> >> If ssh (or some accompanying binary) could do this out the box, it would be great.
> >>
> >
> > --
> > Colin Leavett-Brown
> > Physics and Astronomy
> > University of Victoria
> > 250-472-4085
> >
> > <sfile.txt>
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Encryption key for Jack Dodds.asc
Type: application/pgp-keys
Size: 1702 bytes
Desc: not available
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20160805/18620f23/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20160805/18620f23/attachment-0001.bin>

More information about the openssh-unix-dev mailing list