Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Dušan Klinec ph4r05

🎯
Focusing
Block or report user

Report or block ph4r05

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View disc_checkpoint
commit a95350d140ee12b45d1659361a8d301d8b1817ac
b6dfd1797038903cb3110e3b52d634103c070640972a080808df57211f27bd30 poc.py
d429ccd37def1842d7842695eaf1cf02b339e33c1efae7fdab779c2ca9f89657 vuln02.md
@ph4r05
ph4r05 / BoolTest2-results-preview.md
Last active Dec 18, 2019
BoolTest2-results-preview
View BoolTest2-results-preview.md

Selected overview:

SECMARGINPAPER3_hw_seed_1fe40505e131963c_100MiB__AES_r03_b16:
1. phase: {"expp": 0.2890625, "exp_cnt": 225830.078125, "obs_cnt": 219573, "diff": 2.7707018378378376, "zscore": -15.615826453923285, "poly": [[84, 208, 338], [226, 353, 482], [100, 228, 356]]},
2. phase: {"poly": [[84, 208, 338], [226, 353, 482], [100, 228, 356]], "nsamples": 781250, "nsucc": 221101, "pval": 2.861278215758277e-32}

SECMARGINPAPER3_ctr_seed_1fe40505e131963c_100MiB__AES_r03_b16:
1. phase: {"expp": 0.265625, "exp_cnt": 207519.53125, "obs_cnt": 194234, "diff": 6.402063058823529, "zscore": -34.03223679907823, "poly": [[63, 191, 447], [312, 440, 445], [60, 188, 440]]},
@ph4r05
ph4r05 / booltest-halving-demo.md
Last active Dec 18, 2019
Booltest halving demo test
View booltest-halving-demo.md

Here is a simple demo for the BoolTest vs BoolTest-halving:

I was testing a simple PNG image with the BoolTest. Here are the differences presented: Tested PNG: https://i.kym-cdn.com/entries/icons/original/000/005/908/idontwanttoliveonthisplanet.jpg

Summary

NormalBooltest:

- best poly zscore  12.33883, expp: 0.0625, exp:     227, obs:     407, diff: -79.2951542 %, poly: [[114, 170, 154, 178]]
Ref samples: 40005, min-zscrore: 4.838657, max-zscore: 7.835336, best observed: 12.33882879511837, rejected: True, alpha: 2.4996875390576178e-05
View keybase.md

Keybase proof

I hereby claim:

  • I am ph4r05 on github.
  • I am ph4r05 (https://keybase.io/ph4r05) on keybase.
  • I have a public key ASDEM5I9j-myX__FRTNz-6aGWqpYkYwZVvQqzIVtRKeEdgo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am ph4r05 on github.
  • I am ph4r05 (https://keybase.io/ph4r05) on keybase.
  • I have a public key ASDEM5I9j-myX__FRTNz-6aGWqpYkYwZVvQqzIVtRKeEdgo

To claim this, I am signing this object:

@ph4r05
ph4r05 / payment_id_fix.py
Last active Nov 27, 2018
Fixes payment ID problem
View payment_id_fix.py
# pip install monero_agent>=1.7.6
import binascii
import json
import requests
from monero_glue.xmr import crypto
from monero_serialize.xmrserialize import load_uvarint_b, uvarint_size
View determ_randomness.py
class mt19937(object):
# https://github.com/james727/MTP/
def __init__(self, seed = 0):
self.state = [0]*624
self.f = 1812433253
self.m = 397
self.u = 11
self.s = 7
self.b = 0x9D2C5680
self.t = 15
@ph4r05
ph4r05 / demo.java
Last active Nov 13, 2018
Simple java intro test
View demo.java
import javax.crypto.IllegalBlockSizeException;
class Main {
// Normally each class should be in a separate file.
static class Student {
private String name;
public Student(String name){
this.name = name;
View ib111_06_11_2018.py
# task 1: implement logical formula evaluation
# T, F ~ true, false
# !, A, V, > ~ NOT, AND, OR, IMPLICATION
# Hint: translate atoms to integers (store integers on stack)
# Hint: the infix form: (!(F)) A (!((T) > (F)))
def eval_formula(inp):
stack = []
for token in inp:
pass
@ph4r05
ph4r05 / ct_array_compare.java
Last active Dec 9, 2017
Constant time array equality check in java
View ct_array_compare.java
package ct;
public class CT {
/**
* Constant time array equals check.
* If the lengths do not match the function returns false immediately.
* @param a array A
* @param b array B
* @return true if arrays are equal on defined intervals
You can’t perform that action at this time.