Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 418 lines (312 sloc) 13.291 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417
<!DOCTYPE html>
<html>

  <head>

    <title>CryptBro</title>

<!-- <link rel="stylesheet" href="./css/jquery.mobile.structure-1.0.1.min.css" /> -->
    <link rel="stylesheet" href="./css/jquery.mobile.structure-1.1.0-rc.1.min.css" />
    <link rel="stylesheet" href="./css/cryptbro.jquerymobile.css" />
    <link rel="stylesheet" href="./css/cryptbro.css" />

    <link rel="apple-touch-icon" href="./css/images/cryptbro.icon.png" />
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />

    <script src="./js/head.load.min.js"></script>
    <script type="text/javascript">

      head.js(
      "./js/jquery-1.7.1.min.js",
      "./js/jquery.mobile-1.1.0-rc.1.min.js",
      "./js/crypto-deflate.js",
      "./js/ssrpc.client.min.js",
      "./js/cryptbro.min.js"
      );

    </script>

  </head>

  <body class="loading">

    <div data-role="page" data-theme="a" id="message">
      
      <!--header-->

      <div data-role="header" id="mainheader">

<div id="headercontainer">
<h1>CryptBro</h1>
</div>

<a href="javascript:CryptBro.ui.page('login')" data-theme="a"
data-transition="fade" class="login ui-btn-left"><span class="loginbutton">Login</span></a>

<a href="javascript:CryptBro.ui.page('help')" data-icon="info" data-theme="b"
data-transition="fade" class="help ui-btn-right">Help</a>

      </div>

      <div data-role="navbar" class="loggedout">
<ul>
<li><a href="javascript:CryptBro.ui.page('message')" class="message" data-transition="none" data-theme="b">Message</a></li>
<li><a href="javascript:CryptBro.ui.page('options')" class="options" data-transition="none">Options</a></li>
</ul>
      </div>
      <div data-role="navbar" class="loggedin">
<ul>
<li><a href="javascript:CryptBro.ui.page('message')" class="message" data-transition="none" data-theme="b">Message</a></li>
<li><a href="javascript:CryptBro.ui.page('options')" class="options" data-transition="none">Options</a></li>
<li><a href="javascript:CryptBro.ui.page('inbox')" class="inbox" data-transition="none">Inbox</a></li>
</ul>
      </div>
      
      <!--end header-->

      <div data-role="content" >

<div data-role="controlgroup" data-type="horizontal" class="half-width-buttons" id="cryptmethod">
<button data-theme="b" id="encrypt">Encrypt</button>
<button data-theme="a" id="decrypt">Decrypt</button>
</div>

<form id="crypt" action="" data-ajax="false">

<div>
<label for="key" class="ui-hidden-accessible">Key</label>
<input type="password" id="key" name="key" placeholder="Key" />
</div>
<div class="loggedin">
<label for="to" class="ui-hidden-accessible">To (leave blank for anonymous)</label>
<input type="text" id="to" name="to" placeholder="To (leave blank for anonymous)" />
</div>
<div>
<label for="message" class="ui-hidden-accessible">Message</label>
<textarea name="message" placeholder="Message"
id="message"></textarea>
</div>

</form>

      </div>
      
      <div data-role="footer" data-position="fixed" id="footer">
<div class="ui-grid-a full-width-buttons">
<div class="ui-block-a"><button data-theme="c" data-mini="false" id="crypt">Crypt</button></div>
<div class="ui-block-b"><button data-theme="a" data-block="true" id="reset">Reset</button></div>
</div>

      </div>
    </div>
    
    <!--end #message-->

    <div data-role="page" data-theme="a" id="options">
      
      <!--header-->

      <div data-role="header" id="mainheader">

<div id="headercontainer">
<h1>CryptBro</h1>
</div>

<a href="javascript:CryptBro.ui.page('login')" data-theme="a" class="login ui-btn-left"><span class="loginbutton">Login</span></a>

<a href="javascript:CryptBro.ui.page('help')" data-icon="info" data-theme="b" class="help ui-btn-right">Help</a>

      </div>

      <div data-role="navbar" class="loggedout">
<ul>
<li><a href="javascript:CryptBro.ui.page('message')" class="message" data-transition="none">Message</a></li>
<li><a href="javascript:CryptBro.ui.page('options')" class="options" data-transition="none" data-theme="b">Options</a></li>
</ul>
      </div>
      <div data-role="navbar" class="loggedin">
<ul>
<li><a href="javascript:CryptBro.ui.page('message')" class="message" data-transition="none">Message</a></li>
<li><a href="javascript:CryptBro.ui.page('options')" class="options" data-transition="none" data-theme="b">Options</a></li>
<li><a href="javascript:CryptBro.ui.page('inbox')" class="inbox" data-transition="none">Inbox</a></li>
</ul>
      </div>
      
      <!--end header-->

      <div data-role="content" >

<div data-role="fieldcontain">

<label for="save">Save messages on server?</label>
<select name="save" id="save" data-inline="true" data-role="slider">
<option value="no">no</option>
<option value="yes" selected="selected">yes</option>
</select>

</div>

<div data-role="fieldcontain">

<label for="expire">Messages expire in:</label>

<select name="expire" id="expire">
<option value="3600">1 hour</option>
<option value="86400">1 day</option>
<option value="259200" selected="selected">3 days</option>
<option value="604800">1 week</option>
<option value="2592000">30 days</option>
<option value="-1">Never</option>
</select>

</div>

      </div>

    </div>

    <!--end #options-->
    
    <div data-role="page" data-theme="a" id="inbox">
      
      <!--header-->

      <div data-role="header" id="mainheader">

<div id="headercontainer">
<h1>CryptBro</h1>
</div>

<a href="javascript:CryptBro.ui.page('login')" data-theme="a" class="login ui-btn-left"><span class="loginbutton">Login</span></a>

<a href="javascript:CryptBro.ui.page('help')" data-icon="info" data-theme="b" class="help ui-btn-right">Help</a>

      </div>

      <div data-role="navbar" class="loggedout">
<ul>
<li><a href="javascript:CryptBro.ui.page('message')" class="message" data-transition="none">Message</a></li>
<li><a href="javascript:CryptBro.ui.page('options')" class="options" data-transition="none">Options</a></li>
</ul>
      </div>
      <div data-role="navbar" class="loggedin">
<ul>
<li><a href="javascript:CryptBro.ui.page('message')" class="message" data-transition="none">Message</a></li>
<li><a href="javascript:CryptBro.ui.page('options')" class="options" data-transition="none">Options</a></li>
<li><a href="javascript:CryptBro.ui.page('inbox')" class="inbox" data-transition="none" data-theme="b">Inbox</a></li>
</ul>
      </div>
      
      <!--end header-->

      <div data-role="content" >

<div id="inboxmessages"></div>

      </div>

    </div>

    <!--end #inbox-->

    <div data-role="dialog" id="login" data-theme="a">

      <div data-role="header">
<h1>Login</h1>
      </div>

      <div data-role="content">

<div class="center">
<p>Don't have an account yet?</p>
<a href="javascript:CryptBro.ui.page('register')" data-role="button" data-theme="b">Register!</a>
</div>

        <form id="login" action="" data-ajax="false">
<div data-role="fieldcontain">
<div>
              <label for="username" class="ui-hidden-accessible">Username</label>
              <input type="text" id="username" name="username" placeholder="Username" />
</div>
<div>
              <label for="password" class="ui-hidden-accessible">Password</label>
              <input type="password" id="password" name="password" placeholder="Password" />
</div>
          </div>
<div data-role="fieldcontain">
<input type="submit" value="Login" id="loginbutton" />
</div>

</form>

      </div>

    </div>
    
    <!--end #login-->

    <div data-role="dialog" id="register" data-theme="a">

      <div data-role="header">
<h1>Register</h1>
      </div>

      <div data-role="content">

        <form id="register" action="" data-ajax="false">
<div data-role="fieldcontain">

<p>Registration is free. It allows you to leave messages
for other users and be notified when they leave messages
for you.</p>

<div>
              <label for="rusername" class="ui-hidden-accessible">Username</label>
              <input type="text" id="rusername" name="rusername" placeholder="Username" />
</div>
<div>
              <label for="password1" class="ui-hidden-accessible">Password</label>
              <input type="password" id="password1" name="password1" placeholder="Password" />
</div>
<div>
              <label for="password2" class="ui-hidden-accessible">(again)</label>
              <input type="password" id="password2" name="password2" placeholder="(again)" />
</div>
<div>
              <label for="email" class="ui-hidden-accessible">Email address</label>
              <input type="text" id="email" name="email" placeholder="Email address" />
</div>
          </div>
<div data-role="fieldcontain">
<input type="submit" value="Register" id="registerbutton" />
</div>

</form>

      </div>

    </div>
    
    <!--end #register-->
    
    <div data-role="page" id="help" data-theme="a">
      
      <div data-role="header">
<h1>CryptBro Help</h1>
      </div>
      
      <div data-role="content" data-theme="a">
<h2>What is CryptBro?</h2>

<p>
CryptBro is a tool for sharing encrypted messages. All
encryption is performed on your own computer using the
<a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a>
encryption algorithm, used by the US Government and SSL
servers everywhere for secure communications. You can be
quite sure no one but the intended recipient can read your
message, as long as common-sense security protocols are
followed.
</p>

<h2>How does it work?</h2>

<p>
It's quite simple. There are two modes of operation, Encrypt
and Decrypt. To encrypt a message, click Encrypt, pick a
passphrase for your shared key, type your message, and click
Crypt. Your message is first encrypted, then the encrypted
message is sent to the server to be saved. You are then
given a URL which you can send to the recipient where they
can read the message.
</p>

<p>
When your recipient opens the link you've sent them, they
are shown the encrypted text. They will then type the key
you've shared with them, and click Crypt.
</p>

<p>
You also have the option of registering. If you do so,
you'll be able to send and receive messages with other users
without needing to share links. Simply have them check their
Inbox.
</p>

<h2>
How can I be sure it's secure? Are you sure nobody can read
my message?
</h2>

<p>
Nothing is transmitted to the server in plaintext. Because
all encryption is performed on your own computer, you can be
sure the message is as secure as your computer is, as long
as common-sense security protocols are followed.
</p>

<p>
To know if your message is secure, start by asking yourself
these questions:
</p>

<ul>
<li>"Is my key based on a dictionary word or something easy
to guess?"</li>
<li>"Are there any spyware or keyloggers on my system?"</li>
<li>"Could anyone have access to the key that shouldn't?"</li>
</ul>

<p>
Answering negatively to these and perhaps other questions
should assure you of your message's security.
</p>

<h2>What's the deal with logging in? What info do you want from me?</h2>

<p>
We don't want any of your info! Logging in is purely
optional and only serves to facilitate sharing messages
between users. If you choose to register, you'll enter a
username, password, and email address. We don't verify the
address. We send you a message when you join and when
another user sends you a message so you know to pick it up.
</p>

<h2>What's really going on under the hood?</h2>

<p>
Once you've entered your key and message and submit the
form, CryptBro takes the key
and <a href="http://en.wikipedia.org/wiki/Key_stretching">stretches</a>
it using
the <a href="http://en.wikipedia.org/wiki/PBKDF2">PBKDF2</a>
algorithm. With this key, it then makes
an <a href="http://en.wikipedia.org/wiki/HMAC">HMAC</a>
          <a href="http://en.wikipedia.org/wiki/Hash_function">hash</a>
of the message. Finally, the message is AES encrypted. The
encrypted message, the HMAC hash, and the
<a href="http://en.wikipedia.org/wiki/Salt_(cryptography)">salt</a>
for the stretched key are rolled up together, and sent to
the server for storage (if the user does not disable
server-side storage).
</p>

<p>
On the decryption side, CryptBro takes the rolled-up
message, gets the salt, and stretches the key to obtain the
same stretched key it was encrypted with. It then makes an
HMAC hash and checks it against the original hash; this is
checks that the user supplied the correct key. If the hash
is right, the message is decrypted and displayed.
</p>

<a href="javascript:CryptBro.ui.doReset();" data-role="button" data-icon="check">Back to CryptBro</a>

      </div>
      
    </div>

    <!--end #help-->
    
    <div id="version">CryptBro</version>

  </body>
  
</html>
Something went wrong with that request. Please try again.