summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD33
-rw-r--r--pbp.install94
3 files changed, 156 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cbb9786c4aff
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = python2-pbp
+ pkgdesc = Simple crypto tool
+ pkgver = 0.3.1
+ pkgrel = 1
+ url = https://github.com/stef/pbp
+ install = pbp.install
+ arch = any
+ license = AGPL3
+ makedepends = gcc
+ makedepends = python2-setuptools
+ depends = libsodium
+ depends = python2
+ depends = python2-cffi
+ depends = python2-pysodium
+ depends = python2-scrypt
+ depends = python2-securestring
+ depends = scrypt
+ optdepends = python2-pyusb: PITCHFORK support
+ provides = pbp
+ provides = python2-pbp
+ conflicts = pbp
+ conflicts = python2-pbp
+ options = !emptydirs
+ source = https://pypi.python.org/packages/source/p/pbp/pbp-0.3.1.tar.gz
+ md5sums = 7b02092d0af7ea80541d167db3be3639
+ sha256sums = c8690905956ae1bc9d5733252d94a68c7d0c44244dcdf9ec5529c6e33b3b5b4a
+
+pkgname = python2-pbp
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3fe6010a1d4f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+
+pkgname=python2-pbp
+pkgver=0.3.1
+pkgrel=1
+pkgdesc="Simple crypto tool"
+arch=('any')
+depends=('libsodium' 'python2' 'python2-cffi' 'python2-pysodium' 'python2-scrypt' 'python2-securestring' 'scrypt')
+makedepends=('gcc' 'python2-setuptools')
+optdepends=('python2-pyusb: PITCHFORK support')
+url="https://github.com/stef/pbp"
+license=('AGPL3')
+options=(!emptydirs)
+source=(https://pypi.python.org/packages/source/p/${pkgname#python2-}/${pkgname#python2-}-$pkgver.tar.gz)
+md5sums=('7b02092d0af7ea80541d167db3be3639')
+sha256sums=('c8690905956ae1bc9d5733252d94a68c7d0c44244dcdf9ec5529c6e33b3b5b4a')
+provides=('pbp' 'python2-pbp')
+conflicts=('pbp' 'python2-pbp')
+install=pbp.install
+
+build() {
+ cd "$srcdir/${pkgname#python2-}-$pkgver"
+
+ msg 'Building...'
+ python2 setup.py build
+}
+
+package() {
+ cd "$srcdir/${pkgname#python2-}-$pkgver"
+
+ msg 'Installing...'
+ python2 setup.py install --root="$pkgdir" --optimize=1
+}
diff --git a/pbp.install b/pbp.install
new file mode 100644
index 000000000000..1acc978baae5
--- /dev/null
+++ b/pbp.install
@@ -0,0 +1,94 @@
+post_install() {
+ printf "%b\n" "$pbp"
+}
+
+post_upgrade() {
+ post_install
+}
+
+read -d '' pbp <<'EOF'
+pbp - Usage
+
+Warning: pbp may need sudo privs on first run to create temp file
+(likely bug)
+
+Generate a key
+
+ pbp -g -n alice
+
+sending howdy.txt using public key encryption from alice to bob
+
+ pbp -c -S alice -r bob -i howdy.txt
+
+decrypt an encrypted file using public key crypto
+
+ pbp -d -S bob -i howdy.txt.pbp
+
+sending howdy.txt using secret key encryption
+
+ pbp -c -i howdy.txt
+
+decrypt an encrypted file using secret key crypto
+
+ pbp -d -i howdy.txt.pbp
+
+sign howdy.txt
+
+ pbp -s -S alice -i /howdy.txt
+
+verify howdy.txt
+
+ pbp -v -i howdy.txt.sig
+
+sign bobs key
+
+ pbp -m -S alice -n bob
+
+check sigs on carols key
+
+ pbp -C -n carol
+
+alice encrypts howdy.txt to bob using experimental forward secret mode
+
+ pbp -e -S alice -r bob -i howdy.txt -o ./secret-message
+
+bob decrypts howdy.txt from alice using experimental forward secret mode
+
+ pbp -E -S bob -r alice -i ./secret-message
+
+initiate ECDH key exchange
+
+ pbp -D1
+
+respond to ECDH key exchange
+
+ pbp -D2 -Dp 'public component from D1'
+
+finish ECDH key exchange
+
+ pbp -D3 -Dp 'public component from D2' -De 'secret exponent from D1'
+
+random streaming 23GByte of cryptographic randomness
+
+ pbp -R -Rs 23G -o /mnt/huge_fs/random_data
+
+participate in a 4-way DH exchange, 1st message
+
+ pbp -Ds -Dp 4 -S alice -n 'friends001' -i oldkeychain -o newkeychain
+
+participate in a 4-way DH exchange, 2nd message
+
+ pbp -De -S alice -n 'friends001' -i oldkeychain -o newkeychain
+
+this is one big pipe that creates a 3-way ECDH secret between alice, bob and carol:
+
+ pbp -Ds -S alice -Dp 3 -n 'test-dh' -i /dev/null |
+ pbp -Ds -S bob -Dp 3 -n 'test-dh' |
+ pbp -Ds -S carol -Dp 3 -n 'test-dh' |
+ pbp -De -S alice -Dp 3 -n 'test-dh' |
+ pbp -De -S bob -Dp 3 -n 'test-dh'
+
+of course instead of a pipe you could use any kind of transport mechanism
+
+(c) 2013, stf <s@ctrlc.hu>, dnet vsza@vsza.hu, AGPLv3.0+
+EOF