Skip to content

Instantly share code, notes, and snippets.

Martin Albrecht malb

Block or report user

Report or block malb

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
@malb
malb / bkz_plot.py
Created May 7, 2018
Make illustrative plots for BKZ's behaviour
View bkz_plot.py
# -*- coding: utf-8 -*-
"""
Illustrate behaviour of BKZ algorithm.
.. modulauthor: Martin Albrecht <martin.albrecht@royalholloway.ac.uk>
To convert to movie, call e.g. `ffmpeg -framerate 8 -pattern_type glob -i "*.png" bkz.mkv`
"""
@malb
malb / synt.py
Created May 2, 2018
BKZ Cost Esimates
View synt.py
# -*- coding: utf-8 -*-
"""
Estimate the cost of BKZ 2.0 using Pruner/Simulator
.. moduleauthor: Martin R. Albrecht <martinralbrecht@royalholloway.ac.uk>
"""
from collections import OrderedDict
from fpylll import IntegerMatrix, GSO, BKZ, Pruning, LLL
from fpylll.tools.bkz_simulator import simulate as bkz_simulate
@malb
malb / nistpqc-r1.bib
Last active Oct 29, 2018
Round 1 Submissions for NIST PQC Process
View nistpqc-r1.bib
@techreport{NISTPQC-R1:BIGQUAKE17,
author = {Alain Couvreur and Magali Bardet and Elise Barelli and Olivier Blazy and Rodolfo Canto-Torres and Philippe Gaborit and Ayoub Otmani and Nicolas Sendrier and Jean-Pierre Tillich},
title = {BIG QUAKE},
institution = {{N}ational {I}nstitute of {S}tandards and {T}echnology},
year = 2017,
note = {available at \url{https://csrc.nist.gov/projects/post-quantum-cryptography/round-1-submissions}},
}
@techreport{NISTPQC-R1:BIKE17,
author = {Nicolas Aragon and Paulo Barreto and Slim Bettaieb and Loic Bidoux and Olivier Blazy and Jean-Christophe Deneuville and Phillipe Gaborit and Shay Gueron and Tim Guneysu and Carlos Aguilar Melchor and Rafael Misoczki and Edoardo Persichetti and Nicolas Sendrier and Jean-Pierre Tillich and Gilles Zemor},
@malb
malb / enumeration.ipynb
Created Jun 11, 2017
Enumeration Comparison
View enumeration.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@malb
malb / fplll-in-sage.sh
Last active Mar 23, 2017
updating fp(y)lll in sage
View fplll-in-sage.sh
$YOUR_SAGE_DIR/sage -sh
git clone https://github.com/fplll/fplll
cd fplll
./autogen.sh
./configure --prefix=$SAGE_LOCAL
make install
cd ..
git clone https://github.com/fplll/fpylll
cd fpylll
python setup.py install
View fpylll-on-smc.sh
git clone https://github.com/fplll/fpylll
cd fpylll/
pip install -r requirements.txt
pip install -r suggestions.txt
./install-dependencies.sh $HOME/.local
VIRTUAL_ENV=$HOME/.local python setup.py install --user # hack
export LD_LIBRARY_PATH=$HOME/.local/lib
ipython
@malb
malb / fplll-packer-aws.json
Created Sep 3, 2016
Packer recipe for fplll/fpylll/strategizer instance with AWS
View fplll-packer-aws.json
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "eu-west-1",
@malb
malb / nice-jumper.el
Last active Apr 4, 2019
quick'n'dirty evil-jumper without evil
View nice-jumper.el
;;; nice-jumper.el --- Jump like vimmers do!
;; Copyright (C) 2016 adapted by Martin Albrecht
;; Copyright (C) 2014-2016 by Bailey Ling
;; Author: Bailey Ling
;; URL: https://github.com/bling/nice-jumper
;; Filename: nice-jumper.el
;; Description: Jump like vimmers do! (for older versions of evil-mode)
;; Created: 2014-07-01
;; Version: 0.3.1
@malb
malb / threads.py
Last active Apr 5, 2016
Testing threading in fpylll
View threads.py
# -*- coding: utf-8 -*-
import argparse
from fpylll import IntegerMatrix, LLL
from multiprocessing.pool import ThreadPool as Pool
def run_it(p, f, A, prefix=""):
import sys
r = []
for i, retval in enumerate(p.imap_unordered(f, A, 1)):
r.append(retval)
@malb
malb / ntrulike.py
Created Apr 4, 2016
Shortest vector distribution in "ntrulike" basis matrices
View ntrulike.py
# -*- coding: utf-8 -*-
import argparse
from fpylll import IntegerMatrix
from multiprocessing import Pool
def ntru_like(d, bits=30, q=1073741789):
A = IntegerMatrix.random(d, "ntrulike", bits=bits, q=q)
return A
You can’t perform that action at this time.