OpenBCM V1.13 (Linux)

Packet Radio Mailbox

DB0FHN

[JN59NK Nuernberg]

 Login: GUEST





  
PA2AGA > HDDIG    09.01.00 12:36l 256 Lines 6612 Bytes #-9622 (0) @ EU
BID : HD_2000_3C
Read: DL6KCF GUEST
Subj: HamDigitalDigest 2000/3C
Path: DB0AAB<DB0SL<DB0RGB<DB0MAK<DB0SON<DB0ERF<DB0FBB<DB0GOS<DB0PKE<DB0QS<
      DB0ME<ON6AR<PI8HWB<PI8ZAA<PI8GCB<PI8WFL<PI8VNW
Sent: 000109/0715Z @:PI8VNW.#ZH2.NLD.EU #:43118 [HvHolland] FBB7.00g24 $:HD_200
From: PA2AGA@PI8VNW.#ZH2.NLD.EU
To  : HDDIG@EU

Received: from pa2aga by pi1hvh with SMTP
	id AA28226 ; Sun, 09 Jan 00 05:28:19 UTC
Received: from pa2aga by pa2aga (NET/Mac 2.3.70/7.5.3) with SMTP
	id AA00017500 ; Sun, 09 Jan 2000 01:08:25 MET
Date: Sun, 09 Jan 00 01:04:14 MET
Message-Id: <hd_2000_3C>
From: pa2aga
To: hd_broadcast@pa2aga
Subject: HamDigitalDigest 2000/3C
X-BBS-Msg-Type: B

</HEAD>
<BODY>
<DIV>Why the writer is looking for a software implementation is =
the</DIV>
<DIV>real question?  Does he already have the other parts of =
the</DIV>
<DIV>software, or is he just starting at the scrambler part?</DIV>
<DIV> </DIV>
<DIV>Here's a software scrambler for the Covox audio card :-)</DIV>
<DIV> </DIV>>>Here, scrambling generally refers to=20
"mixing-up"<BR>>>for the purpose of making something=20
un-intelligible..  <BR>><BR>>Not in the context of amateur =
digital=20
communications. There it is often<BR>>used in the way Hamish used=20
it:<BR></BODY></HTML>

------=_NextPart_001_0046_01BF5049.0D1E7DC0--

------=_NextPart_000_0045_01BF5049.0D1E7DC0
Content-Type: application/octet-stream;
 name="vp.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="vp.c"

/*
 * vp.c
 *
 * Voice Privacy
 * Public Domain (p) 1990, S. R. Sampson
 *
 * Written for Turbo-C or Borland-C
 *
 * Notice it doesn't say "Secure Voice" :-)
 *
 * This program demonstrates scrambling of digitized voice input.
 * It is designed to work with the Covox Audio Digitizer sound board
 * as a validation tool.  The algorithm used is the Time-Division
 * Multiplex (TDM) method with an 8 kHz sample rate and 32 ms time
 * segments.  Producing 256 samples per segment.  There are 8
 * segments in a packet.
 *
 * The application to which this study is being performed, is that of
 * a rural County Sheriff, who must travel a large territory, and doesn't
 * always have access to a nearby phone.  A cellular phone is one answer,
 * but it can be easily monitored.  This application would allow the
 * Sheriff to use the dispatch radio.  Currently an inversion scrambler is
 * most often used, but this is very unsecure as well.  The principle used
 * in this design, is that the Sheriff would use it infrequently, and
 * change the code on a daily basis.  Most scanner listeners will think the
 * scrambling method is more complex than it is, because the audio sounds
 * very much like the Military Narrow Band Voice Scramblers.
 *
 * This is a "tactical" scrambler.  That is, the breaking of the code would
 * take longer than the operation being undertaken.
 */

#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include <conio.h>

#define SAMPLE (short)(1193167L / 8000L) & 0x00FF
#define PORT 0x022F /* Hardware 8-bit input/output */

#define TCADRC 0x43  /* PC timer chip */
#define TCADRD 0x40
#define TCMODE 0x36
#define PPIADR 0x61
#define PPI0 0x48

void interrupt (far *oldvec)();
void init(void);
void breakout(void);

/*
 * These are codes that would be enabled by a front panel
 * thumbswitch.  By using a different code each day, it would make
 * analysis a little harder.  Each of the 10 codes is different
 * for different groups.  The codes would be stored in EEPROM memory.
 */

static unsigned char codetable[11][8] = {
 /* scrambled voice */
 { 7,  0,  2,  4,  1,  3,  5,  6},
 { 6,  2,  5,  0,  7,  3,  4,  1},
 { 1,  7,  4,  5,  3,  6,  2,  0},
 { 4,  3,  1,  2,  6,  7,  5,  0}, /* These are the segments */
 { 2,  0,  5,  6,  4,  1,  3,  7}, /* that are moved around  */
 { 7,  5,  3,  0,  2,  6,  4,  1},
 { 4,  5,  3,  6,  1,  2,  0,  7},
 { 3,  0,  4,  6,  7,  2,  5,  1},
 { 5,  7,  2,  6,  4,  3,  1,  0},
 { 6,  3,  2,  1,  4,  0,  5,  7},
 /* clear voice */
 { 0,  1,  2,  3,  4,  5,  6,  7}
};

static unsigned kkey[8];  /* scrambled table      */
static unsigned ckey[8];  /* clear table       */
static unsigned char samples[4096]; /* the working packet frames. input */
     /* to the second half, take from    */
     /* the first half, then vice versa  */

/*
 * Interrupt routine to sample Digitizer Board
 * This routine runs every 125 usec.  It must be quick.
 */

void interrupt timer()
{
 static unsigned char Segment   = 0;
 static unsigned char Counter   = 0;
 static int  Delay     = 2048;
 static int  NoDelay   = 0;

 int    Temp, t1, t2;

 /* Get input sample into random delayed position */

 t1 = kkey[Segment] + Counter;
 t2 = ckey[Segment] + Counter;

 samples[t1 + Delay] = inportb(PORT);
 outportb(PORT, samples[t2 + NoDelay]);

 /* 8 Segments of 256 byte samples */
 /* Note: Unsigned Characters roll over from 255 to 0 */

 if (++Counter == 0)  {
  if (++Segment == 8)  {
   Segment = 0;

   Temp = Delay;
   Delay = NoDelay;
   NoDelay = Temp;
  }
 }

 /* reset interrupt timer */
 outportb(0x20, 0x20);
}

void init(void)
{
 /* get vector of current timer interrupt */
 oldvec = getvect(8);

 /* mask timer interrupt */
 disable();
 outportb(0x21, (1 | inportb(0x21)));

 /* local timer interrupt routine */
 setvect(8, timer);

 /* rev up timer */
 outportb(TCADRC, TCMODE);
 outportb(TCADRD, SAMPLERATE);  /* 8 kHz */
 outportb(TCADRD, 0); /* 8 bit numbers */

 /* unmask timer interrupt */
 outportb(0x21, 0xFE & inportb(0x21));
 enable();
}

void breakout(void)
{
 /*
  * Quit, restore computer to default setup
  */

 /* mask timer interrupt */
 disable(); /* disable interrupts */

 outportb(0x21, (1 | inportb(0x21)));

 outportb(TCADRC, TCMODE);
 outportb(TCADRD, 0);
 outportb(TCADRD, 0); /* divide by normal 65536 again */

 setvect(8, oldvec); /* Reset original interrupt vector */

 /* unmask timer interrupt */
 outportb(0x21, (0xFE & inportb(0x21)));
 outportb(PPIADR, PPI0);

 enable(); /* enable interrupts */

 exit(0);
}

void main(int argc, char **argv)
{
 register short rn, i;

 if (argc != 2)  {
  puts("Usage: scramble [0 - 10]\n");
  exit(1);
 }

 rn = atoi(argv[1]);
 if ((rn > 10) || (rn < 0))  {
  puts("Code key is 0 to 9, 10 for Clear Voice\n");
  exit(1);
 }

 for (i = 0; i < 2048; i++)
  samples[i] = 0;

 /*
  * Get 8 code key numbers into the scramble table.
  * (8 factorial permutations, 40,320)
  */

 for (i = 0; i < 8; i++)  {
  kkey[i] = codetable[rn][i] * 256;
  ckey[i] = codetable[10][i] * 256;
 }

 init();

 /* process the interrupts.  Break out with any key */
 while (!kbhit())
  ;

 breakout();
}

------=_NextPart_000_0045_01BF5049.0D1E7DC0--

>.

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

End of Ham-Digital Digest V2000 #3
******************************

Both my XYL and myself wish you a very
happy and prosperous New Year. Adam PA2AGA.




Read previous mail | Read next mail


 14.05.2026 22:02:24lGo back Go up