librelist archives

« back to archive

In-browser PGP

In-browser PGP

From:
jan
Date:
2011-09-04 @ 23:13
 Hi,

 (disclaimer: I'm not a crypto-expert, nor do I know DOM very well. If 
 you find flaws in the idea, please disclose, or even better, fix them)

 for quite some time I'm dreaming about a in-browser PGP solution (not 
 implemented in JS of cause). Actually, just a plug-in/extension that has 
 access to your keyring, and offers a couple of JS functions like sign, 
 validate, encrypt, and so on. Those are just exported and implemented by 
 accessing gnupg libraries and the likes. Of cause accessing these 
 functions will require requesting the user, as it is done with 
 geolocation and the likes. So the idea is, that you have a PGP 
 function-set (binary, exports functions) and a couple of peer-reviewed 
 greasemonkey/whatever script that implements crypto-support for 
 roundcube/gmail/horde/your webmailer.

 Oh, and while we're at it, we should also export the PRNG supplied by 
 our cryptolib.

 What has been done (by other people)
 ------------------------------------

 There is a Firefox Plug-In that adds encryption to Gmail. It has been 
 abandoned, but I believe the crypto-stuff is decent and can be 
 disconnected from the Gmail-stuff and recycled.

 What has to be done
 -------------------

 - recycle crypto-routines from that abandoned plugin
 - set up a website where people can publish their mailers 
 cryptification-scripts
 - provide a few cryptification-scripts as a kickstarter

 Right now I'm in my exams, and afterwards I'm going on holiday, so I 
 won't be developing active for at least a month. If you like the idea, 
 please send feedback though, so this thing starts off.

 -jan

Re: [remailer] In-browser PGP

From:
Crypto Stick
Date:
2011-09-05 @ 00:26
Hi!
The described idea is nice but the biggest drawback is the dependency on
a fat client installation (GnuPG) which is contrary to nearly all
webservices and websites, which could be used with any browser. Because
of this me and a few others are thinking about a browser API to expose
cryptographic functions of the web browser and of smart cards in
particular. Other than GnuPG, smart cards have the advantage to be used
"mobile" without fat client restrictions (beside of device driver). This
would allow users to carry their keys with them and use it on every
computer with every web browser.

We are in an early discussing stage and the API currently looks like:

(string[]) supportedCards () - Unique identifiers of supported cards
(e.g.: OpenPGPv2, OpenPGPv1, CardOS, etc..). If multiple cards of the
same type, a number should be attached to make the identifier unique.
(string[]) supportedHashes () - Returns e.g. SHA-1. MD5, etc..
(string[]) listKeys (intCardID)

(string) signFile (intCardID, intKeyID, stringFilePath)
(string) signString (intCardID, intKeyID, stringInput)

(bool) verifySignedFile (stringKey, stringSignatureWannabe)
(bool) verifySignedString (stringKey, stringSignatureWannabe)

(string) encryptFile (stringKey, stringFilePath)
(string) encryptString (stringKey, stringInput)

(string) decryptFile (intCardID, intKeyID, stringFilePath)
(string) decryptString (intCardID, intKeyID, stringInput)

(string) hashFile (stringFilePath)
(string) hashString (stringInput)

(int) getRandomInt () - take data only from card TRNG
(byte) getRandomByte () - take data only from card TRNG

We didn't decided on particular formats like X.509 or OpenPGP yet but
the API should be generic.

I'm not sure if it's a good idea to integrate GnuPG in a way that it
appears to the browser as a smart card so that it could be used with
this API.

Also you can find some addition links and information related to your
idea at: https://www.privacyfoundation.de/wiki/Ideas

Best regards
Jan

Am 05.09.2011 07:13, schrieb jan:
>  Hi,
> 
>  (disclaimer: I'm not a crypto-expert, nor do I know DOM very well. If 
>  you find flaws in the idea, please disclose, or even better, fix them)
> 
>  for quite some time I'm dreaming about a in-browser PGP solution (not 
>  implemented in JS of cause). Actually, just a plug-in/extension that has 
>  access to your keyring, and offers a couple of JS functions like sign, 
>  validate, encrypt, and so on. Those are just exported and implemented by 
>  accessing gnupg libraries and the likes. Of cause accessing these 
>  functions will require requesting the user, as it is done with 
>  geolocation and the likes. So the idea is, that you have a PGP 
>  function-set (binary, exports functions) and a couple of peer-reviewed 
>  greasemonkey/whatever script that implements crypto-support for 
>  roundcube/gmail/horde/your webmailer.
> 
>  Oh, and while we're at it, we should also export the PRNG supplied by 
>  our cryptolib.
> 
>  What has been done (by other people)
>  ------------------------------------
> 
>  There is a Firefox Plug-In that adds encryption to Gmail. It has been 
>  abandoned, but I believe the crypto-stuff is decent and can be 
>  disconnected from the Gmail-stuff and recycled.
> 
>  What has to be done
>  -------------------
> 
>  - recycle crypto-routines from that abandoned plugin
>  - set up a website where people can publish their mailers 
>  cryptification-scripts
>  - provide a few cryptification-scripts as a kickstarter
> 
>  Right now I'm in my exams, and afterwards I'm going on holiday, so I 
>  won't be developing active for at least a month. If you like the idea, 
>  please send feedback though, so this thing starts off.
> 
>  -jan
> 

Re: [remailer] In-browser PGP

From:
John Preston
Date:
2011-09-04 @ 23:41
On Mon, 2011-09-05 at 01:13 +0200, jan wrote:
> Hi,
> 
>  (disclaimer: I'm not a crypto-expert, nor do I know DOM very well. If 
>  you find flaws in the idea, please disclose, or even better, fix them)
> 
>  for quite some time I'm dreaming about a in-browser PGP solution (not 
>  implemented in JS of cause). Actually, just a plug-in/extension that has 
>  access to your keyring, and offers a couple of JS functions like sign, 
>  validate, encrypt, and so on. Those are just exported and implemented by 
>  accessing gnupg libraries and the likes. Of cause accessing these 
>  functions will require requesting the user, as it is done with 
>  geolocation and the likes. So the idea is, that you have a PGP 
>  function-set (binary, exports functions) and a couple of peer-reviewed 
>  greasemonkey/whatever script that implements crypto-support for 
>  roundcube/gmail/horde/your webmailer.
> 
>  Oh, and while we're at it, we should also export the PRNG supplied by 
>  our cryptolib.
> 
>  What has been done (by other people)
>  ------------------------------------
> 
>  There is a Firefox Plug-In that adds encryption to Gmail. It has been 
>  abandoned, but I believe the crypto-stuff is decent and can be 
>  disconnected from the Gmail-stuff and recycled.
> 
>  What has to be done
>  -------------------
> 
>  - recycle crypto-routines from that abandoned plugin
>  - set up a website where people can publish their mailers 
>  cryptification-scripts
>  - provide a few cryptification-scripts as a kickstarter
> 
>  Right now I'm in my exams, and afterwards I'm going on holiday, so I 
>  won't be developing active for at least a month. If you like the idea, 
>  please send feedback though, so this thing starts off.
> 
>  -jan

Sorry to burst your bubble, but... http://getfiregpg.org/
-- 
Yours sincerely,
John Preston

Re: [remailer] In-browser PGP

From:
Moritz Bartl
Date:
2011-09-05 @ 00:01
On 05.09.2011 01:41, John Preston wrote:
> Sorry to burst your bubble, but... http://getfiregpg.org/

Not at all. FireGPG needs a maintainer, and I think we just found one ;-)


-- 
Moritz Bartl
https://www.torservers.net/

Re: [remailer] In-browser PGP

From:
jan
Date:
2011-09-05 @ 10:44
 On Mon, 05 Sep 2011 02:01:25 +0200, Moritz Bartl wrote:
> On 05.09.2011 01:41, John Preston wrote:
>> Sorry to burst your bubble, but... http://getfiregpg.org/
>
> Not at all. FireGPG needs a maintainer, and I think we just found one 
> ;-)


 Yup, that is the Firefox Extension I was talking about. Apparently the 
 main reason to discontinue the project is the amount of time spent on 
 keeping track with Gmail. That is why I wanted to source this part out 
 and have it in a userscripts.org way.

 I don't use firefox but chromium, so I guess I'll try to port it to 
 chrome. Not now, maybe in a month or so.

 A problem I see, is that most webmailers save drafts automatically, so 
 denying access to the plain text might not be that easy. But well, first 
 I'll need to do the Plugin. But, as I said, not now.

 -jan

Re: [remailer] In-browser PGP

From:
Moritz Bartl
Date:
2011-09-05 @ 00:00
On 05.09.2011 01:13, jan wrote:
>  What has been done (by other people)
>  ------------------------------------

Have you looked at
FireGPG (needs a maintainer) http://getfiregpg.org/

Some strange approaches, but still useful as inspiration (and code
examples) are

Email Clients as Decentralized Social Apps in Mr. Privacy
http://petsymposium.org/2011/papers/hotpets11-final1Fischer.pdf

Scramble! your social network data
http://www.primelife.eu/images/stories/primer/scramble-plb.pdf
http://www.primelife.eu/results/opensource/65-scramble
http://tinyurl.com/scrambleit

-- 
Moritz Bartl
https://www.torservers.net/

Re: [remailer] In-browser PGP

From:
Elsbeth
Date:
2011-09-06 @ 07:03
Hi there,

Am 05.09.2011 um 02:00 schrieb Moritz Bartl:
> On 05.09.2011 01:13, jan wrote:
>> What has been done (by other people)
>> ------------------------------------
>
> Have you looked at
> FireGPG (needs a maintainer) http://getfiregpg.org/

FireGPG is broken since Firefox 4, not just due to a lack of  
maintainer, but also because of missing IPC [1].

>
> Scramble! your social network data
> http://www.primelife.eu/images/stories/primer/scramble-plb.pdf
> http://www.primelife.eu/results/opensource/65-scramble
> http://tinyurl.com/scrambleit
> -- 
> Moritz Bartl
> https://www.torservers.net/


The same might be true for Scramble but haven't tested that yet.

You might also be interested in DomCrypt [2] and Cipherbox [3]

[1] http://blog.getfiregpg.org/
[2] https://wiki.mozilla.org/Privacy/Features/DOMCryptAPISpec/Latest
[3] http://www.cipherbox.org


Cheers,
Elsbeth & Jonah

Re: [remailer] In-browser PGP

From:
Tom Ritter
Date:
2011-09-06 @ 15:59
>
> You might also be interested in DomCrypt [2] and Cipherbox [3]
>
> [2] https://wiki.mozilla.org/Privacy/Features/DOMCryptAPISpec/Latest
> [3] http://www.cipherbox.org
>


Beat me to mentioning these.  There's also a HTML5 element <keygen> [1] I
really don't know anything about.

I'm nervous about putting strong cryptography into the browser because I
think it will lead to a rash of snake-oil or flawed solutions, but building
it into the browser is certainly better than javascript libraries.  It would
be worthwhile to myself and a lot of others I suspect - just to have the
existing and proposed solutions compared in an article so we can see the
differences, advantages, and disadvantages.  And have all the information in
one place with references.

-tom

[1] http://blog.whatwg.org/this-week-in-html5-episode-35 Control+F keygen
gives a lot of link roundups