News for hackers. Stuff that matters.
Re:Encrypt your e-mail with PGP and random profanity by meowface on Saturday November 15, 2014 @06:45PM (#8612996)
As far as I can tell, this is mapping each base64 character of the encrypted blob to one full word? This will obviously multiply the message size a great deal.
Re:Encrypt your e-mail with PGP and random profanity by TazeTSchnitzel on Saturday November 15, 2014 @06:52PM (#8613008)
Mapping each base64 char to one word seems rather inefficient. If you have a longer list of N swears (say 256 because it's the size of a byte, making encoding easier), you could produce a more efficient base-N encoding, e.g.:

  var bytes = atob(base64msg),
      swearsMsg = '';
  for (var i = 0; i < bytes.length; i++) {
      newMsg += swears[bytes[i].charAt(0)] + ' ';
  }
Of course, it's still less efficient than base64, but it's an improvement. :)
Re:Encrypt your e-mail with PGP and random profanity by meowface on Saturday November 15, 2014 @07:16PM (#8613059)
Yep, that would be a little better.

I suppose you can't get much better than that unless you can come up with hundreds or thousands more swears.

Re:Encrypt your e-mail with PGP and random profanity by TazeTSchnitzel on Saturday November 15, 2014 @07:20PM (#8613067)
Well, for some X there's always a base-2^X encoding you could use. If you can find 512 swears, you could do base-512. You don't actually have to do a base-2^X encoding, but that's more convenient as it means you're encoding X bits with each "digit".

But yeah, I'm not sure there are that many recognisable swear words in English. Unless you count massive compounds, but now all your words are really long, so you haven't gained anything.

Re:Encrypt your e-mail with PGP and random profanity by mapmeldo on Saturday November 15, 2014 @07:45PM (#8613115)
yes, originally I was thinking 256. Unfortunately it's difficult to reach 256 without adding hate/vitrol/racist language
Re:Encrypt your e-mail with PGP and random profanity by TazeTSchnitzel on Saturday November 15, 2014 @07:49PM (#8613120)
Ah, I see the problem. An awful lot of profanities are ethnic/racial/other minority slurs.

Perhaps some foreign-language and more obscure (dialectal?) English swear words could be used? With crowd-sourcing I'm sure we could reach 256.

Re:Encrypt your e-mail with PGP and random profanity by mapmeldo on Saturday November 15, 2014 @07:54PM (#8613125)
as it was, I needed to make a call for swears and look up some different dictionaries to fill up this project

People are somewhat reluctant to share their profanity on GitHub

Re:Encrypt your e-mail with PGP and random profanity by TazeTSchnitzel on Saturday November 15, 2014 @07:56PM (#8613131)
Make that call here and now on Hacker News, while this still has attention and is on the front page, and I'm sure you'll get contributions!

I suggest putting at the top-level of this comments section, so it gets more attention.

Re:Encrypt your e-mail with PGP and random profanity by betenoire on Saturday November 15, 2014 @09:41PM (#8613310)
add filler words and turn them into sentences?