古典密碼中,主要的思想為移位算法及置換算法。 1.移位密碼 密鑰K為整數,且取值空間為0到25;加密函數:x = x + k (mod 26);解密函數:x = x - k (mod 26)。當K=3時,為凱撒密碼。 2.仿射密碼 密鑰對由a、b組成,整數a滿足 gcd(a, 26) = 1,整數b的取值空間為0到25;加密函數:x = ax + b(mod 26);解密函數:x = a*y - a*b (mod 26)。當a=1,b=3時,為凱撒密碼。 3.維吉尼亞密碼 首先確定密鑰長度(本例中密鑰只采取個位數字,所以取決于輸入密鑰的長度),然后輸入滿足這個長度的向量;加密:取明文第一個字母并將之移k1位,這里k1=1,第二個字母移k2位,k2=2,一旦到了密鑰末尾,又從頭開始。 4.換位密碼 首先確定密鑰長度,輸入長度為5的0到4的整數序列,將明文分成每5個字母一組,每組字母按照密鑰進行換位。
標簽: 密碼
上傳時間: 2016-02-09
上傳用戶:jqy_china
Adaptive Filter. This script shows the BER performance of several types of equalizers in a static channel with a null in the passband. The script constructs and implements a linear equalizer object and a decision feedback equalizer (DFE) object. It also initializes and invokes a maximum likelihood sequence estimation (MLSE) equalizer. The MLSE equalizer is first invoked with perfect channel knowledge, then with a straightforward but imperfect channel estimation technique.
標簽: performance equalizers Adaptive several
上傳時間: 2016-02-16
上傳用戶:yan2267246
分數是兩個整數的比,通常表示為 (或b/a)的形式,其中b稱為分子,a稱為分母,分母不能為0。分數在計算機中以整數或浮點數(有限小數)的形式表示,大多數情況下都是近似表示,具有較大的誤差,例如 ,在計算機中用整數表示為0,用浮點數表示為0.333333。本實例就是要設計一個Fraction (分數) 類類型,該類型的對象可以像基本類型數據一樣進行運算,結果仍為分數,運算包括四則運算,關系運算,及求一元一次分式方程的解,輸入輸出要求按分數方式進行。
上傳時間: 2016-02-18
上傳用戶:zhoujunzhen
兩種解決方案 Richard just finished building his new house. Now the only thing the house misses is a cute little wooden fence. He had no idea how to make a wooden fence, so he decided to order one. Somehow he got his hands on the ACME Fence Catalogue 2002, the ultimate resource on cute little wooden fences. After reading its preface he already knew, what makes a little wooden fence cute. A wooden fence consists of N wooden planks, placed vertically in a row next to each other. A fence looks cute if and only if the following conditions are met: ?The planks have different lengths, namely 1, 2, . . . , N plank length units. ?Each plank with two neighbors is either larger than each of its neighbors or smaller than each of them. (Note that this makes the top of the fence alternately rise and fall.)
標簽: house the finished building
上傳時間: 2014-01-26
上傳用戶:541657925
/*目的:使一個複數可顯數出來,可做+-/*,還要可以做>>跟<<的功能 題目:定義一個複數的class叫Complex,a(實部)與b(虛部)為double的型態,i表示根號-1, 1.必須包含一個建構子有兩個參數(double型態),能被用來設定物件中的變數為任意值 2.包含一個建構子只有一個參數(double型態),呼叫參數的實部且定義為"實部+0i" 3.包含一個預建構子可把物件初始化為0+0i 4.overload以下的operator以致於可以正確的執行:+ - * / << >> */
標簽:
上傳時間: 2013-12-27
上傳用戶:lindor
Just what is a regular expression, anyway? Take the tutorial to get the long answer. The short answer is that a regular expression is a compact way of describing complex patterns in texts. You can use them to search for patterns and, once found, to modify the patterns in complex ways. You can also use them to launch programmatic actions that depend on patterns. A tongue-in-cheek comment by programmers is worth thinking about: "Sometimes you have a programming problem and it seems like the best solution is to use regular expressions now you have two problems." Regular expressions are amazingly powerful and deeply expressive. That is the very reason writing them is just as error-prone as writing any other complex programming code. It is always better to solve a genuinely simple problem in a simple way when you go beyond simple, think about regular expressions. Tutorial: Using regular expressions
標簽: expression the tutorial regular
上傳時間: 2013-12-19
上傳用戶:sardinescn
C程序設計語言于1978年出了第一版,此后,計算機世界經歷了一場革命,C語言也有了合理的變化。1988年美國國家標準學會就C語言的主義制訂出了ANSI C標準。本書第二版就是按這個標準來描述C語言的。全書八章,分別分:1.指導性緒論;2.數據類型、運算符與表達式;3.控制流;4.函數與結構;5.指針與數組;6.結構;7.輸入輸出;8.UNIX系統界面。書后附錄為:A.參考手冊;B.標準庫;C.語言
上傳時間: 2014-01-10
上傳用戶:tuilp1a
This little Program allows you to send commands to the CardReader (CT-BCS) or to the Card itself. First you will be ask to what Port the Reader is connected (0=COM1, 1=COM2). Then the Class-Byte (CLA), Instruction-Byte (INS), Parameter 1 (P1), Parameter 2 (P2). If wou don愒 want to send Parameter 3 (P3) press Ctrl-d (^d). If you enter a number then you have to the Bytes of the Datafield. After the last Byte of the Datafield is entered the whole APDU is send the replay is displayed. After that you can send the next APDU.
標簽: CardReader the commands to
上傳時間: 2016-04-23
上傳用戶:nanxia
This is a test up load This is a test up load This is a test up load This is a test up load This is a test up load This is a test up load This a test up load
上傳時間: 2016-04-24
上傳用戶:13681659100
This is a test up load This is a test up load This is a test up load This is a test up load This is a test up load This is a test up load This is a test up load This is a test up load This is a test up load This is a test up load This is a test up load This is a test up load This a test up load
上傳時間: 2016-04-24
上傳用戶:fxf126@126.com