Skip to content

Instantly share code, notes, and snippets.

View jedisct1's full-sized avatar

Frank Denis jedisct1

View GitHub Profile
@jedisct1
jedisct1 / cookie-cutter.js
Last active February 2, 2020 18:25
Paste cookies from editthiscookie to any browser
BS-SPEKE
BS-SPEKE is a modified B-SPEKE with blind salt (OPRF). Modified B-SPEKE is a
similar change from SPEKE as from SPAKE2 to SPAKE2+ to make it augmented. Doing
this saves a scalar point multiply vs original B-SPEKE with blind salt. There
are no proofs, but it's not hard to take the SPEKE proof, add the OPAQUE proof
for OPRF, and it's obvious that the augmented change makes it augmented. So if
anyone knows how to formally state that in a proof, that would be awesome to
have.
@jedisct1
jedisct1 / a
Created December 9, 2019 19:36
This file has been truncated, but you can view the full file.
;; zone times: 2019-11-11 15:52:29 .. 2019-11-30 15:52:30
;; count: 11; bailiwick: net.
trafficmanager.net. NS tm1.msft.net.
trafficmanager.net. NS tm2.msft.net.
trafficmanager.net. NS tm1.edgedns-tm.info.
trafficmanager.net. NS tm2.edgedns-tm.info.
;; zone times: 2011-12-10 17:12:17 .. 2017-11-08 17:02:25
;; count: 2149; bailiwick: net.
trafficmanager.net. NS tm1.msft.net.
This file has been truncated, but you can view the full file.
;; zone times: 2019-11-13 15:52:20 .. 2019-11-24 15:52:31
;; count: 4; bailiwick: net.
omtrdc.net. NS ns1.omtrdc.net.
omtrdc.net. NS ns2.omtrdc.net.
;; zone times: 2019-11-13 15:52:20 .. 2019-11-24 15:52:31
;; count: 4; bailiwick: net.
ns1.omtrdc.net. A 66.235.157.6
;; zone times: 2019-11-13 15:52:20 .. 2019-11-24 15:52:31
;; record times: 2019-07-20 16:32:39 .. 2019-11-23 18:43:27
;; count: 82
tagcommander.fr. A 15.188.4.125
;; record times: 2019-07-22 03:27:52 .. 2019-11-21 13:14:22
;; count: 6
forum.tagcommander.fr. A 15.188.4.125
;; record times: 2019-07-17 13:03:14 .. 2019-11-25 15:52:17
;; count: 6127
@jedisct1
jedisct1 / b.c
Created September 24, 2019 11:24
// Test case for Xcode 11 broken stack alignment
// See https://forums.developer.apple.com/thread/121887
// Compile with `cc -mavx -O2 a.c`
int main(void) {
register char a __asm("rbx") = 0;
char b[5000];
char c[100] = {0};
asm volatile("" : : "r,m"(a), "r,m"(b), "r,m"(c) : "memory");
return 0;
@jedisct1
jedisct1 / a.c
Created September 24, 2019 11:23
// Test case for Xcode 11 broken stack alignment
// See https://forums.developer.apple.com/thread/121887
// Compile with cc -mavx -O2 a.c
#include <fcntl.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
@jedisct1
jedisct1 / a.diff
Last active September 4, 2019 17:52
diff --git a/src/write/macho.rs b/src/write/macho.rs
index dbbe5df..48f7b6b 100644
--- a/src/write/macho.rs
+++ b/src/write/macho.rs
@@ -137,6 +137,17 @@ impl Object {
let mut strtab = StringTable::default();
let mut symbol_offsets = vec![SymbolOffsets::default(); self.symbols.len()];
let mut nsyms = 0;
+
+ let prefixed_symbols: Vec<_> = self
@jedisct1
jedisct1 / xcode-11b6.c
Created August 26, 2019 13:42
Stack alignment bug in Xcode 11 with AVX optimizations
#include <fcntl.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
typedef struct {
char d[16];
void *e;
struct { char b[5536]; } f;
@jedisct1
jedisct1 / cmake.diff
Created July 23, 2019 20:39
cmake.diff
--- Findsodium.cmake 2019-07-23 22:22:23.000000000 +0200
+++ zok.cmake 2019-07-23 22:22:17.000000000 +0200
@@ -18,7 +18,6 @@
# Once done the following variables will be defined:
#
# sodium_FOUND sodium_INCLUDE_DIR sodium_LIBRARY_DEBUG sodium_LIBRARY_RELEASE
-# sodium_VERSION_STRING
#
# Furthermore an imported "sodium" target is created.
#