Skip to content

Instantly share code, notes, and snippets.

View jpopesculian's full-sized avatar

Julian Popescu jpopesculian

View GitHub Profile
@jpopesculian
jpopesculian / Makefile
Last active July 19, 2021 12:39
SGX Install
help:
@echo "View README for more info"
.PHONY: help
# SGX Driver
sgx-driver: install-sgx-driver sign-sgx-driver
install-sgx-driver:
curl -s https://download.01.org/intel-sgx/latest/linux-latest/distro/ubuntu20.04-server/driver_readme.txt | awk '{ print $$3 }' | grep -v "^#\|^$$" | head -n 1 | awk '{print "https://download.01.org/intel-sgx/latest/linux-latest/distro/ubuntu20.04-server/"$$1}' | xargs curl -o /tmp/install-sgx-driver
@jpopesculian
jpopesculian / Makefile
Created July 14, 2021 11:34
Zenroom Threaded Bug
CC=gcc
ZENDIR =../zenroom/src
LIBS=-lm -lpthread -lzenroom-x86_64
CFLAGS := -I$(ZENDIR) -L$(ZENDIR) -Wl,-rpath=$(ZENDIR) $(LIBS)
OBJ = main.o
BIN = main
$(BIN): $(OBJ)
@jpopesculian
jpopesculian / README.md
Created May 26, 2021 21:44
Import/Export CPS

To run the export from CPS use bash export and to run the import to CPS use bash import

To configure, you can use the the variables:

  • DATA_DIR: the output/input directory for the exported/imported session files
  • CPS_HOST: the hostname (and optional port) for the running CPS you would like to import/export from
@jpopesculian
jpopesculian / README.md
Last active July 30, 2021 12:33
CBOR to base64 public key

Setup

To setup, first create a virtual env

python3 -m virtualenv venv

activate the virtual env

@jpopesculian
jpopesculian / generate.sh
Created April 23, 2020 09:23
Generating Test PKI
#!/bin/sh
set -xe
rm -rf generated/
mkdir -p generated/
openssl ecparam -name prime256v1 -out generated/nistp256.pem
openssl ecparam -name secp384r1 -out generated/nistp384.pem
@jpopesculian
jpopesculian / .gitignore
Last active December 23, 2019 15:00
Javascript SGX remote attestation samples
node_modules
.env
@jpopesculian
jpopesculian / github.service
Created December 17, 2019 15:59
Diogos stupid service
[Unit]
Description=Github Service
[Service]
Type=simple
WorkingDirectory=/home/demo/ci-scone/actions-runner/
ExecStart=/bin/bash run.sh
User=demo
[Install]
@jpopesculian
jpopesculian / .gitignore
Last active March 10, 2020 15:59
Python SGX utils sample
py_sgx_utils-0.1.0-py2.py3-none-linux_x86_64.whl
Pipfile
@jpopesculian
jpopesculian / keybase.md
Created September 12, 2019 14:31
Keybase

Keybase proof

I hereby claim:

  • I am jpopesculian on github.
  • I am jpopesculian (https://keybase.io/jpopesculian) on keybase.
  • I have a public key ASAaaRhoInUVJXR0phCrlM8GPMwl7RzA517bmMpGmX37lgo

To claim this, I am signing this object:

@jpopesculian
jpopesculian / zen_example.py
Last active September 4, 2019 09:34
Zen Example
import hashlib
import base58
import base64
import json
from zenroom_minimal import Zenroom
from cryptoconditions import read_zencode
from cryptoconditions import ZenroomSha256
from datetime import datetime
from bigchaindb_driver.crypto import generate_keypair
from bigchaindb_driver import BigchainDB