Browse Source

extra files for db and testing

async_key_management
vb 8 years ago
parent
commit
3990848e9e
10 changed files with 368 additions and 0 deletions
  1. +8
    -0
      db/create_system_db.sql
  2. +54
    -0
      db/dic2csv.py
  3. +42
    -0
      db/safewords.py
  4. +106
    -0
      test/DF9B1541-sec.key
  5. +52
    -0
      test/DF9B1541.key
  6. +51
    -0
      test/Makefile
  7. +37
    -0
      test/msg.asc
  8. +7
    -0
      test/signature.asc
  9. +10
    -0
      test/t1.txt
  10. +1
    -0
      test/t2.txt

+ 8
- 0
db/create_system_db.sql View File

@ -0,0 +1,8 @@
CREATE TABLE wordlist (
lang text,
id integer,
word text,
entropy integer
);
CREATE UNIQUE INDEX wordlist_pk on wordlist (lang, id);

+ 54
- 0
db/dic2csv.py View File

@ -0,0 +1,54 @@
#! /usr/bin/env python3
from argparse import ArgumentParser
from fileinput import FileInput, hook_encoded
import re, itertools, sys
try:
from math import log2
except:
from math import log
def log2(x): return log(x) / log(2)
word = re.compile(r"(\S*?)(/|\s.*|$)")
unwanted = re.compile(r"(^\d|[^']*')")
space = re.compile(r'^\s')
p = ArgumentParser(description="create dictionary csv out of hunspell data")
p.add_argument('--hunspell', '-H', type=str, default="/usr/share/hunspell",
help='directory where hunspell dictionary files reside (default: /usr/share/hunspell)')
p.add_argument('--lang', '-l', type=str, default="en_US",
help='use dictionary for language LANG (default: en_US)')
p.add_argument('--encoding', '-e', type=str, default="utf-8",
help='file encoding (default: utf-8)')
args = p.parse_args()
_all = (
word.match(line).group(1).upper()
for line in FileInput(
args.hunspell + "/" + args.lang + ".dic",
openhook=hook_encoded(args.encoding)
)
if not space.match(line)
)
_words = [w for w in _all if len(w) > 2 and not unwanted.match(w)]
_words.sort()
_words = [w for w, g in itertools.groupby(_words)]
if len(_words) > 65536:
_words = _words[:65536]
elif len(_words) < 65536:
sys.stderr.write(
"warning for {}: only {:.2f} bit in wordlist, that makes {:.2f} bit for 5 words\n".format(
args.lang,
log2(len(_words)),
log2(len(_words))*5
)
)
_words.extend(_words[:65536-len(_words)])
assert len(_words) == 65536, "lenght is {}".format(len(_words))
for i, w in enumerate(_words):
print("{l},{i},{w}".format(l=args.lang[:2], i=i, w=w))

+ 42
- 0
db/safewords.py View File

@ -0,0 +1,42 @@
#!/usr/bin/env python3
from sqlite3 import connect
from os import environ
from argparse import ArgumentParser
from re import sub
try:
environ["ALLUSERSPROFILE"]
except KeyError:
db_file = "/usr/local/share/pEp/system.db"
else:
db_file = environ["ALLUSERSPROFILE"] + r"\pEp\system.db"
p = ArgumentParser(description="show safewords instead of hex fingerprint")
p.add_argument('--db-path', '-d', type=str, default=db_file,
help='path to pEp system db (default: ' + db_file + ')')
p.add_argument('--lang', '-l', type=str, default="en",
help='use dictionary for language LANG (default: en)')
p.add_argument('--short', '-s', action='store_true',
help='display the first 5 of the safewords')
p.add_argument('hex', metavar="hex", type=str, nargs='+',
help='hex values of fingerprint')
args = p.parse_args()
c = connect(args.db_path).cursor()
hex_string = sub(r"\W", "", "".join(args.hex))
def hex_word(s):
n = min(20, len(s)) if args.short else len(s)
for i in range(0, n, 4):
yield s[i:i+4]
r = []
for arg in hex_word(hex_string):
c.execute("select word from wordlist where id = {} and lang = lower('{}')".format(
str(int(arg, 16)), args.lang))
r.append(c.fetchall()[0][0])
print(" ".join(r))

+ 106
- 0
test/DF9B1541-sec.key View File

@ -0,0 +1,106 @@
-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: GnuPG v2.0.22 (MingW32)
lQcYBFLefd0BEADB97Pmcz0yfkOWD2978HRUCUa7H4JpuDHZs+hurMlkuE7mLGh5
PAQ61/nL5gppl0cHFNlO7doG2gcRixWZfeQZywkJia5xNzcdjyAiC5jZ6IQpXk2T
wwzBIDYrU+9DhppY5hnE90yDv0MBS2SVjDergZTPDBbIYPTtPf5h51pVULCAtiyN
2Htv3M3tDwJJ9IrLFpJL+ClocgrmeDANKbico63qlBl9NjiUqdnt5INoE6/SnKSu
zaBE37C+/10bswFpjjVffyhu+hplxp6MlalZZYJEip6r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S2C
1SSGkkyOckUxSq4s7FsAEQEAAYkCJQQYAQIADwUCUt593QIbDAUJAeEzgAAKCRDd
Vb8p35sVQfOjD/4q2d67XJTJ2wgwapaDHQ9RlvSJrZeAUiiobpxCjVnglA+d+vzQ
oHq28TiqGhH2e0JFSk3dFBl4emPO6NYFglz0ghejWI2395ipBD5v1BivFt5XE7Hv
dXKuaDGsoEAB25Mv6eBW6kT80qauoDGPo1z539gRWZCn/Zt0uGfB0Q+daRnkorL3
KizVK+qrn7PZkLdcbWY1p4qODYmJFu9aCIHmMUTEfNp7zsl0wIhxq6U+JFjMchaK
o+vBpdfwEzc2opGotqW/a88B0Yi5Ppv5Xa7CidpRhht0EYBTIHXBnkwNDtPXCwjv
dCgM8+lQmV8QwSwDT4TYQbSSyfUw91ZHFuy9qI+Z5YTYaHs4/3b9hnL/SBso2eRs
e5jCEWSKr3bwbl5G0IO302iiqWV7C11XjT5b9+K2gS3vnU7ACWnO0ORr0NWMZ7gF
lWX7y169EHrmTvf+OYKp6QOpjTOmDaDByADGzMgyKeXmxrbBDwwLue0IHL6h14wy
l9xokfVYJ2CiRozRPnoSRa+V2u0NGZnLioFr/+7JTjL2rm2FQ3qCj9nB/ZHe05ao
daZI61WZzQ0QyodEX77LxCEqO0Llr4qPh7N2gxnXAiHXt/BYLaam7GRYhvVo39Ct
n0fGrJ7XOriAZh9DtddJsiTUgGdVKjknSOdr0H/DustA9wg4YV0CTb8UYg==
=c+rW
-----END PGP PUBLIC KEY BLOCK-----

+ 51
- 0
test/Makefile View File

@ -0,0 +1,51 @@
include ../Makefile.conf
ifeq ($(BUILD_FOR),Windoze)
CXX=i686-w64-mingw32-g++
LD=i686-w64-mingw32-c++
LDFLAGS=-lstdc++
else ifeq ($(BUILD_FOR),MINGW32_NT-6.1)
CXX=g++ -std=gnu++11 -DWIN32
LD=g++
LDFLAGS=-pthread -L../src -lpEpEngine -lstdc++
else
CXX=g++ -std=gnu++11
LD=g++
LDFLAGS=-L~/lib -pthread -L../src -lpEpEngine -lstdc++
endif
CXXFLAGS=-g -O0
# CXXFLAGS=-O3 -DNDEBUG
TARGET=pEpEngineTest
ifeq ($(BUILD_FOR),Windoze)
all: $(TARGET).exe
$(TARGET).exe: $(TARGET).o ../src/libpEpEngine.a
$(CXX) $(LDFLAGS) -o $(TARGET).exe $(TARGET).o ../src/libpEpEngine.a
else ifeq ($(BUILD_FOR),MINGW32_NT-6.1)
all: $(TARGET).exe pEpEngine.dll
$(TARGET).exe: $(TARGET).o ../src/libpEpEngine.a
$(CXX) $(LDFLAGS) -o $(TARGET).exe $(TARGET).o ../src/libpEpEngine.a
else
all: $(TARGET)
$(TARGET): $(TARGET).o
$(CXX) $(LDFLAGS) -o $(TARGET) $(TARGET).o
endif
%.o: %.cc ../pEpEngine.h
$(CXX) $(CXXFLAGS) -c -o $@ $<
pEpEngine.dll: ../src/pEpEngine.dll
cp $< $@
.PHONY: clean
clean:
rm -f *.o $(TARGET) *.exe *.a *~ pEpEngine.dll
test: all
LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest

+ 37
- 0
test/msg.asc View File

@ -0,0 +1,37 @@
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
hQIMA0v8ThRgMMUcAQ//f+r+No4dufsFipIKAH0aIQ7/t970jM9h+iRVbI6hapvi
+w9alPbjraH24lDme7MGMOSnxMBXmZG/U/LUTaqUkIG+vUEeO7CHUQ24Y2hOW0H7
6WCsFLBPRhLuT8sZzFTMRZgwwBxtfzeDhMZtmQlXYMxbPS5tHuOG6eEqZzY2WtZc
tpasfiUmfDAOPVuGC+D5S/oA5Idb7dyuqTYhlIq35sKV3zmx4dz7M8sV+G34l8+1
83X2kT6GUqoN/Fbq4Jo7LGB59uPcjc9+P0QNo45pkN/BAIa83dHxkSH6ktMKEDaW
DX3+gVgz+ErAeXvlkKoxWUHdSyzVOXQh0oIaMN/7Fy8472vHl6QLJ8mHwaeCP6ZP
MXY7/Me3dgCBokd4ov5us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hpv43hhBKoGkUK6nKb7BbCSV89DyXPmAqnhl/Hb4YjQoVhNgprwL7JDThIT
8FWrpQdTFqttU1rhIt1T1htmjdoFTZ1n4CtBAmlvwE+fFXeq0r9Oi8UBynVM2sLW
kPAEScxSEdykxKuR5jj2uZWviOf2RZKQ61OutyMuWjqgH07pZBxM2NGMtQIufL9J
a2uO1291DZTlUnJQ0p5JkF4l2zmKxynsgi5YJM5j1L63j9LaDgWKJZPVI6T5zClG
GQGYIFB5+6mHCQLG1bY7+fKK+qrZUv1BGx+CoYl1pyf7nxIAhEPArSFXrEFVHgHB
sCT2cBlyuquSnUQs0z0sPlLmHlZ98VonFwf2f3nVuCq+0WHRnQ9Xe//c4UBbMoWA
a9zqyamBQ+vvwzFSVkg6//R6Grsa9jHcwBogxCHg2C9tOm+dgANVzvtKha8GCNem
9TFmu2s=
=CwSp
-----END PGP MESSAGE-----

+ 7
- 0
test/signature.asc View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAlNs9EQACgkQb7KfG+Kr+JAXrwCdEkuVvInUBktNmYBdPm8iJlUD
cA8An0N+j49d4GSUYLyf6CfA8FItdCPl
=A3cw
-----END PGP SIGNATURE-----

+ 10
- 0
test/t1.txt View File

@ -0,0 +1,10 @@
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Ohne Anhang.
--=20
Volker Birk, Oberer Graben 4, CH-8400 Winterthur, Schweiz,
Erde, Solar-System, Orion Arm, Milchstrasse, Lokale Gruppe,
Virgo-Superhaufen, Coma-Virgo-Filament. mailto:dingens@bumens.org
http://fdik.org D-IRCNet fdik!vb@dragon.pibit.ch

+ 1
- 0
test/t2.txt View File

@ -0,0 +1 @@
Something else

Loading…
Cancel
Save