亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? disperse.c

?? enigma源碼
?? C
字號:
/* DISPERSE.C - Program to "disperse" the information from aninput file into a number of output files.Author: Peter Pearson.Version of 93.02.15.This program implements a "Threshhold Information Protection Scheme",as described in D.E.R. Denning, Cryptography and Data Security, pp. 179 -182. Since I had a byte-oriented mind, I chose to use arithmeticover 4-bit entities (GF(2^4)), which allows dispersal into as manyas 15 files but still allows multiplication and division to be performedby table lookup.So, the general scheme is this: From the original plaintext file,W "shadow" files are produced, any T of which can be "combined" toreproduce the original plaintext file. (W and T are integers of theuser's choice, not to exceed 15.) The assertion of this package is thatit is impossible to derive the original plaintext file from any T-1of the "shadow" files. (The validity of that assertion depends solelyand vitally on the inscrutability of the random numbers used by thedispersal algorithm.)At a more detailed level: The plaintext file is read nibble-by-nibble,a nibble being 4 bits. For each nibble P read from the plaintext file,one nibble is written into each "shadow" file, according to this recipe:T-1 4-bit coefficients C(i), 0 < i < T, are chosen randomly. For "shadow"file number j, 0 < j <= W, we compute the polynomial        y = P + C(1) * j + C(2) * j**2 + ... + C(T-1) * j**(T-1),using GF(2^4) arithmetic, and write it into the "shadow" file.Reconstruction of the plaintext file is possible because, given thecorresponding nibble from each of T of the shadow files, you have T(j, y) points on a polynomial of degree T-1, and can determine thepolynomial completely. (GF(2^4) arithmetic has the attractive featuresof limiting all numbers to 4 bits while preserving all the algebraicproperties necessary for familiar polynomial interpolation.)Final detail: Each shadow file must include two crucial parametersof the particular "dispersal": (1) the number, T, of shadow filesneeded for reconstruction; and (2) the index "j" that was used incomputing the nibbles written into that particular shadow file.These two values are written into the first two bytes of the shadowfile.Revision history:        87.07.06 - Initial version.        93.02.15 - Moved arg types into function definitions.*/#include <stdio.h>#include <fcntl.h>#include <io.h>#include <ctype.h>#include <stdlib.h>#include <string.h>#include <time.h>#include "g13.h"#define BOOLEAN int#define FALSE   0#define TRUE    (1==1)void main( int argc, char *argv[] ){    BOOLEAN Help ;    char FileName[100] ;    int  Total ;    int  Required ;    void Disperse( char *FileName, int Total, int Required ) ;    srand((unsigned)(time(0) & 0xffff));    FileName[0] = '\0' ;    Total = 0 ;    Required = 0 ;    Help = ( argc != 4 ) ;    if ( Help == FALSE )    {        strcpy( FileName, *++argv ) ;        if ( sscanf( *++argv, "%d", &Total ) != 1         ||   sscanf( *++argv, "%d", &Required ) != 1 )                        Help = TRUE ;    }    if ( Help )    {     fprintf( stderr,               "Usage:\n    DISPERSE filename 5 3\n" ) ;     fprintf( stderr,               "where\n    filename is the name of the input file,\n" ) ;     fprintf( stderr,               "    5 is the total number of files to be output,\n" ) ;     fprintf( stderr,               "    3 is the number of files required for reconstruction.\n" ) ;    }    else    {        if ( Total < Required )        {            int Temp ;            Temp = Total ;            Total = Required ;            Required = Temp ;            fprintf( stderr,                "(I assume you mean %d files total and", Total ) ;            fprintf( stderr,                " %d files required for reconstruction.)\r\n", Required ) ;        }        Disperse( FileName, Total, Required ) ;    }}BOOLEAN ArgsOK( char *FileName, int Total, int Required ){    BOOLEAN ArgError ;    ArgError = FALSE ;    if ( FileName[0] == '\0' )    {        ArgError = TRUE ;        fprintf( stderr, "You must specify a non-null file name.\n" ) ;    }    if ( Total < 2 || Total > 15 || Required < 2 || Required > 15 )    {        ArgError = TRUE ;        fprintf( stderr,            "Both Total and Required file numbers must be in 2 .. 15.\n" ) ;    }    if ( Total < Required )    {        ArgError = TRUE ;        fprintf( stderr,            "Required File Number cannot exceed Total File Number.\n" ) ;    }    return ( ArgError == FALSE ) ;}BOOLEAN CreatedOutput( char *FileName, int Number, FILE *FileList[] )/*        Create several output files with names derived from one        specified name.Returns:        TRUE if everything went OK,        FALSE if something went wrong. (An error message has been issued.)Algorithm:        We strip the FileName of any leading "\xxx\xxx" and any        trailing ".ext", and append .f0, .f1, .f2, et cetera.        If a file exists already with any of these names, it will        be overwritten.*/{    int  i ;    char Stripped[100] ;    char NewName[100] ;    void Strip( char *Stripped, char *Full ) ;    Strip( Stripped, FileName ) ;    if ( Stripped[0] == '\0' )    {        fprintf( stderr,            "There's something wrong with the input file name.\n" ) ;        return FALSE ;    }    for ( i = 0; i < Number; i++ )    {        sprintf( NewName, "%s.f%d", Stripped, i+1 ) ;        fprintf( stderr, "Creating file %s.\n", NewName ) ;        FileList[i] = fopen( NewName, "w" ) ;        if ( FileList[i] == NULL )        {            fprintf( stderr,                "Sorry, I had trouble creating the %dth output file.\n",                i ) ;            return FALSE ;        }        setmode( fileno( FileList[i] ), O_BINARY ) ;    }    return TRUE ;}void Disperse( char *FileName, int Total, int Required ){    int Byte ;    G13 HighNibble[15] ;    G13 LowNibble[15] ;    int i ;    FILE *OutFile[15] ;    FILE *InFile ;    long StartTime ;    long EndTime ;    long ByteCount ;    BOOLEAN ArgsOK( char *FileName, int Total, int Required ) ;    FILE *OpenedInput( char * ) ;    BOOLEAN CreatedOutput( char *, int, FILE * * ) ;    void Process( int Nibble, int *OutArray, int Total, int Required ) ;    if ( ArgsOK( FileName, Total, Required )    &&   ( InFile = OpenedInput( FileName ) ) != NULL    &&   CreatedOutput( FileName, Total, OutFile ) )    {        ByteCount = 0 ;        StartTime = time( NULL ) ;        for ( i = 0; i < Total; i++ )        {            putc( Required, OutFile[i] ) ; /* Say how many files required. */            putc( i+1     , OutFile[i] ) ; /* Say which file this is.      */        }        while ( ( Byte = getc( InFile ) ) != EOF )        {            ++ByteCount ;            Process( Byte >> 4, HighNibble, Total, Required ) ;            Process( Byte     , LowNibble,  Total, Required ) ;            for ( i = 0; i < Total; i++ )                putc( ( HighNibble[i] << 4 ) + LowNibble[i], OutFile[i] ) ;        }        EndTime = time( NULL ) ;        if ( EndTime > StartTime )            fprintf( stderr, "\%ld seconds elapsed time.\r\n\%ld bytes read, %ld bytes written.\r\n\%d bytes read per second, %d bytes written per second.\r\n",                EndTime - StartTime,                ByteCount, Total * ByteCount,                (int) ( ByteCount / ( EndTime - StartTime ) ),                (int) ( ( Total * ByteCount ) / ( EndTime - StartTime ) ) ) ;    }}FILE *OpenedInput( char *FileName ){    FILE *F ;    if ( ( F = fopen( FileName, "r" ) ) == NULL )        fprintf( stderr, "Error opening file \"%s\" for input.\n",            FileName ) ;    setmode( fileno( F ), O_BINARY ) ;    return F ;}void Process( int Nibble, int *OutArray, int Total, int Required )/*        Given one nibble of the input file, fill an array with        the values that go into the output files.*/{    G13 C[15] ;    int i ;    int j ;    G13 y ;    G13 Rand4( void ) ;    C[0] = Nibble & 0xF ;    for ( i = 1; i < Required; i++ ) C[i] = Rand4() ;    for ( i = 1; i <= Total; i++ )    {        y = C[ Required-1 ] ;        for ( j = Required-2 ; j >= 0 ; j-- ) y = C[j] ^ Mult( i, y ) ;        *OutArray++ = y ;    }}G13 Rand4( void )/*        Return a random G13-thing (4-bits).Important note:        The output from this program will resist intelligent, informed        cryptanalysis only to the extent that the random number sequence        resists analysis. If the random number sequence is truly random,        as could be achieved by attaching special hardware to your        computer, then the output from this program will resist decryption        even by an infinitely-intelligent cryptanalyst knowing all the        algorithms involved.            Such perfection is not likely to be achieved. Second-best is        a pseudorandom-number generator whose future outputs cannot be        predicted even when given a long sequence of past outputs. Any        encryption scheme (e.g. DES) resistant to known-plaintext attack        might be harnessed to this purpose.            This version of this program, however, settles for a very        predictable pseudorandom-number generator.*/{    return ( rand() >> 11 ) & 0xF ;}void Strip( char *Stripped, char *Full )/*        Strip a file name of preceding directory-path information        (\xxxx\xxxx\xxx\) and trailing "extension" information (.ext).        Stripped : output        Full     : input*/{    char *fp ;    char *sp ;    sp = Full ;    for ( fp = Full ; *fp ; ) if ( *fp++ == '\\' ) sp = fp ;    while ( *sp && *sp != '.' ) *Stripped++ = *sp++ ;    *Stripped = '\0' ;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区不卡| 精品一区二区在线播放| 日本美女一区二区三区| 狠狠色综合日日| av电影天堂一区二区在线观看| 欧美性猛片xxxx免费看久爱| 欧美成人在线直播| 中文字幕一区二| 午夜精品免费在线观看| 国产一区二区美女诱惑| 日本韩国欧美一区| 欧美成人精品高清在线播放| 综合色中文字幕| 成人欧美一区二区三区在线播放| 精品国产成人系列| 一区二区三区国产精品| 久久精品国产免费看久久精品| 成人免费视频视频在线观看免费| 欧美美女bb生活片| 中文字幕av资源一区| 亚洲chinese男男1069| 国产成人在线影院| 欧美日韩国产另类一区| 国产精品欧美综合在线| 免费人成网站在线观看欧美高清| 91亚洲精品久久久蜜桃网站 | 国产精品嫩草影院com| 天天亚洲美女在线视频| 成人免费视频播放| 日韩免费高清av| 亚洲午夜久久久久久久久电影院| 国产aⅴ精品一区二区三区色成熟| 欧美亚洲动漫精品| 国产精品久久久久久久久晋中 | 日韩一区二区三| 一区二区三区成人在线视频| 国产精品亚洲视频| 日韩精品一区二区三区中文精品| 亚洲一区二区三区四区的| 不卡区在线中文字幕| 欧美α欧美αv大片| 性欧美疯狂xxxxbbbb| 99国产精品久| 中文字幕av一区二区三区高| 狠狠色狠狠色综合日日91app| 欧美日本一区二区三区四区| 亚洲日韩欧美一区二区在线| 从欧美一区二区三区| 精品国产污网站| 免费不卡在线观看| 欧美日韩国产免费一区二区| 亚洲精品日韩一| 99精品视频中文字幕| 国产亚洲短视频| 国产一区二区三区高清播放| 日韩三级在线观看| 日本伊人午夜精品| 欧美老肥妇做.爰bbww视频| 一区二区在线看| 97久久精品人人做人人爽50路| 国产亚洲精品精华液| 国产一区亚洲一区| 精品日本一线二线三线不卡| 免费不卡在线观看| 日韩一区二区麻豆国产| 美女在线视频一区| 欧美一区二区三区不卡| 一区二区三区四区不卡在线| 免费人成精品欧美精品| 欧美一级夜夜爽| 蜜臀a∨国产成人精品| 日韩三级视频在线看| 久久99久久99| 26uuu色噜噜精品一区二区| 极品销魂美女一区二区三区| 精品毛片乱码1区2区3区| 国内精品视频一区二区三区八戒| 26uuu色噜噜精品一区二区| 国产麻豆一精品一av一免费| 国产婷婷精品av在线| 成人免费观看视频| 亚洲视频一区在线| 欧美主播一区二区三区美女| 亚洲一区中文日韩| 91精品在线观看入口| 久久精品国产一区二区三区免费看| 日韩美女视频在线| 国产91精品久久久久久久网曝门| 国产欧美日韩视频一区二区| 99精品桃花视频在线观看| 一区二区在线看| 欧美一区二区三区四区五区 | 久久久一区二区三区捆绑**| 成人免费视频播放| 一区二区三区四区中文字幕| 欧美老女人第四色| 国产在线一区二区| 国产精品久久久久久久久果冻传媒| 色老头久久综合| 蜜臀av国产精品久久久久| 日本一区二区三级电影在线观看| 99re66热这里只有精品3直播 | 欧美麻豆精品久久久久久| 蜜桃av一区二区在线观看 | 色综合视频一区二区三区高清| 亚洲第一二三四区| 久久这里只有精品首页| 91在线视频18| 日韩成人免费电影| 国产色爱av资源综合区| 在线一区二区三区四区五区| 青青草国产精品97视觉盛宴| 国产精品午夜电影| 6080国产精品一区二区| 国产91精品在线观看| 亚洲中国最大av网站| 欧美大片一区二区| 色天使久久综合网天天| 久久精品久久久精品美女| 亚洲视频中文字幕| 欧美成人a视频| 91视频在线观看| 黄色精品一二区| 亚洲一区二区视频在线观看| 精品国产乱码久久久久久蜜臀 | 日韩精品中文字幕一区二区三区| 成人中文字幕合集| 日韩国产精品久久久| 国产精品国产三级国产aⅴ无密码| 欧美久久久久免费| 不卡视频一二三| 精品一区二区综合| 亚洲国产一区二区a毛片| 久久精品亚洲国产奇米99| 欧美三区在线视频| 国产成人精品三级麻豆| 日韩高清不卡一区二区三区| 国产精品国产三级国产普通话99 | 久久av资源网| 亚洲成人免费看| 国产精品久久看| 久久久一区二区| 91麻豆精品国产91久久久更新时间| 99久久久无码国产精品| 精品亚洲国内自在自线福利| 亚洲国产精品自拍| 亚洲女与黑人做爰| 国产精品天天看| 久久蜜臀中文字幕| 日韩你懂的在线播放| 欧美视频三区在线播放| 成人av影院在线| 国产精品一级片| 久久不见久久见免费视频7| 亚洲成a天堂v人片| 亚洲黄色小视频| 亚洲午夜视频在线| 欧美激情艳妇裸体舞| 精品国产一区二区三区久久久蜜月| 欧美在线免费视屏| 91麻豆福利精品推荐| 成人国产精品免费观看| 国产福利精品一区| 国内精品伊人久久久久av影院| 日产国产欧美视频一区精品 | 欧美日韩国产天堂| 日本道精品一区二区三区| 91最新地址在线播放| 成人av手机在线观看| 粉嫩aⅴ一区二区三区四区五区| 国内精品伊人久久久久影院对白| 麻豆一区二区在线| 蜜乳av一区二区三区| 美女诱惑一区二区| 免费观看一级特黄欧美大片| 蜜桃视频一区二区三区 | 久久亚洲综合色一区二区三区| 日韩三级高清在线| 欧美白人最猛性xxxxx69交| 欧美电影免费观看高清完整版在线| 91精品欧美久久久久久动漫| 欧美一区二区福利视频| 欧美一区在线视频| 日韩一区二区电影在线| 精品国产乱子伦一区| 精品99一区二区三区| 精品国产一区a| 日本一区二区三区在线不卡| 国产精品久久久久久福利一牛影视 | 欧美性videosxxxxx| 91久久精品一区二区三| 91久久线看在观草草青青| 欧美视频精品在线| 5月丁香婷婷综合| 欧美成人乱码一区二区三区| 久久久午夜电影| 国产精品毛片久久久久久| 一区二区三区在线视频免费| 亚洲狠狠爱一区二区三区| 日本成人在线电影网|