🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #251844

Re: Rooster's Method of batch decryption

#251844
From: Rooster
Date: Tue, 08 Nov 2011 08:53
167 lines
7892 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[snip]

> > Actually it moves fairly quickly, just depending on how
> > many messages you have and how many passwords are in your list.
>
> [snip]
>
>
> I believe I will be able to come up with some other refinements of my batch
> decryption method, and I will share them here.  It's always nice to have
> alternatives.  Thanks.

Indeed i have found another way to cut out a huge amount of time required for my
method, and i want to explain it now.  It applies to those persons whose
messages have symmetric encryption on their outer layers.

I have done some testing, and i found that many of the messages appearing in
'a.a.m.', roughly 40 percent of them, have no outer symmetric encryption on
them; they have instead a public key encryption on their outer layer.  this
number is an estimate and it will vary down a bit or up to as much as 50 percent
on an average day, during the random period i was testing.

For many, if not most, of us the messages we expect to get will contain
symmetric encryption on the outer layer because we want the additional anonymity
provided by having it. This means we can altogether skip trying to decipher
those other messages that have no outer symmetric key encryption.  We can cut
the number of messages we should try to decipher by about 40 to 50 percent on
average.

furthermore, in my testing i also found, as you would expect, that the
individual time required for processing each messages with only symmetric
encryption is much less because those with public key encryption are for the
most part made with anonymous recipients (e.g., throw-key ID), and the process
has to try each secret key when it passes over the message since it does not
know which key should be used.  Consequently, removing these messages from the
pool of message to process has a much greater effect than only 40 to 50 percent
of time-savings, depending especially on how many secret keys you have on your
key-ring.

Personally, i saw a huge savings after eliminating this kind of message.  I was
able to do so by working out a sub-routine in the batch file i presented
earlier.  By using some of the commands available directly from gpg itself, I
could identify the messages that had public key encryption on their outer layer;
and parsing it with Windows native shell commands, it was not difficult to
identify and remove messages in the batch process.

I have added this routine to the batch file, and i will provide it here again.
yet, i should mention that this additional part is totally optional.  in fact, i
built into the batch file as part of the routine a place where you can answer
yes or no as to whether you want to remove this sort of file beforehand.  if you
select not to remove them, it will proceed just as before; if you choose to
remove them, it will first delete all of those messages with this kind of
encryption and it will then proceed as before.

i have clearly indicated in the batch file the new part.  it is your choice
whether to add it in.  The time saved by deleting them is substantial. Her is
the new batch file:

- --------------------

rem: The folder where you execute this batch file
rem: should have ONLY this batch file, the
rem: password-file, and the messages for decrypting.
pause
@ECHO.
@ECHO Beginning Rooster's Method for batch decryption:
@ECHO.
RENAME *.txt *.asc
@ECHO off
IF errorlevel 1 GOTO EOF
SET "pword="

rem Begin OPTIONAL BLOCK--

rem: This block routine removes spaces from erratic filenames
dir /b /a-d *.asc>temp.txt
for /f "tokens=*" %%* in (temp.txt) do call:sub %%*
del temp.txt
goto :jump

:sub
ren "%*" %1%2%3%4%5%6%7%8%9
goto :eof
:jump
rem: end routine to remove spaces from filenames

rem: This block routine allows you to remove all
rem: messages without outer symmetric encryption
SET counter=0
:optional
SET "decision="
IF /i %counter%==3 (ECHO  You have exceeded 3X. Batch processing will now
cease.) & GOTO EOF
SET /a counter=%counter%+1
cls
ECHO   This is try # %counter%. You will get three tries.
ECHO.
SET /p decision=  Do you want to search only files with an outer layer of
symmetric encryption? If you know that your messages have an outer layer of
symmetric encryption, then you should select "yes." If you do select "yes", then
all files having only public key encryption will be deleted first, before
decryption begins.  This can save a lot of time. You must type Y or N and hit
enter.  ^(Y or ^N)?
ECHO.
IF NOT DEFINED decision GOTO optional
IF /i %decision%==N GOTO variable
IF /i NOT %decision%==Y GOTO optional
FOR %%f in (*.asc) do gpg --list-only --status-fd 1 %%f | find /i "enc_to" &&
del %%f
rem: end routine for removing messages without outer symmetric encryption

rem End OPTIONAL BLOCK--

:variable
SET /p pword=<password-file
IF NOT DEFINED pword GOTO endprocess ELSE GOTO decipher
:decipher
FOR %%G IN (*.asc) DO echo %pword%|gpg --batch --passphrase-fd 0 --decrypt-files
%%G
FOR /F "skip=1" %%A IN (password-file) DO @echo %%A>>password-file2
IF NOT EXIST password-file2 GOTO endprocess
ATTRIB -R password-file
MOVE /y password-file2 password-file
GOTO variable
:endprocess
ERASE /f password-file
ECHO There are no more passwords in the password-file.
SET "pword="
ECHO Your messages, if any, have been deciphered.
ECHO Removing undeciphered messages...
ERASE /f *.asc
:EOF
ECHO The batch has finished processing.
- --------------------------------------------

I have tested it and found no problems.  i do not expect you will have any
either.  please feel free to ask any questions about it.  i do believe that i
will be able to come up with even more additions or changes to this procedure
that will help save still more time for some persons. hopefully, this
improvement and time-savings will address some of the concerns you may have
about using my method for batch decryption while avoiding the subject
identification step. I believe it has much merit, and i offer it as an
alternative method.  i like options.

-----BEGIN PGP SIGNATURE-----
Version: N/A

iQGcBAEBAgAGBQJOuOYuAAoJEO3Co03SMUtB1pEMAM4RYravtaO1yyVrIE/5t3sw
0LE0WGGwG6EbH8N8nTsN9QmDXzsrydcDya0/emCHDVGcT46WQ45Tx63JOAZComFU
3WWv8nofGu2U5phnS1PxP52uaC/LeyFmqlo6kz1JrIjP0bvBbDfdnYUUamOQZGYq
HjZnVZKlGlcYKiDd/qJdA0RZBvh1Urcqaa4eIRSXJmojuS1+QTGjYjwrQPyJFjgw
TWZD6JtXqcORjt3SfC2OAqJxsV2orIKBTSbR6mIkaoMR69oVuBGLl8dLTBnIMYWf
sU8ZOgyVZ179w1UC/NLgYhRxUsG4p1e8FlJYbdhGvxJxA2zs+kZ65cGZi21uZWGS
1jbTB8ib3IAa/6vJE8Y1F52fQHRQsG9Az5icXlD1VW1BPZL9fpeOxIRjsLmOH1HK
NTexLZZreUTv48ZId962W0BFUV49nx+ovnUQY7BzqQKM3SGyQ/JQdPzX75g3SYp7
xu8y9NkgH16HnEDe55c9scHTgnVWFAbAI66daKiofg==
=QlAY
-----END PGP SIGNATURE-----

-- 
rooster@thechickencoop.net


Technical Details
Message-ID: <FHOZFQZU40855.7041087963@reece.net.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news2.euro.net!amsnews11.chello.com!xlned.com!feeder1.xlned.com!eweka.nl!hq-usenetpeers.eweka.nl!188.40.76.149.MISMATCH!mail2news.mixmin.net!not-for-mail
References: <PH9ADIIW40846.5791666667@reece.net.au> <9fbcab964528188aea386a9455bd825f@dizum.com>

Show Full Headers
Complete Article Headers
Message-ID: <FHOZFQZU40855.7041087963@reece.net.au>
Subject: Re: Rooster's Method of batch decryption
Date: Tue, 08 Nov 2011 08:53:55 +0000
From: Rooster <remailer@reece.net.au>
References: <PH9ADIIW40846.5791666667@reece.net.au> <9fbcab964528188aea386a9455bd825f@dizum.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news2.euro.net!amsnews11.chello.com!xlned.com!feeder1.xlned.com!eweka.nl!hq-usenetpeers.eweka.nl!188.40.76.149.MISMATCH!mail2news.mixmin.net!not-for-mail
X-Remailer-Contact: abuse@reece.net.au (English Only Please)
Newsgroups: alt.privacy.anon-server
Lines: 168
Injection-Info: mail2news.mixmin.net; mail-complaints-to=abuse@mixmin.net
X-Original-Bytes: 7616