home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR4
/
SECDRV10.ZIP
/
SECDRV.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-11-19
|
2KB
|
62 lines
/* Secure Drive V1.0 */
/* Header file for cryptdsk.c and login.c */
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <bios.h>
#include <dos.h>
#include <string.h>
#include <ctype.h>
#include "md5.h"
#include "usuals.h"
#define MAXPASS 256 /* Max length of passphrase */
#define ROUNDS 8
#define KEYLEN (6*ROUNDS+4) /* length of key schedule */
struct diskdata {
unsigned firstcyl;
unsigned char firsthd;
unsigned char firstsec;
unsigned lastcyl;
unsigned char maxsec;
unsigned char maxhd;
unsigned secsize;
unsigned serial[2];
unsigned char active; };
struct tsrdata {
unsigned char fkey[104];
unsigned char fkeychk[4];
unsigned char hkey[104];
unsigned char hdnum;
struct diskdata fda;
struct diskdata fdb;
struct diskdata hd; };
extern far void IDEACFB(void *iv,void *key,void *plain,
void *cipher,unsigned len);
extern far void IDEACFBX(void *iv,void *key,void *cipher,
void *plain,unsigned len);
void calcdiskparams(unsigned char *buf,unsigned *maxtrack,
unsigned *maxhead,unsigned *maxsector,
unsigned *secsize,unsigned serial[2]);
void invgets(char *input); /* Get without displaying, allow backspace */
void readsec(unsigned drive,unsigned head,unsigned track,
unsigned sector,unsigned nsects,void *buffer);
void writesec(unsigned drive,unsigned head,unsigned track,
unsigned sector,unsigned nsects,void *buffer);
int getyn(void);
void getkey(unsigned char *key,unsigned char *check,int confirm);
void readptbl(unsigned drive,unsigned head,unsigned track,
unsigned char letter, unsigned *ptdrive,
unsigned *pthead,unsigned *pttrack);
struct tsrdata far *gettsradr(void);
void en_key_idea(word16 *userkey, word16 *Z);
extern struct tsrdata far *cryptdata;