### -*-sh-*- ### ### Key type for REOP ### ### (c) 2015 Mark Wooding ### ###----- Licensing notice --------------------------------------------------- ### ### This file is part of the distorted.org.uk key management suite. ### ### distorted-keys is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by ### the Free Software Foundation; either version 2 of the License, or ### (at your option) any later version. ### ### distorted-keys is distributed in the hope that it will be useful, ### but WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ### GNU General Public License for more details. ### ### You should have received a copy of the GNU General Public License ### along with distorted-keys; if not, write to the Free Software Foundation, ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. defprops k_props <>$tmp/ct cat $tmp/ct } k_decrypt () { base=$1 nub=$2 sed -n " /^-----BEGIN REOP PUBLIC KEY-----\$/,/^-----END REOP PUBLIC KEY-----\$/ \ w $tmp/pub /^-----BEGIN REOP ENCRYPTED MESSAGE-----\$/,/^-----END REOP ENCRYPTED MESSAGE-----\$/ \ w $tmp/ct" REOP_PASSPHRASE=$(cat "$nub") \ reop -D -s"$base/sec" -p$tmp/pub -m- -x$tmp/ct } k_sign () { base=$1 nub=$2 REOP_PASSPHRASE=$(cat "$nub") \ reop -S -s"$base/sec" -m- -x- } k_verify () { base=$1 sig=$3 echo "$sig" >$tmp/sig reop -Vq -p"$base/pub" -m- -x$tmp/sig } ###----- That's all, folks --------------------------------------------------