Skip to content

Instantly share code, notes, and snippets.

View romen's full-sized avatar

Nicola Tuveri romen

View GitHub Profile
#!/bin/bash
set -o errexit
# This script can be rerun several times. Every time the script is run
# it will redo the changes at the current tip of the master branch.
#
# The first two commits are autogenerated.
#
# - The first commit renames OPENSSL_CTX -> OSSL_LIB_CTX
@romen
romen / sm2_standards.md
Last active May 22, 2022 09:09
Notes on SM2
layout title description author date last_modified published
post
SM2 standards
A list of standards relevant for SM2
Nicola Tuveri
2020-03-18 20:00 CEST
2021-09-27 22:33 EEST
false
@romen
romen / keybase.md
Created August 6, 2019 10:07
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@romen
romen / mwe.c
Last active June 13, 2019 19:56
Minimal working example for Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1763870
#include <openssl/crypto.h>
#include <openssl/evp.h>
#pragma message "Compile time OpenSSL: " OPENSSL_VERSION_TEXT
#if OPENSSL_VERSION_NUMBER < 0x010100000
/* before 1.1.0 `OpenSSL_version` was `SSLeay_version` */
# define OpenSSL_version SSLeay_version
# define OPENSSL_VERSION SSLEAY_VERSION
#endif
@romen
romen / moskowitz.sh
Created August 14, 2018 21:12
Ed25519 PKI script
#!/bin/bash
# from https://tools.ietf.org/html/draft-moskowitz-ecdsa-pki-03 (adapted for EdDSA)
# Workdir is set to $1, $workdir or $PWD (in this order of precedence)
workdir=${1:-${workdir:-$PWD}}
OPENSSL=${OPENSSL:-$(which openssl)}
OSSL_APPS_OPT="-engine libsuola"
#OSSL_ENCRYPT_OPT="-aes256"
@romen
romen / Makefile
Created June 12, 2018 00:31
What is the proper way to efficiently use digital signatures?
KEYFILE=private_key.pem
ifeq ($(OPENSSL_PREFIX),)
OPENSSL_PREFIX := /usr
else
RPATH := -Wl,--enable-new-dtags,-rpath,$(OPENSSL_PREFIX)/lib
endif
CFLAGS := -O2 -g -I$(OPENSSL_PREFIX)/include
LDFLAGS := -L$(OPENSSL_PREFIX)/lib -lcrypto $(RPATH)
@romen
romen / caratteri_finlandesi_win.md
Created November 4, 2017 10:57
I caratteri finlandesi in Windows con la tastiera italiana

I caratteri finlandesi ä, ö - come scriverli in Windows?

Un modo rapido e alternativo a "Inserisci simbolo"

Bisogna premere il tasto ALT e fare una combinazione di tre numeri sul piccolo tastierino numerico che si trova a destra della vostra tastiera.

Ma assicuratevi prima che il tastierino numerico sia attivo! In caso di dubbio: il tasto BlocNum serve per abilitare / disabilitare questa funzione.

Quindi:

@romen
romen / GnuPG-2.2.md
Last active April 1, 2021 13:00 — forked from vt0r/GnuPG-2.2.md
Build/install instructions for GnuPG 2.2.x on Ubuntu and similar distros (formerly for 2.1.x)

GnuPG 2.2.1 Build Instructions

Below are my build instructions for GnuPG 2.2.1, released on September 19th, 2017. These instructions are built for a Ubuntu 16.04 LTS.

If you prefer, you may use the below install script to install GnuPG 2.2.1 by running the following commands:

curl -OL "https://gist.github.com/romen/b7bac24d679d91acabb27bfcdabbee01/raw/b93b7b00910db67c2c3332606792679802abbb32/install-gnupg22.sh" && bash ./install-gnupg22.sh

Install the needed dependencies

@romen
romen / Makefile
Created June 16, 2017 15:36
NaCl sign test clients
LIBSODIUM_PREFIX=/opt/libsodium-debug
LIBSODIUM_INC=$(LIBSODIUM_PREFIX)/include
LIBSODIUM_LIB=$(LIBSODIUM_PREFIX)/lib
LIBSODIUM_LFLAGS=-L$(LIBSODIUM_LIB) -lsodium
LIBSODIUM_RPATH=-Wl,-rpath=$(LIBSODIUM_LIB)
LIBHACL_ROOT=$(HOME)/repos/hacl-star
LIBHACL_PREFIX=$(LIBHACL_ROOT)/snapshots/hacl-c
LIBHACL_INC=$(LIBHACL_PREFIX)
LIBHACL_LIB=$(LIBHACL_PREFIX)
@romen
romen / pioneers.rb
Created December 18, 2013 02:25
tentative pioneers 15.1 homebrew formula, still having problems with icons
require 'formula'
class Pioneers < Formula
url 'https://downloads.sourceforge.net/project/pio/Source/pioneers-15.1.tar.gz'
homepage 'http://pio.sourceforge.net/'
sha1 'cea94cd77edef31b3f9e601077dff9b199dfeaf4'
fails_with :clang do
build 318
cause "'#line directive requires a positive integer' argument in generated file"