Skip to content

Instantly share code, notes, and snippets.

View aburan28's full-sized avatar

Adam Buran aburan28

  • San Francisco Bay Area
View GitHub Profile
@aburan28
aburan28 / coreos-beta-cluster.yml
Created January 12, 2017 09:21
Launching a CoreOS beta cluster on AWS using CloudFormation
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/",
"Mappings" : {
"RegionMap" : {
"eu-central-1" : {
"AMI" : "ami-573ef338"
},
From [email protected] Sun Oct 12 09:36:34 1997
Received: from RSA.COM (chirality.rsa.com [192.80.211.33])
by shire.ontko.com (8.8.5/8.8.5) with SMTP id JAA17505
for ; Sun, 12 Oct 1997 09:36:33 -0500
Received: by RSA.COM
id AA20097; Sun, 12 Oct 97 06:29:28 PDT
Date: Sun, 12 Oct 97 06:29:28 PDT
Message-Id: <[email protected]>
From: [email protected] (RSA Factoring Challenge Administrator)
To: [email protected]
Domain Type Sponsoring Organisation
.aaa generic American Automobile Association, Inc.
.aarp generic AARP
.abb generic ABB Ltd
.abbott generic Abbott Laboratories, Inc.
.abogado generic Top Level Domain Holdings Limited
.ac country-code Network Information Center (AC Domain Registry) c/o Cable and Wireless (Ascension Island)
.academy generic Half Oaks, LLC
.accenture generic Accenture plc
.accountant generic dot Accountant Limited
@aburan28
aburan28 / gist:c5808324a78a55a91909
Created March 25, 2016 22:42
Openvpn --show-tls
listed in order of preference:
TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384
TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384
TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384
TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384
TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA
TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA
TLS-SRP-SHA-DSS-WITH-AES-256-CBC-SHA
TLS-SRP-SHA-RSA-WITH-AES-256-CBC-SHA
q = 134747661567386867366256408824228742802669457
Zq = Zmod(q)
E = EllipticCurve(Zq, [0,0,0,-1,0])
P = E(18185174461194872234733581786593019886770620, 74952280828346465277451545812645059041440154)
Q = E(76468233972358960368422190121977870066985660, 33884872380845276447083435959215308764231090)
n = P.order()
k = GF(n)(q).multiplicative_order()
R = E.random_element()
w1 = P.tate_pairing(R, n, k)
w2 = Q.tate_pairing(R, n, k)
@aburan28
aburan28 / lookup_table.c
Created December 15, 2015 00:07
Side Channel Resilient Lookup Table
int do_lookup(int a[16], int bit[4]) {
int t0[8], t1[4], t2[2];
t0[0] = select(a[0], a[1], bit[0]); t0[1] = select(a[2], a[3], bit[0]);
t0[2] = select(a[4], a[5], bit[0]); t0[3] = select(a[6], a[7], bit[0]);
t0[4] = select(a[8], a[9], bit[0]); t0[5] = select(a[10], a[11], bit[0]);
t0[6] = select(a[12], a[13], bit[0]); t0[7] = select(a[14], a[15], bit[0]);
t1[0] = select(t[0], t[1], bit[1]); t1[1] = select(t[2], t[3], bit[1]);
t1[2] = select(t[4], t[5], bit[1]); t1[3] = select(t[6], t[7], bit[1]);
t2[0] = select(t2[0], t[1], bit[2]); t2[1] = select(t2[2], t2[3], bit[2]);
ret = select(t3[0], t3[1], bit[3]);
def generate_safe_prime():
found = False
while not found:
p = random_prime(2^128)
q = 2*p + 1
if is_prime(q):
found = True
return p,q,n
Chosen Ciphertext Attack (CCA):
The adversary gets acces to an oracle for the decryption function.
• Chosen Ciphertext Attack (CCA1):
- The adversary can use this oracle before it gets the challenge ciphertext.
- The queries cannot depend on the ciphertext C.
• Adaptative Chosen Ciphertext Attack (CCA2):
- The adversary gets acces to a decryption oracle without restrictions
@aburan28
aburan28 / The Technical Interview Cheat Sheet.md
Created November 1, 2015 22:04 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
#define OAKLEY_PRIME_MODP768 \
"FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" \
"29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" \
"EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" \
"E485B576 625E7EC6 F44C42E9 A63A3620 FFFFFFFF FFFFFFFF"
#define OAKLEY_PRIME_MODP1024 \
"FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1" \
"29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD" \
"EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245" \