[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-talk] Ideas to securely implement PGP encryption/decryption



I'm jumping into this thread late, and am not replying to a specific
email, I just wanted to add an idea I had a while ago.

1.) First of all, add some basic functions:

Select some encrypted/signed text, right click, select decrypt/verify.
See the results in a XUL window.

Right click a textarea, select "Enter encrypted text", a XUL window pops
up asking for the plain text. You enter that, and the encrypted text is
inserted into the textarea.

Select some text in a textarea, click sign, and see the text replaced by
the signed version.

2.) Make the following functions available to javascript:

window.gnupg.encrypt( callback )
window.gnupg.decrypt( data, callback )
window.gnupg.sign( data, callback )
window.gnupg.verify( data, callback )
window.gnupg.add_public_key( key, callback )

Others?

Whenever one of those operations could cause a privacy leak, such as the
site being able to automatically determine your key id, or determine
whether or not you have a particular public key in your ring, use a XUL
window to ask the user to authorise the request. Any decrypted data
should go into a separate XUL window.

Then, people who write applications like webmail clients can do stuff
like this:

if( "gnupg" in window ){
	thetextarea.onfocus = function(){
		window.gnupg.encrypt( function( ciphertext ){
			thetextarea.value = ciphertext;
		} );
	};
}

Which would mean that if somebody has the addon installed, and clicks
the textarea, window.gnupg.encrypt() would be called, which would spawn
the XUL window where they enter the plain text. Once the user has
entered the plain text, and hit "Save" or whatever, the callback
function would be called with the ciphertext as an argument.

The vast majority of sites, eg GMail wont implement something like this
(at least not at first), but we can do it ourselves by writing
greasemonkey (or similar) plugins.

If it is designed well enough, it could even become a standard one day
and be built directly into browsers.

-- 
Mike Cardwell https://grepular.com/  https://twitter.com/mickeyc
Professional  http://cardwellit.com/ http://linkedin.com/in/mikecardwell
PGP.mit.edu   0018461F/35BC AF1D 3AA2 1F84 3DC3 B0CF 70A5 F512 0018 461F

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
tor-talk mailing list
tor-talk@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk