<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML LANG="en-US">
<head profile="http://dublincore.org/documents/dcq-html/">
<TITLE>Encryption batch files for Yarn</TITLE>
<BASE HREF="http://www.alt-security-keydist.info/yarn/">

<META name="description" CONTENT="A collection of cryptography-related batch files for the yarn offline mail reader.">
<meta name="keywords" content="Yarn, offline reader, encryption">
<meta name="DCTERMS.created" scheme="DCTERMS.W3CDTF" content="1996-03-31">

<link rel="Top" href="/">
<link rel="Index Search" href="/search">
<link rel="Author" rev="Made" href="mailto:michael@bauser.com" title="Michael Bauser">
<link rel="meta" href="/rdfscrape?path=%2Fyarn%2Findex" type="application/rdf+xml">
<link rel="styleSheet" type="text/javascript" href="/yellow.jss">
<link rel="styleSheet" type="text/css" href="/yellow.css" media="screen">
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/">
</HEAD><BODY>
<p id="logo"><a href="/">alt.security.keydist Resources</a></p>

<div id="entries">
<div id="intro">

<h1>Public Key Encryption and the Yarn offline newsreader</h1>

<p><a href="http://www.vex.net/yarn/">Yarn</a> is a freeware offline
mail/news reader written by Chin Huang. It hasn't been updated in a few
years, but it's still my preferred newsreader when I have to use a dial-up
account to access Usenet. One of the reasons I like Yarn is that its
programmer included a simple but extensible interface to <acronym
title="Pretty Good Privacy">PGP</acronym> using <acronym title="Microsoft
Disk Operation System">MS-DOS</acronym> batch files. This is a collection
of batch files I've written over the years to test Yarn's ability to
support other encryption formats.</p> </div> <div class="section">

<h2 id="MIME"><acronym title="Pretty Good Privacy">PGP</acronym>/<acronym
title="Multipurpose Internet Mail Extensions">MIME</acronym></h2>

<p>Yarn ships with support for both <acronym title="Pretty Good
Privacy">PGP</acronym> and <acronym title="Multipurpose Internet Mail
Extensions">MIME</acronym> (using batch files and <A
HREF="ftp://ftp.bellcore.com/pub/nsb/metamail">metamail</A>, respectively),
but doesn't mention the <acronym title="Pretty Good
Privacy">PGP</acronym>/<acronym title="Multipurpose Internet Mail
Extensions">MIME</acronym> standard specified in <a href=
"http://www.ietf.org/rfc/rfc3156.txt" >RFC 3156</a>. Some basic <acronym
title="Pretty Good Privacy">PGP</acronym>/<acronym title="Multipurpose
Internet Mail Extensions">MIME</acronym> support can be added to yarn with
two new batch files.</p>

<p><A HREF="me-pgpe.bat">ME-PGPE.BAT</A> (a replacement for Yarn's usual
PGPE.BAT) encrypts <acronym title="Pretty Good Privacy">PGP</acronym>
messages as RFC 3156-compliant multipart/encrypted messages. (Note: This
batch file worked fine when I used it on a true <acronym title="Disk
Operating System">DOS</acronym> system, but it fails miserably in a Windows
<acronym title="Disk Operating System">DOS</acronym> box.) <A HREF=
"showpgp.bat" >SHOWPGP.BAT</A> works with metamail to decrypt the
multipart/encrypted and application/pgp-keys message formats.</p> </div>
<div class="section">

<h2 id="GPG">GNU Privacy Guard</h2>

<p><a href="FAQ#GPG">GPG (GNU Privacy Guard)</a> is an open source
implementation of the Open<acronym title="Pretty Good
Privacy">PGP</acronym> standard. There is no purely <acronym title="Disk
Operating System">DOS</acronym> version of <acronym title="GNU Privacy
Guard">GPG</acronym>, but the Windows version is a command-line program
that can be run from a batch file.</p>

<p><a href="gpge.bat">GPGE.BAT</a> signs and/or encrypts outgoing messages,
while <a href="gpgd.bat">GPGD.BAT</a> decrypts them to the screen. <a
href="showgpg.bat">SHOWGPG.BAT</a> is a GPG version version of
SHOWPGP.BAT</p>
</div>
<div class="section">

<h2 ID="RIPEM"><acronym title="Riordan's Privacy Enhanced Mail">RIPEM</acronym></h2>

<p><acronym title="Riordan's Privacy Enhanced Mail">RIPEM</acronym>
(Riordan's Privacy Enhanced Mail) was developed in 1991 by Mark Riordan as
a freeware demo implementation of the <acronym title="Privacy Enhanced
Mail">PEM</acronym> standard. <acronym title="Privacy Enhanced
Mail">PEM</acronym> was supseded by <acronym title="MIME Object Security
Standard">MOSS</acronym> and <acronym title="Secure Multipurpose Internet
Mail Extensions">S/MIME</acronym>, and development of <acronym
title="Riordan's Privacy Enhanced Mail">RIPEM</acronym> ended around 1997.
(<a href="FAQ#RIPEM"><acronym title="Riordan's Privacy Enhanced
Mail">RIPEM</acronym>'s source code is still available</a> but the
pre-compiled <acronym title="Disk Operating System">DOS</acronym> binaries
are no longer distributed on the Internet.)</p>

<p><A HREF="ripeme.bat">RIPEME.BAT</A> signs and/or encrypts messages
(using a hidden Yarn feature to figure which behavior is expected), while
<A HREF= "ripemd.bat" >RIPEMD.BAT</A> decrypts/verifies them.</p>
</div>
<div class="section">

<h2 id="Sifr">Sifr</h2>

<p>Sifr was a public key encryption program written by C.T. Skinner to
demonstrate the LUC algorithm. Skinner seems to have disappeared from the
Web, but <a href="FAQ#Sifr">the <acronym title="Disk Operating
System">DOS</acronym> version of Sifr is still available at a few European
software archives</a>.</p>

<p><a href="sifrsig.bat">SIFRSIG.BAT</a> armor-signs messages (Sifr
doesn't do clear-signing), while <a href="sifrd.bat">SIFRD.BAT</a>
decrypts/verifies them. There's no batch file for encryption because Sifr
requires a command-line parameter (the filename of the recipient's public
key) that Yarn doesn't know.</p>
</div></div>

<div id="sidebar">

<h2>Writing your own batch files</h2>

<p>In case you need to write your own encryption-related batch files for
Yarn, here's an explanation of the variables Yarn uses to share files with
its batch files.</p>

<p>The variable <var>%f</var> is the input file passed to the batch file.
<var>%f</var> is <var>$HOME/YARN/MESSAGE</var> for all four encryption
commands.</p>

<p>The variable <var>%o</var> is the output file that Yarn needs the
batch file to produce. The output file name depends on which command is
being used: For "encrypt" and "secret-sign", the output file is
<var>$HOME/YARN/CIPHER</var>; For "decrypt", the output file is
<var>$HOME/YARN/BODY</var>. The "decrypt-view" command does not
accept or return <var>%o</var>.</p>

<p>The "encrypt" command also passes a third "secret variable" -- the
recipient's e-mail address is attached to the end of the command line. (The
GPGE.BAT and RIPEME.BAT batch files, for example, use <code>-r %3</code> to
grab that variable.)</p>

<p>Yarn stores the messages headers in the text file
<var>$HOME/YARN/HEADERS</var> while processing the message body. They can
be manipulated using text processors like sed(1) or awk(1). (<acronym
title="Disk Operating System">DOS</acronym> ports of both of sed(1) and
awk(1) are available at <a href="http://www.SimTel.net/">SimTel</a>.)</p>

<div id="ads">
<iframe marginwidth="0" marginheight="0" width="120" height="240"
scrolling="no" frameborder="0"
src="http://rcm.amazon.com/e/cm?t=michaelbausercom&amp;l=st1&amp;search=encryption&amp;mode=books&amp;p=8&amp;o=1&amp;f=ifr">
<MAP NAME="boxmap-p8"><AREA SHAPE="RECT" COORDS="14, 200, 103, 207"
HREF="http://rcm.amazon.com/e/cm/privacy-policy.html?o=1" alt="Shop"><AREA
COORDS="0,0,10000,10000"
HREF="http://www.amazon.com/exec/obidos/redirect-home/michaelbausercom"
alt=" at "></map><img src="http://rcm-images.amazon.com/images/G/01/rcm/120x240.gif"
width="120" height="240" border="0" usemap="#boxmap-p8" alt="Amazon.com">
</iframe>
</div>
</div>
<address>http://www.alt-security-keydist.info/yarn/ Copyright &copy; 1996-2004 <a
href="mailto:michael@bauser.com">michael&#64;bauser.com</a></address>
</body></html>

