mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-18 04:10:57 +01:00
initial commit
This commit is contained in:
3
man/Makefile.am
Normal file
3
man/Makefile.am
Normal file
@@ -0,0 +1,3 @@
|
||||
man_MANS = pcp1.1
|
||||
dist_man_MANS = $(man_MANS)
|
||||
DATAROOTDIR = /usr
|
||||
478
man/Makefile.in
Normal file
478
man/Makefile.in
Normal file
@@ -0,0 +1,478 @@
|
||||
# Makefile.in generated by automake 1.12.4 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = man
|
||||
DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
|
||||
$(top_srcdir)/config/ltoptions.m4 \
|
||||
$(top_srcdir)/config/ltsugar.m4 \
|
||||
$(top_srcdir)/config/ltversion.m4 \
|
||||
$(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/libpcp/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
man1dir = $(mandir)/man1
|
||||
am__installdirs = "$(DESTDIR)$(man1dir)"
|
||||
NROFF = nroff
|
||||
MANS = $(dist_man_MANS) $(man_MANS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
man_MANS = pcp1.1
|
||||
dist_man_MANS = $(man_MANS)
|
||||
DATAROOTDIR = /usr
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu man/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-man1: $(dist_man_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(dist_man_MANS) $(man_MANS)'; \
|
||||
test -n "$(man1dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.1[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man1dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.1[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@list='$(MANS)'; if test -n "$$list"; then \
|
||||
list=`for p in $$list; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
|
||||
if test -n "$$list" && \
|
||||
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
|
||||
echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
|
||||
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
|
||||
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
|
||||
echo " typically 'make maintainer-clean' will remove them" >&2; \
|
||||
exit 1; \
|
||||
else :; fi; \
|
||||
else :; fi
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man1dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man1
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-man1 \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am uninstall-man uninstall-man1
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
106
man/details.pod
Normal file
106
man/details.pod
Normal file
@@ -0,0 +1,106 @@
|
||||
|
||||
=head1 PCP1 KEYS
|
||||
|
||||
B<pcp1> keys are stored in a binary file, called B<the vault>.
|
||||
It's by default located in B<~/.pcpvault> but you can of course
|
||||
specify another location using the B<-V> option.
|
||||
|
||||
There are two kinds of keys: secret and public keys. In reality
|
||||
a secret key always includes its public key. Both types of keys
|
||||
can be exported to files and transfered to other people who can
|
||||
then import them. You should usually only do this with public keys
|
||||
though.
|
||||
|
||||
There is a primary secret key which will always used for operations
|
||||
when no keyid has been specified. However, you may have as many
|
||||
secret keys in your vault as you like.
|
||||
|
||||
Each key can be identified using its B<keyid> which looks like this:
|
||||
|
||||
0xD49119E85266509F
|
||||
|
||||
A public key exported from a secret key will have the same keyid
|
||||
as the secret key. When using for encryption, the keyid will be
|
||||
added to the message so that the receiver knows who was the
|
||||
sender of the message (B<This might change in the future. As of
|
||||
this writing I'm not sure if this was a good idea>).
|
||||
|
||||
If you just want to know details about a key or the vault, use the
|
||||
B<-t> option.
|
||||
|
||||
=head1 INTERNALS
|
||||
|
||||
FIXME.
|
||||
|
||||
=head1 Z85 ENCODING
|
||||
|
||||
B<pcp1> uses Z85 to encode exported keys and encrypted messages.
|
||||
Therefore it includes a Z85 utility mode:
|
||||
|
||||
B<pcp1> can be used to encode and decode strings to Z85 encoding.
|
||||
|
||||
The option B<-z> encodes B<to> Z85, the option B<-Z> does the opposite
|
||||
and decodes B<from> Z85.
|
||||
|
||||
If no input file have been specified using B<-I>, B<pcp1> expects the
|
||||
input to come from B<STDIN>, otherwise it reads the contents
|
||||
of B<file>.
|
||||
|
||||
Encoded or decoded output will be written to B<STDOUT> unless an
|
||||
output file has been specified using the option B<-O>.
|
||||
|
||||
=head2 EXAMPLES
|
||||
|
||||
To encode a given file to Z85 and write the output to another:
|
||||
|
||||
pcp1 -z myfile.bin > myfile.z85
|
||||
|
||||
To decode the file created above and restore the original:
|
||||
|
||||
pcp1 -Z -d myfile.z85 > myfile.bin
|
||||
|
||||
To encode something from stdin to Z85:
|
||||
|
||||
ps axuw | pcp1 -z > pslist.z85
|
||||
|
||||
To decode the above and print to stdout:
|
||||
|
||||
pcp1 -Z -d pslist.z85
|
||||
|
||||
=head2 BACKGROUND
|
||||
|
||||
The Z85 encoding format is described here: B<http://rfc.zeromq.org/spec:32>.
|
||||
It's part of ZeroMQ (B<http://zeromq.org>). Z85 is based on ASCII85 with
|
||||
a couple of modifications (portability, readability etc).
|
||||
|
||||
To fulfil the requirements of the ZeroMQ Z85 functions, B<pcp1>
|
||||
does some additional preparations of raw input before actually doing the
|
||||
encoding, since the input for zmq_z85_encode() must be divisible by 4:
|
||||
|
||||
Expand the input so that the resulting size is divisible by 4.
|
||||
|
||||
Fill the added bytes with zeroes.
|
||||
|
||||
Prepend the input with a one byte value which holds the number of zeroes
|
||||
added in the previous step.
|
||||
|
||||
Example:
|
||||
|
||||
Raw input:
|
||||
|
||||
hello\0
|
||||
|
||||
Here, the input size is 6, which is insufficient, therefore it has to be expanded
|
||||
to be 8. After the process the input looks like this:
|
||||
|
||||
1hello\0\0
|
||||
|
||||
So, we padded the input with 1 zero (makes 7 bytes) and preprended it with the
|
||||
value 1 (the number of zeros added): makes 8 bytes total.
|
||||
|
||||
After decoding Z85 input the process will be reversed.
|
||||
|
||||
B<Trying to use another tool to decode an Z85 encoded string produced
|
||||
by z85, might not work therefore, unless the tool takes the padding scheme
|
||||
outlined above into account>.
|
||||
|
||||
55
man/footer.pod
Normal file
55
man/footer.pod
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2013 by T.Linden <tom AT cpan DOT org>
|
||||
|
||||
=head1 ADDITIONAL COPYRIGHTS
|
||||
|
||||
=over
|
||||
|
||||
=item B<ZeroMQ Z85 encoding routine>
|
||||
|
||||
Copyright (c) 2007-2013 iMatix Corporation
|
||||
Copyright (c) 2009-2011 250bpm s.r.o.
|
||||
Copyright (c) 2010-2011 Miru Limited
|
||||
Copyright (c) 2011 VMware, Inc.
|
||||
Copyright (c) 2012 Spotify AB
|
||||
|
||||
=item B<Tarsnap readpass helpers>
|
||||
|
||||
Copyright 2009 Colin Percival
|
||||
|
||||
=item B<jen_hash() hash algorithm>
|
||||
|
||||
Bob Jenkins, Public Domain.
|
||||
|
||||
=item B<UTHASH hashing macros>
|
||||
|
||||
Copyright (c) 2003-2013, Troy D. Hanson
|
||||
|
||||
=item B<Random art image from OpenSSH keygen>
|
||||
|
||||
Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||
|
||||
Comitted by Alexander von Gernler in rev 1.7.
|
||||
|
||||
=back
|
||||
|
||||
Every incorporated source code is opensource and licensed
|
||||
under the B<GPL> as well.
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
I<T.Linden <tom AT cpan DOT org>>
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Licensed under the GNU GENERAL PUBLIC LICENSE version 3.
|
||||
|
||||
=head1 HOME
|
||||
|
||||
The homepage of Pretty Curved Privacy can be found on
|
||||
http://www.daemon.de/PrettyCurvedPrivacy. The source is
|
||||
on Github: https://github.com/TLINDEN/pcp
|
||||
|
||||
=cut
|
||||
33
man/install.pod
Normal file
33
man/install.pod
Normal file
@@ -0,0 +1,33 @@
|
||||
=head1 INSTALLATION
|
||||
|
||||
There are currently no packages available, so B<pcp> has to be
|
||||
compiled from source. Follow these steps:
|
||||
|
||||
First, you will need libsodium:
|
||||
|
||||
git clone git://github.com/jedisct1/libsodium.git
|
||||
cd libsodium
|
||||
./autogen.sh
|
||||
./configure && make check
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
cd ..
|
||||
|
||||
Next, pcp:
|
||||
|
||||
git clone git://github.com/tlinden/pcp.git
|
||||
cd pcp
|
||||
./configure
|
||||
sudo make install
|
||||
cd ..
|
||||
|
||||
Optionally, you might run the unit tests:
|
||||
|
||||
make test
|
||||
|
||||
=head1 DOCUMENTATION
|
||||
|
||||
To learn how to use B<pcp>, read the manpage:
|
||||
|
||||
man pcp1
|
||||
|
||||
68
man/pcp.pod
Normal file
68
man/pcp.pod
Normal file
@@ -0,0 +1,68 @@
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<Pretty Curved Privacy> (pcp1) is a commandline utility which can
|
||||
be used to encrypt files. B<pcp1> uses eliptc curve cryptography
|
||||
for encryption (CURVE25519 by Dan J. Bernstein). While CURVE25519
|
||||
is no worldwide accepted standard it hasn't been compromised by
|
||||
the NSA - which might be better, depending on your point of view.
|
||||
|
||||
B<Caution>: since CURVE25519 is no accepted standard, B<pcp1> has
|
||||
to be considered as experimental software. In fact, I wrote it just
|
||||
to learn about the curve and see how it works.
|
||||
|
||||
Beside some differences it works like B<GNUPG>. So, if you already
|
||||
know how to use gpg, you'll feel almost home.
|
||||
|
||||
=head1 QUICKSTART
|
||||
|
||||
Lets say, Alicia and Bobby want to exchange encrypted messages.
|
||||
Here's what the've got to do.
|
||||
|
||||
First, both have create a secret key:
|
||||
|
||||
Alicia Bobby
|
||||
pcp1 -k pcp1 -k
|
||||
|
||||
After entering their name, email address and a passphrase to protect
|
||||
the key, it will be stored in their B<vault file> (by default ~/.pcpvault).
|
||||
|
||||
Now, both of them have to export the public key part of their key:
|
||||
|
||||
Alicia Bobby
|
||||
pcp1 -p -O alicia.pub pcp1 -p -O bobby.pub
|
||||
|
||||
They've to exchange the public key somehow (which is not my
|
||||
problem at the moment, use ssh, encrypted mail, whatever). Once exchanged,
|
||||
they have to import it:
|
||||
|
||||
|
||||
Alicia Bobby
|
||||
pcp1 -P -I bobby.pub pcp1 -P -I alicia.pub
|
||||
|
||||
They will see a response as this when done:
|
||||
|
||||
key 0x29A323A2C295D391 added to .pcpvault.
|
||||
|
||||
Now, Alicia finally writes the secret message, encrypts it and
|
||||
sends it to Bobby, who in turn decrypts it:
|
||||
|
||||
Alicia Bobby
|
||||
echo "Love you, honey" > letter
|
||||
pcp1 -e -i 0x29A323A2C295D391 -I letter -O letter.z85
|
||||
cat letter.z85 | mail bobby@foo.bar
|
||||
|
||||
pcp1 -d -I letter.z85 | less
|
||||
|
||||
And that's it.
|
||||
|
||||
Please note the big difference to B<GPG> though: both Alicia
|
||||
AND Bobby have to enter the passphrase for their secret key!
|
||||
That's the way CURVE25519 works: you encrypt a message using
|
||||
your secret key and the recipients public key and the recipient
|
||||
does the opposite, he uses his secret key and your public key
|
||||
to actually decrypt the message.
|
||||
|
||||
Oh - and if you're wondering why I named them Alicia and Bobby:
|
||||
I was just sick of Alice and Bob. We're running NSA-free, so we're
|
||||
using other sample names as well.
|
||||
|
||||
443
man/pcp1.1
Normal file
443
man/pcp1.1
Normal file
@@ -0,0 +1,443 @@
|
||||
.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "PCP1 1"
|
||||
.TH PCP1 1 "2013-10-28" "PCP 0.0.1" "USER CONTRIBUTED DOCUMENTATION"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
Pretty Curved Privacy \- File encryption using eliptic curve cryptography.
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& Usage: pcp1 [options]
|
||||
\&
|
||||
\& General Options:
|
||||
\& \-V \-\-vault <vaultfile> Specify an alternate vault file.
|
||||
\& The deault vault is ~/.pcpvault.
|
||||
\& \-O \-\-outfile <file> Output file. If not specified, stdout
|
||||
\& will be used.
|
||||
\& \-I \-\-infile <file> Input file. If not specified, stdin
|
||||
\& will be used.
|
||||
\& \-i \-\-keyid <id> Specify a key id to import/export.
|
||||
\& \-t \-\-text Print textual representation of some
|
||||
\& item. Either \-V or \-i must be specified
|
||||
\& as well.
|
||||
\& \-h \-\-help Print this help message.
|
||||
\& \-v \-\-version Print program version.
|
||||
\& \-D \-\-debug Enable debug output.
|
||||
\&
|
||||
\& Keymanagement Options:
|
||||
\& \-k \-\-keygen Generate a CURVE25519 secret key. If
|
||||
\& the generated key is the first one in
|
||||
\& your vault, it will become the primary
|
||||
\& secret key.
|
||||
\& \-l \-\-listkeys List all keys currently stored in your
|
||||
\& vault. Only the key id\*(Aqs and some info
|
||||
\& about the keys will be printed, not the
|
||||
\& actual keys.
|
||||
\& \-r \-\-remove\-key Remove a key from the vault. Requires
|
||||
\& option \-i <keyid>.
|
||||
\& \-s \-\-export\-secret Export a secret key. If your vault only
|
||||
\& contains one secret key, this one will
|
||||
\& be exported. If a key id have been
|
||||
\& specified (\-i), this one will be used.
|
||||
\& If there are more than one secret keys
|
||||
\& in the vault and no key id has been
|
||||
\& given, export the primary secret key.
|
||||
\& Use \-O to export to a file.
|
||||
\& \-p \-\-export\-public Export a public key. If no key id have
|
||||
\& been specified, the public part of your
|
||||
\& primary secret key will be exported.
|
||||
\& Use \-O to export to a file.
|
||||
\& \-S \-\-import\-secret Import a secret key. Use \-I to import
|
||||
\& from a file.
|
||||
\& \-P \-\-import\-public Import a public key. Use \-I to import
|
||||
\& from a file.
|
||||
\&
|
||||
\& Encryption Options:
|
||||
\& \-e \-\-encrypt Encrypt a message. Read from stdin or
|
||||
\& specified via \-I. A keyid (\-i) of the
|
||||
\& public key of the receipient must be
|
||||
\& specified. Output to stdout or written
|
||||
\& to the file specified via \-O.
|
||||
\& \-d \-\-decrypt Decrypt a message. Read from stdin or
|
||||
\& specified via \-I. Output to stdout or
|
||||
\& written to the file specified via \-O.
|
||||
\& The primary secret key will be used for
|
||||
\& decryption, if there is no primary and
|
||||
\& just one secret key in the vault, this
|
||||
\& one will be used. Otherwise you\*(Aqll have
|
||||
\& to specify the keyid (\-i) of the key.
|
||||
\&
|
||||
\& Encoding Options:
|
||||
\& \-z \-\-z85\-encode Encode something to Z85 encoding. Use
|
||||
\& \-I and \-O respectively, otherwise it
|
||||
\& stdin/stdout.
|
||||
\& \-Z \-\-z85\-decode Decode something from Z85 encoding. Use
|
||||
\& \-I and \-O respectively, otherwise it
|
||||
\& stdin/stdout
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBPretty Curved Privacy\fR (pcp1) is a commandline utility which can
|
||||
be used to encrypt files. \fBpcp1\fR uses eliptc curve cryptography
|
||||
for encryption (\s-1CURVE25519\s0 by Dan J. Bernstein). While \s-1CURVE25519\s0
|
||||
is no worldwide accepted standard it hasn't been compromised by
|
||||
the \s-1NSA\s0 \- which might be better, depending on your point of view.
|
||||
.PP
|
||||
\&\fBCaution\fR: since \s-1CURVE25519\s0 is no accepted standard, \fBpcp1\fR has
|
||||
to be considered as experimental software. In fact, I wrote it just
|
||||
to learn about the curve and see how it works.
|
||||
.PP
|
||||
Beside some differences it works like \fB\s-1GNUPG\s0\fR. So, if you already
|
||||
know how to use gpg, you'll feel almost home.
|
||||
.SH "QUICKSTART"
|
||||
.IX Header "QUICKSTART"
|
||||
Lets say, Alicia and Bobby want to exchange encrypted messages.
|
||||
Here's what the've got to do.
|
||||
.PP
|
||||
First, both have create a secret key:
|
||||
.PP
|
||||
.Vb 2
|
||||
\& Alicia Bobby
|
||||
\& pcp1 \-k pcp1 \-k
|
||||
.Ve
|
||||
.PP
|
||||
After entering their name, email address and a passphrase to protect
|
||||
the key, it will be stored in their \fBvault file\fR (by default ~/.pcpvault).
|
||||
.PP
|
||||
Now, both of them have to export the public key part of their key:
|
||||
.PP
|
||||
.Vb 2
|
||||
\& Alicia Bobby
|
||||
\& pcp1 \-p \-O alicia.pub pcp1 \-p \-O bobby.pub
|
||||
.Ve
|
||||
.PP
|
||||
They've to exchange the public key somehow (which is not my
|
||||
problem at the moment, use ssh, encrypted mail, whatever). Once exchanged,
|
||||
they have to import it:
|
||||
.PP
|
||||
.Vb 2
|
||||
\& Alicia Bobby
|
||||
\& pcp1 \-P \-I bobby.pub pcp1 \-P \-I alicia.pub
|
||||
.Ve
|
||||
.PP
|
||||
They will see a response as this when done:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& key 0x29A323A2C295D391 added to .pcpvault.
|
||||
.Ve
|
||||
.PP
|
||||
Now, Alicia finally writes the secret message, encrypts it and
|
||||
sends it to Bobby, who in turn decrypts it:
|
||||
.PP
|
||||
.Vb 4
|
||||
\& Alicia Bobby
|
||||
\& echo "Love you, honey" > letter
|
||||
\& pcp1 \-e \-i 0x29A323A2C295D391 \-I letter \-O letter.z85
|
||||
\& cat letter.z85 | mail bobby@foo.bar
|
||||
\&
|
||||
\& pcp1 \-d \-I letter.z85 | less
|
||||
.Ve
|
||||
.PP
|
||||
And that's it.
|
||||
.PP
|
||||
Please note the big difference to \fB\s-1GPG\s0\fR though: both Alicia
|
||||
\&\s-1AND\s0 Bobby have to enter the passphrase for their secret key!
|
||||
That's the way \s-1CURVE25519\s0 works: you encrypt a message using
|
||||
your secret key and the recipients public key and the recipient
|
||||
does the opposite, he uses his secret key and your public key
|
||||
to actually decrypt the message.
|
||||
.PP
|
||||
Oh \- and if you're wondering why I named them Alicia and Bobby:
|
||||
I was just sick of Alice and Bob. We're running NSA-free, so we're
|
||||
using other sample names as well.
|
||||
.SH "PCP1 KEYS"
|
||||
.IX Header "PCP1 KEYS"
|
||||
\&\fBpcp1\fR keys are stored in a binary file, called \fBthe vault\fR.
|
||||
It's by default located in \fB~/.pcpvault\fR but you can of course
|
||||
specify another location using the \fB\-V\fR option.
|
||||
.PP
|
||||
There are two kinds of keys: secret and public keys. In reality
|
||||
a secret key always includes its public key. Both types of keys
|
||||
can be exported to files and transfered to other people who can
|
||||
then import them. You should usually only do this with public keys
|
||||
though.
|
||||
.PP
|
||||
There is a primary secret key which will always used for operations
|
||||
when no keyid has been specified. However, you may have as many
|
||||
secret keys in your vault as you like.
|
||||
.PP
|
||||
Each key can be identified using its \fBkeyid\fR which looks like this:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& 0xD49119E85266509F
|
||||
.Ve
|
||||
.PP
|
||||
A public key exported from a secret key will have the same keyid
|
||||
as the secret key. When using for encryption, the keyid will be
|
||||
added to the message so that the receiver knows who was the
|
||||
sender of the message (\fBThis might change in the future. As of
|
||||
this writing I'm not sure if this was a good idea\fR).
|
||||
.PP
|
||||
If you just want to know details about a key or the vault, use the
|
||||
\&\fB\-t\fR option.
|
||||
.SH "INTERNALS"
|
||||
.IX Header "INTERNALS"
|
||||
\&\s-1FIXME\s0.
|
||||
.SH "Z85 ENCODING"
|
||||
.IX Header "Z85 ENCODING"
|
||||
\&\fBpcp1\fR uses Z85 to encode exported keys and encrypted messages.
|
||||
Therefore it includes a Z85 utility mode:
|
||||
.PP
|
||||
\&\fBpcp1\fR can be used to encode and decode strings to Z85 encoding.
|
||||
.PP
|
||||
The option \fB\-z\fR encodes \fBto\fR Z85, the option \fB\-Z\fR does the opposite
|
||||
and decodes \fBfrom\fR Z85.
|
||||
.PP
|
||||
If no input file have been specified using \fB\-I\fR, \fBpcp1\fR expects the
|
||||
input to come from \fB\s-1STDIN\s0\fR, otherwise it reads the contents
|
||||
of \fBfile\fR.
|
||||
.PP
|
||||
Encoded or decoded output will be written to \fB\s-1STDOUT\s0\fR unless an
|
||||
output file has been specified using the option \fB\-O\fR.
|
||||
.SS "\s-1EXAMPLES\s0"
|
||||
.IX Subsection "EXAMPLES"
|
||||
To encode a given file to Z85 and write the output to another:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& pcp1 \-z myfile.bin > myfile.z85
|
||||
.Ve
|
||||
.PP
|
||||
To decode the file created above and restore the original:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& pcp1 \-Z \-d myfile.z85 > myfile.bin
|
||||
.Ve
|
||||
.PP
|
||||
To encode something from stdin to Z85:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& ps axuw | pcp1 \-z > pslist.z85
|
||||
.Ve
|
||||
.PP
|
||||
To decode the above and print to stdout:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& pcp1 \-Z \-d pslist.z85
|
||||
.Ve
|
||||
.SS "\s-1BACKGROUND\s0"
|
||||
.IX Subsection "BACKGROUND"
|
||||
The Z85 encoding format is described here: \fBhttp://rfc.zeromq.org/spec:32\fR.
|
||||
It's part of ZeroMQ (\fBhttp://zeromq.org\fR). Z85 is based on \s-1ASCII85\s0 with
|
||||
a couple of modifications (portability, readability etc).
|
||||
.PP
|
||||
To fulfil the requirements of the ZeroMQ Z85 functions, \fBpcp1\fR
|
||||
does some additional preparations of raw input before actually doing the
|
||||
encoding, since the input for \fIzmq_z85_encode()\fR must be divisible by 4:
|
||||
.PP
|
||||
Expand the input so that the resulting size is divisible by 4.
|
||||
.PP
|
||||
Fill the added bytes with zeroes.
|
||||
.PP
|
||||
Prepend the input with a one byte value which holds the number of zeroes
|
||||
added in the previous step.
|
||||
.PP
|
||||
Example:
|
||||
.PP
|
||||
Raw input:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& hello\e0
|
||||
.Ve
|
||||
.PP
|
||||
Here, the input size is 6, which is insufficient, therefore it has to be expanded
|
||||
to be 8. After the process the input looks like this:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& 1hello\e0\e0
|
||||
.Ve
|
||||
.PP
|
||||
So, we padded the input with 1 zero (makes 7 bytes) and preprended it with the
|
||||
value 1 (the number of zeros added): makes 8 bytes total.
|
||||
.PP
|
||||
After decoding Z85 input the process will be reversed.
|
||||
.PP
|
||||
\&\fBTrying to use another tool to decode an Z85 encoded string produced
|
||||
by z85, might not work therefore, unless the tool takes the padding scheme
|
||||
outlined above into account\fR.
|
||||
.SH "COPYRIGHT"
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright (c) 2013 by T.Linden <tom \s-1AT\s0 cpan \s-1DOT\s0 org>
|
||||
.SH "ADDITIONAL COPYRIGHTS"
|
||||
.IX Header "ADDITIONAL COPYRIGHTS"
|
||||
.IP "\fBZeroMQ Z85 encoding routine\fR" 4
|
||||
.IX Item "ZeroMQ Z85 encoding routine"
|
||||
.Vb 5
|
||||
\& Copyright (c) 2007\-2013 iMatix Corporation
|
||||
\& Copyright (c) 2009\-2011 250bpm s.r.o.
|
||||
\& Copyright (c) 2010\-2011 Miru Limited
|
||||
\& Copyright (c) 2011 VMware, Inc.
|
||||
\& Copyright (c) 2012 Spotify AB
|
||||
.Ve
|
||||
.IP "\fBTarsnap readpass helpers\fR" 4
|
||||
.IX Item "Tarsnap readpass helpers"
|
||||
.Vb 1
|
||||
\& Copyright 2009 Colin Percival
|
||||
.Ve
|
||||
.IP "\fB\f(BIjen_hash()\fB hash algorithm\fR" 4
|
||||
.IX Item "jen_hash() hash algorithm"
|
||||
.Vb 1
|
||||
\& Bob Jenkins, Public Domain.
|
||||
.Ve
|
||||
.IP "\fB\s-1UTHASH\s0 hashing macros\fR" 4
|
||||
.IX Item "UTHASH hashing macros"
|
||||
.Vb 1
|
||||
\& Copyright (c) 2003\-2013, Troy D. Hanson
|
||||
.Ve
|
||||
.IP "\fBRandom art image from OpenSSH keygen\fR" 4
|
||||
.IX Item "Random art image from OpenSSH keygen"
|
||||
.Vb 1
|
||||
\& Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||
\&
|
||||
\& Comitted by Alexander von Gernler in rev 1.7.
|
||||
.Ve
|
||||
.PP
|
||||
Every incorporated source code is opensource and licensed
|
||||
under the \fB\s-1GPL\s0\fR as well.
|
||||
.SH "AUTHORS"
|
||||
.IX Header "AUTHORS"
|
||||
\&\fIT.Linden <tom \s-1AT\s0 cpan \s-1DOT\s0 org\fR>
|
||||
.SH "LICENSE"
|
||||
.IX Header "LICENSE"
|
||||
Licensed under the \s-1GNU\s0 \s-1GENERAL\s0 \s-1PUBLIC\s0 \s-1LICENSE\s0 version 3.
|
||||
.SH "HOME"
|
||||
.IX Header "HOME"
|
||||
The homepage of Pretty Curved Privacy can be found on
|
||||
http://www.daemon.de/PrettyCurvedPrivacy. The source is
|
||||
on Github: https://github.com/TLINDEN/pcp
|
||||
306
man/pcp1.pod
Normal file
306
man/pcp1.pod
Normal file
@@ -0,0 +1,306 @@
|
||||
=head1 NAME
|
||||
|
||||
Pretty Curved Privacy - File encryption using eliptic curve cryptography.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
|
||||
Usage: pcp1 [options]
|
||||
|
||||
General Options:
|
||||
-V --vault <vaultfile> Specify an alternate vault file.
|
||||
The deault vault is ~/.pcpvault.
|
||||
-O --outfile <file> Output file. If not specified, stdout
|
||||
will be used.
|
||||
-I --infile <file> Input file. If not specified, stdin
|
||||
will be used.
|
||||
-i --keyid <id> Specify a key id to import/export.
|
||||
-t --text Print textual representation of some
|
||||
item. Either -V or -i must be specified
|
||||
as well.
|
||||
-h --help Print this help message.
|
||||
-v --version Print program version.
|
||||
-D --debug Enable debug output.
|
||||
|
||||
Keymanagement Options:
|
||||
-k --keygen Generate a CURVE25519 secret key. If
|
||||
the generated key is the first one in
|
||||
your vault, it will become the primary
|
||||
secret key.
|
||||
-l --listkeys List all keys currently stored in your
|
||||
vault. Only the key id's and some info
|
||||
about the keys will be printed, not the
|
||||
actual keys.
|
||||
-r --remove-key Remove a key from the vault. Requires
|
||||
option -i <keyid>.
|
||||
-s --export-secret Export a secret key. If your vault only
|
||||
contains one secret key, this one will
|
||||
be exported. If a key id have been
|
||||
specified (-i), this one will be used.
|
||||
If there are more than one secret keys
|
||||
in the vault and no key id has been
|
||||
given, export the primary secret key.
|
||||
Use -O to export to a file.
|
||||
-p --export-public Export a public key. If no key id have
|
||||
been specified, the public part of your
|
||||
primary secret key will be exported.
|
||||
Use -O to export to a file.
|
||||
-S --import-secret Import a secret key. Use -I to import
|
||||
from a file.
|
||||
-P --import-public Import a public key. Use -I to import
|
||||
from a file.
|
||||
|
||||
Encryption Options:
|
||||
-e --encrypt Encrypt a message. Read from stdin or
|
||||
specified via -I. A keyid (-i) of the
|
||||
public key of the receipient must be
|
||||
specified. Output to stdout or written
|
||||
to the file specified via -O.
|
||||
-d --decrypt Decrypt a message. Read from stdin or
|
||||
specified via -I. Output to stdout or
|
||||
written to the file specified via -O.
|
||||
The primary secret key will be used for
|
||||
decryption, if there is no primary and
|
||||
just one secret key in the vault, this
|
||||
one will be used. Otherwise you'll have
|
||||
to specify the keyid (-i) of the key.
|
||||
|
||||
Encoding Options:
|
||||
-z --z85-encode Encode something to Z85 encoding. Use
|
||||
-I and -O respectively, otherwise it
|
||||
stdin/stdout.
|
||||
-Z --z85-decode Decode something from Z85 encoding. Use
|
||||
-I and -O respectively, otherwise it
|
||||
stdin/stdout
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<Pretty Curved Privacy> (pcp1) is a commandline utility which can
|
||||
be used to encrypt files. B<pcp1> uses eliptc curve cryptography
|
||||
for encryption (CURVE25519 by Dan J. Bernstein). While CURVE25519
|
||||
is no worldwide accepted standard it hasn't been compromised by
|
||||
the NSA - which might be better, depending on your point of view.
|
||||
|
||||
B<Caution>: since CURVE25519 is no accepted standard, B<pcp1> has
|
||||
to be considered as experimental software. In fact, I wrote it just
|
||||
to learn about the curve and see how it works.
|
||||
|
||||
Beside some differences it works like B<GNUPG>. So, if you already
|
||||
know how to use gpg, you'll feel almost home.
|
||||
|
||||
=head1 QUICKSTART
|
||||
|
||||
Lets say, Alicia and Bobby want to exchange encrypted messages.
|
||||
Here's what the've got to do.
|
||||
|
||||
First, both have create a secret key:
|
||||
|
||||
Alicia Bobby
|
||||
pcp1 -k pcp1 -k
|
||||
|
||||
After entering their name, email address and a passphrase to protect
|
||||
the key, it will be stored in their B<vault file> (by default ~/.pcpvault).
|
||||
|
||||
Now, both of them have to export the public key part of their key:
|
||||
|
||||
Alicia Bobby
|
||||
pcp1 -p -O alicia.pub pcp1 -p -O bobby.pub
|
||||
|
||||
They've to exchange the public key somehow (which is not my
|
||||
problem at the moment, use ssh, encrypted mail, whatever). Once exchanged,
|
||||
they have to import it:
|
||||
|
||||
|
||||
Alicia Bobby
|
||||
pcp1 -P -I bobby.pub pcp1 -P -I alicia.pub
|
||||
|
||||
They will see a response as this when done:
|
||||
|
||||
key 0x29A323A2C295D391 added to .pcpvault.
|
||||
|
||||
Now, Alicia finally writes the secret message, encrypts it and
|
||||
sends it to Bobby, who in turn decrypts it:
|
||||
|
||||
Alicia Bobby
|
||||
echo "Love you, honey" > letter
|
||||
pcp1 -e -i 0x29A323A2C295D391 -I letter -O letter.z85
|
||||
cat letter.z85 | mail bobby@foo.bar
|
||||
|
||||
pcp1 -d -I letter.z85 | less
|
||||
|
||||
And that's it.
|
||||
|
||||
Please note the big difference to B<GPG> though: both Alicia
|
||||
AND Bobby have to enter the passphrase for their secret key!
|
||||
That's the way CURVE25519 works: you encrypt a message using
|
||||
your secret key and the recipients public key and the recipient
|
||||
does the opposite, he uses his secret key and your public key
|
||||
to actually decrypt the message.
|
||||
|
||||
Oh - and if you're wondering why I named them Alicia and Bobby:
|
||||
I was just sick of Alice and Bob. We're running NSA-free, so we're
|
||||
using other sample names as well.
|
||||
|
||||
|
||||
=head1 PCP1 KEYS
|
||||
|
||||
B<pcp1> keys are stored in a binary file, called B<the vault>.
|
||||
It's by default located in B<~/.pcpvault> but you can of course
|
||||
specify another location using the B<-V> option.
|
||||
|
||||
There are two kinds of keys: secret and public keys. In reality
|
||||
a secret key always includes its public key. Both types of keys
|
||||
can be exported to files and transfered to other people who can
|
||||
then import them. You should usually only do this with public keys
|
||||
though.
|
||||
|
||||
There is a primary secret key which will always used for operations
|
||||
when no keyid has been specified. However, you may have as many
|
||||
secret keys in your vault as you like.
|
||||
|
||||
Each key can be identified using its B<keyid> which looks like this:
|
||||
|
||||
0xD49119E85266509F
|
||||
|
||||
A public key exported from a secret key will have the same keyid
|
||||
as the secret key. When using for encryption, the keyid will be
|
||||
added to the message so that the receiver knows who was the
|
||||
sender of the message (B<This might change in the future. As of
|
||||
this writing I'm not sure if this was a good idea>).
|
||||
|
||||
If you just want to know details about a key or the vault, use the
|
||||
B<-t> option.
|
||||
|
||||
=head1 INTERNALS
|
||||
|
||||
FIXME.
|
||||
|
||||
=head1 Z85 ENCODING
|
||||
|
||||
B<pcp1> uses Z85 to encode exported keys and encrypted messages.
|
||||
Therefore it includes a Z85 utility mode:
|
||||
|
||||
B<pcp1> can be used to encode and decode strings to Z85 encoding.
|
||||
|
||||
The option B<-z> encodes B<to> Z85, the option B<-Z> does the opposite
|
||||
and decodes B<from> Z85.
|
||||
|
||||
If no input file have been specified using B<-I>, B<pcp1> expects the
|
||||
input to come from B<STDIN>, otherwise it reads the contents
|
||||
of B<file>.
|
||||
|
||||
Encoded or decoded output will be written to B<STDOUT> unless an
|
||||
output file has been specified using the option B<-O>.
|
||||
|
||||
=head2 EXAMPLES
|
||||
|
||||
To encode a given file to Z85 and write the output to another:
|
||||
|
||||
pcp1 -z myfile.bin > myfile.z85
|
||||
|
||||
To decode the file created above and restore the original:
|
||||
|
||||
pcp1 -Z -d myfile.z85 > myfile.bin
|
||||
|
||||
To encode something from stdin to Z85:
|
||||
|
||||
ps axuw | pcp1 -z > pslist.z85
|
||||
|
||||
To decode the above and print to stdout:
|
||||
|
||||
pcp1 -Z -d pslist.z85
|
||||
|
||||
=head2 BACKGROUND
|
||||
|
||||
The Z85 encoding format is described here: B<http://rfc.zeromq.org/spec:32>.
|
||||
It's part of ZeroMQ (B<http://zeromq.org>). Z85 is based on ASCII85 with
|
||||
a couple of modifications (portability, readability etc).
|
||||
|
||||
To fulfil the requirements of the ZeroMQ Z85 functions, B<pcp1>
|
||||
does some additional preparations of raw input before actually doing the
|
||||
encoding, since the input for zmq_z85_encode() must be divisible by 4:
|
||||
|
||||
Expand the input so that the resulting size is divisible by 4.
|
||||
|
||||
Fill the added bytes with zeroes.
|
||||
|
||||
Prepend the input with a one byte value which holds the number of zeroes
|
||||
added in the previous step.
|
||||
|
||||
Example:
|
||||
|
||||
Raw input:
|
||||
|
||||
hello\0
|
||||
|
||||
Here, the input size is 6, which is insufficient, therefore it has to be expanded
|
||||
to be 8. After the process the input looks like this:
|
||||
|
||||
1hello\0\0
|
||||
|
||||
So, we padded the input with 1 zero (makes 7 bytes) and preprended it with the
|
||||
value 1 (the number of zeros added): makes 8 bytes total.
|
||||
|
||||
After decoding Z85 input the process will be reversed.
|
||||
|
||||
B<Trying to use another tool to decode an Z85 encoded string produced
|
||||
by z85, might not work therefore, unless the tool takes the padding scheme
|
||||
outlined above into account>.
|
||||
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2013 by T.Linden <tom AT cpan DOT org>
|
||||
|
||||
=head1 ADDITIONAL COPYRIGHTS
|
||||
|
||||
=over
|
||||
|
||||
=item B<ZeroMQ Z85 encoding routine>
|
||||
|
||||
Copyright (c) 2007-2013 iMatix Corporation
|
||||
Copyright (c) 2009-2011 250bpm s.r.o.
|
||||
Copyright (c) 2010-2011 Miru Limited
|
||||
Copyright (c) 2011 VMware, Inc.
|
||||
Copyright (c) 2012 Spotify AB
|
||||
|
||||
=item B<Tarsnap readpass helpers>
|
||||
|
||||
Copyright 2009 Colin Percival
|
||||
|
||||
=item B<jen_hash() hash algorithm>
|
||||
|
||||
Bob Jenkins, Public Domain.
|
||||
|
||||
=item B<UTHASH hashing macros>
|
||||
|
||||
Copyright (c) 2003-2013, Troy D. Hanson
|
||||
|
||||
=item B<Random art image from OpenSSH keygen>
|
||||
|
||||
Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||
|
||||
Comitted by Alexander von Gernler in rev 1.7.
|
||||
|
||||
=back
|
||||
|
||||
Every incorporated source code is opensource and licensed
|
||||
under the B<GPL> as well.
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
I<T.Linden <tom AT cpan DOT org>>
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Licensed under the GNU GENERAL PUBLIC LICENSE version 3.
|
||||
|
||||
=head1 HOME
|
||||
|
||||
The homepage of Pretty Curved Privacy can be found on
|
||||
http://www.daemon.de/PrettyCurvedPrivacy. The source is
|
||||
on Github: https://github.com/TLINDEN/pcp
|
||||
|
||||
=cut
|
||||
231
man/z85.1
Normal file
231
man/z85.1
Normal file
@@ -0,0 +1,231 @@
|
||||
.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "Z85 1"
|
||||
.TH Z85 1 "2013-10-25" "Z85 0.0.1" "USER CONTRIBUTED DOCUMENTATION"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
z85 \- encode and decode strings to Z85 encoding.
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& Usage: z85 [options] [<file>]
|
||||
\&
|
||||
\& Options:
|
||||
\& \-e encode input to Z85
|
||||
\& \-d decode input from Z85
|
||||
\& \-h print this help message
|
||||
\& \-v print program version
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBz85\fR can be used to encode and decode strings to Z85 encoding.
|
||||
.PP
|
||||
The option \fB\-e\fR encodes \fBto\fR Z85, which is the default if
|
||||
no option have been specified. The option \fB\-d\fR does the opposite
|
||||
and decodes b<from> Z85.
|
||||
.PP
|
||||
If no input file have been specified, \fBz85\fR expects the
|
||||
input to come from \fB\s-1STDIN\s0\fR, otherwise it reads the contents
|
||||
of \fBfile\fR.
|
||||
.PP
|
||||
Encoded or decoded output will always be written to \fB\s-1STDOUT\s0\fR.
|
||||
.SH "EXAMPLES"
|
||||
.IX Header "EXAMPLES"
|
||||
To encode a given file to Z85 and write the output to another:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& z85 \-e myfile.bin > myfile.z85
|
||||
.Ve
|
||||
.PP
|
||||
To decode the file created above and restore the original:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& z85 \-d myfile.z85 > myfile.bin
|
||||
.Ve
|
||||
.PP
|
||||
To encode something from stdin to Z85:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& ps axuw | z85 > pslist.z85
|
||||
.Ve
|
||||
.PP
|
||||
To decode the above and print to stdout:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& z85 \-d pslist.z85
|
||||
.Ve
|
||||
.SH "BACKGROUND"
|
||||
.IX Header "BACKGROUND"
|
||||
The Z85 encoding format is described here: <http://rfc.zeromq.org/spec:32>.
|
||||
It's part of ZeroMQ (<http://zeromq.org>). Z85 is based on \s-1ASCII85\s0 with
|
||||
a couple of modifications (portability, readability etc).
|
||||
.PP
|
||||
To fulfil the requirements of the ZeroMQ Z85 functions, the \fBz85\fR utility
|
||||
does some additional preparations of raw input before actually doing the
|
||||
encoding, since the input for \fIzmq_z85_encode()\fR must be divisible by 4:
|
||||
.PP
|
||||
Expand the input so that the resulting size is divisible by 4.
|
||||
.PP
|
||||
Fill the added bytes with zeroes.
|
||||
.PP
|
||||
Prepend the input with a one byte value which holds the number of zeroes
|
||||
added in the previous step.
|
||||
.PP
|
||||
Example:
|
||||
.PP
|
||||
Raw input:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& hello\e0
|
||||
.Ve
|
||||
.PP
|
||||
Here, the input size is 6, which is insufficient, therefore it has to be expanded
|
||||
to be 8. After the process the input looks like this:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& 1hello\e0\e0
|
||||
.Ve
|
||||
.PP
|
||||
So, we padded the input with 1 zero (makes 7 bytes) and preprended it with the
|
||||
value 1 (the number of zeros added): makes 8 bytes total.
|
||||
.PP
|
||||
After decoding Z85 input the process will be reversed.
|
||||
.PP
|
||||
\&\fBTrying to use another tool to decode an Z85 encoded string produced
|
||||
by z85, might not work therefore, unless the tool takes the padding scheme
|
||||
outlined above into account\fR.
|
||||
.SH "COPYRIGHT"
|
||||
.IX Header "COPYRIGHT"
|
||||
Copyright (c) 2013 by T.Linden <tom \s-1AT\s0 cpan \s-1DOT\s0 org>
|
||||
.SH "AUTHORS"
|
||||
.IX Header "AUTHORS"
|
||||
\&\fIT.Linden <tom \s-1AT\s0 cpan \s-1DOT\s0 org\fR>
|
||||
.SH "LICENSE"
|
||||
.IX Header "LICENSE"
|
||||
Licensed under the \s-1GNU\s0 \s-1GENERAL\s0 \s-1PUBLIC\s0 \s-1LICENSE\s0 version 3.
|
||||
99
man/z85.pod
Normal file
99
man/z85.pod
Normal file
@@ -0,0 +1,99 @@
|
||||
# -*-cperl-*-
|
||||
|
||||
=head1 NAME
|
||||
|
||||
z85 - encode and decode strings to Z85 encoding.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
Usage: z85 [options] [<file>]
|
||||
|
||||
Options:
|
||||
-e encode input to Z85
|
||||
-d decode input from Z85
|
||||
-h print this help message
|
||||
-v print program version
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<z85> can be used to encode and decode strings to Z85 encoding.
|
||||
|
||||
The option B<-e> encodes B<to> Z85, which is the default if
|
||||
no option have been specified. The option B<-d> does the opposite
|
||||
and decodes b<from> Z85.
|
||||
|
||||
If no input file have been specified, B<z85> expects the
|
||||
input to come from B<STDIN>, otherwise it reads the contents
|
||||
of B<file>.
|
||||
|
||||
Encoded or decoded output will always be written to B<STDOUT>.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
To encode a given file to Z85 and write the output to another:
|
||||
|
||||
z85 -e myfile.bin > myfile.z85
|
||||
|
||||
To decode the file created above and restore the original:
|
||||
|
||||
z85 -d myfile.z85 > myfile.bin
|
||||
|
||||
To encode something from stdin to Z85:
|
||||
|
||||
ps axuw | z85 > pslist.z85
|
||||
|
||||
To decode the above and print to stdout:
|
||||
|
||||
z85 -d pslist.z85
|
||||
|
||||
=head1 BACKGROUND
|
||||
|
||||
The Z85 encoding format is described here: L<http://rfc.zeromq.org/spec:32>.
|
||||
It's part of ZeroMQ (L<http://zeromq.org>). Z85 is based on ASCII85 with
|
||||
a couple of modifications (portability, readability etc).
|
||||
|
||||
To fulfil the requirements of the ZeroMQ Z85 functions, the B<z85> utility
|
||||
does some additional preparations of raw input before actually doing the
|
||||
encoding, since the input for zmq_z85_encode() must be divisible by 4:
|
||||
|
||||
Expand the input so that the resulting size is divisible by 4.
|
||||
|
||||
Fill the added bytes with zeroes.
|
||||
|
||||
Prepend the input with a one byte value which holds the number of zeroes
|
||||
added in the previous step.
|
||||
|
||||
Example:
|
||||
|
||||
Raw input:
|
||||
|
||||
hello\0
|
||||
|
||||
Here, the input size is 6, which is insufficient, therefore it has to be expanded
|
||||
to be 8. After the process the input looks like this:
|
||||
|
||||
1hello\0\0
|
||||
|
||||
So, we padded the input with 1 zero (makes 7 bytes) and preprended it with the
|
||||
value 1 (the number of zeros added): makes 8 bytes total.
|
||||
|
||||
After decoding Z85 input the process will be reversed.
|
||||
|
||||
B<Trying to use another tool to decode an Z85 encoded string produced
|
||||
by z85, might not work therefore, unless the tool takes the padding scheme
|
||||
outlined above into account>.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2013 by T.Linden <tom AT cpan DOT org>
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
I<T.Linden <tom AT cpan DOT org>>
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Licensed under the GNU GENERAL PUBLIC LICENSE version 3.
|
||||
|
||||
=cut
|
||||
|
||||
Reference in New Issue
Block a user