Skip to content

Instantly share code, notes, and snippets.

View jonasschneider's full-sized avatar

Jonas Schneider jonasschneider

View GitHub Profile
[22:32] <sokrates> does having a "perfect" PRNG trivially lead to perfect symmetric crypto?
[22:33] <sokrates> imagine this situation: A and B both have a copy of this perfect PRNG
[22:33] <sokrates> they both seed it with the shared key
[22:33] <catid> in the OTP sense yes i believe so
[22:33] <sokrates> and then alice simply XORs the PRNG's output with the plaintext
[22:34] <catid> but you can still misuse that kind of cipher construction: you can reuse the PRNG seed to encrypt the same data twice
[22:34] <Riastradh> If the key was chosen uniformly at random and the PRNG's output is indistinguishable from uniform random, then yes. This is how stream ciphers work.
[22:34] <catid> or the seed can have insufficient randomness itself
[22:34] == Platyp [~flatline@2607:f470:22:8:beae:c5ff:fe5a:903f] has joined ##crypto
[22:35] <catid> an online game cheater can filter out all packets with length = 53 to stop something from going through, even though they cannot decrypt the data

Keybase proof

I hereby claim:

  • I am jonasschneider on github.
  • I am jonasschneider (https://keybase.io/jonasschneider) on keybase.
  • I have a public key whose fingerprint is 0D07 E065 758B 05EB E9C0 9DFD AC7F 2AEB 434F 894A

To claim this, I am signing this object:

/*!
*
* stagas - need more 303
*
*/
var bpm = 125;
var tuning = 440;
var transpose = -1;
Okay, this is getting ugly. For some reeeally unknown reason, this segfaults:
$ run_fis pry -rpg -e 'PG.connect({:host=>"127.0.0.1"})'
while this doesn't:
$ run_fis pry -rpg -e 'puts PG.connect({dbname: "fis"})'
I suspect it has something to do with authentication methods; while the first one uses TCP sockets and therefore can't use Linux SO_GETPEERCRED auth,
the other one can. Oh well.
--- a/vendor/bundle/ruby/2.1.0/gems/sequel-4.9.0/lib/sequel/adapters/postgres.rb 2014-08-26 20:31:38.000000000 +0000
+++ b/vendor/bundle/ruby/2.1.0/gems/sequel-4.9.0/lib/sequel/adapters/postgres.rb 2014-08-26 20:31:53.000000000 +0000
diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c
index c98eeb4..fc72e4f 100644
--- a/target-i386/seg_helper.c
+++ b/target-i386/seg_helper.c
@@ -866,19 +866,24 @@ static void do_interrupt64(CPUX86State *env, int intno, int is_int,
}
if (load_segment(env, &e1, &e2, selector) != 0) {
+ qemu_log_mask(CPU_LOG_RESET, "XXXX load_segment\n");
raise_exception_err(env, EXCP0D_GPF, selector & 0xfffc);
vagrant@vagrant-ubuntu-trusty-64:/vagrant/mod$ nm --undefined-only a.out
U abort
U ceil
U ceilf
U exp
U exp2
U exp2f
U expf
U fflush
U floor
[main] INFO spark.servlet.SparkFilter - StaticResourceHandler configured with folder = /public
Running in servlet container -- configuring from servlet context (usually from web.xml)
null
DB: CREATE TABLE IF NOT EXISTS experiment(id TEXT PRIMARY KEY NOT NULL, description TEXT DEFAULT '', budget INT, preview_click_count INT, hit_mturkid TEXT, finished INT, softfinished INT, answer_payment INT, rating_payment INT , basic_payment INT, statsid TEXT, ratingviewclass TEXT, sqltime TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, bonus_payment INT, tags INT, qualifications INT, hit_title INT, max_answers_per_assignment INT, max_ratings_per_assignment INT, hit_description INT);
DB: CREATE TABLE IF NOT EXISTS qualification(id TEXT PRIMARY KEY NOT NULL, text TEXT , experimentid TEXT NOT NULL);
DB: CREATE TABLE IF NOT EXISTS tag(id TEXT PRIMARY KEY NOT NULL, text TEXT , experimentid TEXT
# Overhead Command Shared Object
# ........ ....... .................... .....................................................................................................................
#
93.16% zbackup libc-2.19.so [.] memset
|
--- memset
|
|--99.99%-- std::string::append(unsigned long, char)
| google::protobuf::io::StringOutputStream::Next(void**, int*)
| google::protobuf::io::CodedOutputStream::Refresh()
From ce4f2a8c91510d7032ab441c37f3b78de7cc72cb Mon Sep 17 00:00:00 2001
From: Jonas Schneider <mail@jonasschneider.com>
Date: Tue, 10 Mar 2015 23:48:42 +0100
Subject: [PATCH] backup_creator: naively buffer a couple of instructions to
avoid using the slow StringOutputStream
---
backup_creator.cc | 36 +++++++++++++++++++++++++++++++++++-
backup_creator.hh | 4 ++++
2 files changed, 39 insertions(+), 1 deletion(-)
From bdd045842757f316123d295e4d71591b71e00b7f Mon Sep 17 00:00:00 2001
From: Jonas Schneider <mail@jonasschneider.com>
Date: Wed, 11 Mar 2015 10:25:35 +0100
Subject: [PATCH] Improve backup performance by initializing the
CodedOutputStream only once.
---
backup_creator.cc | 2 +-
backup_creator.hh | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)