Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott paragonie-scott

View GitHub Profile
@paragonie-scott
paragonie-scott / pbkdf2-symfony-polyfill.php
Created Oct 11, 2018 — forked from spaze/pbkdf2-symfony-polyfill.php
Symfony's PBKDF2 polyfill benchmark (TL;DR it's slow) for the thread here https://twitter.com/spazef0rze/status/1050436425559302147
View pbkdf2-symfony-polyfill.php
<?php
function hashPbkdf2($algorithm, $password, $salt, $iterations, $length = 0)
{
// Number of blocks needed to create the derived key
$blocks = ceil($length / strlen(hash($algorithm, null, true)));
$digest = '';
$length = strlen(hash($algorithm, '', true));
if (strlen($password) > $length) {
$password = hash($algorithm, $password, true);
}
@paragonie-scott
paragonie-scott / spotilocal.priv.pem
Created Jan 23, 2017 — forked from venoms/spotilocal.priv.pem
spotilocal.com private key
View spotilocal.priv.pem
Private-Key: (4096 bit)
modulus:
00:f0:71:c0:a3:bb:5f:cc:63:f9:55:33:ed:a3:d0:
78:ae:fc:ce:2e:f2:36:d1:e5:cb:64:d7:55:37:8b:
7b:a0:60:5e:31:c3:2a:b3:6e:1f:33:89:0a:ba:f5:
ab:48:0e:0d:f7:39:31:06:18:3d:66:d8:b9:0e:ba:
bb:08:46:78:3a:51:4b:61:d7:0a:9d:46:54:72:94:
71:b6:a7:82:58:5b:6d:96:11:ae:f7:d2:19:f2:b1:
20:e7:00:72:df:15:ac:1f:1e:1e:34:04:fc:0b:63:
b5:03:ff:47:34:27:c7:54:4e:ee:d7:c7:77:cd:1d:
@paragonie-scott
paragonie-scott / WhatsAppSaudi.txt
Created Jul 13, 2016
WhatsApp Blocking Encrypted Calls to All Saudi Numbers
View WhatsAppSaudi.txt
Suppose I have a friend named Alice. Alice has registered to WhatsApp with a
Saudi number but resides in Europe. We chat over WhatsApp regularly. We are both
using the latest version of WhatsApp for Android (2.16.155).
However, Alice is unable to receive or initiate WhatsApp calls, even though she
is in Europe and is using European WiFi. If you can test this, I suggest you do.
Get a Saudi phone number, register to WhatsApp, and then fly to France and make
a call. You will encounter the same result even if you're on French WiFi.
WhatsApp claims that "the Saudis are blocking the initial handshake [for
View gist:c7a73fd0f759e451cf07
function secure_rand(min, max) {
var rval = 0;
var range = max - min;
if (range < 2) {
return min;
}
var bits_needed = Math.ceil(Math.log2(range));
if (bits_needed > 53) {
throw new Exception("We cannot generate numbers larger than 53 bits.");
@paragonie-scott
paragonie-scott / 1_changelog.md
Created Feb 19, 2016 — forked from joepie91/1_changelog.md
Remove Wired's "ad-blocker veil"
View 1_changelog.md

Changelog

  • February 19, 2016: Initial release.

Broken?

GitHub Gist doesn't send notifications when people leave a comment, so shoot me an e-mail at admin@cryto.net. I'll gladly fix it. Fuck advertising.