Digital Signature Algorithm (DSA)是Schnorr和ElGamal簽名算法的變種,被美國(guó)NIST作為DSS(DigitalSignature Standard)。算法中應(yīng)用了下述參數(shù):
p:L bits長(zhǎng)的素?cái)?shù)。L是64的倍數(shù),范圍是512到1024;
q:p - 1的160bits的素因子;
g:g = h^((p-1)/q) mod p,h滿足h < p - 1, h^((p-1)/q) mod p > 1;
x:x < q,x為私鑰 ;
y:y = g^x mod p ,( p, q, g, y )為公鑰;
H( x ):One-Way Hash函數(shù)。DSS中選用SHA( Secure Hash Algorithm )。
p, q, g可由一組用戶共享,但在實(shí)際應(yīng)用中,使用公共模數(shù)可能會(huì)帶來(lái)一定的威脅。簽名及驗(yàn)證協(xié)議如下:
1. P產(chǎn)生隨機(jī)數(shù)k,k < q;
2. P計(jì)算 r = ( g^k mod p ) mod q
s = ( k^(-1) (H(m) + xr)) mod q
簽名結(jié)果是( m, r, s )。
3. 驗(yàn)證時(shí)計(jì)算 w = s^(-1)mod q
u1 = ( H( m ) * w ) mod q
u2 = ( r * w ) mod q
v = (( g^u1 * y^u2 ) mod p ) mod q
若v = r,則認(rèn)為簽名有效。
DSA是基于整數(shù)有限域離散對(duì)數(shù)難題的,其安全性與RSA相比差不多。DSA的一個(gè)重要特點(diǎn)是兩個(gè)素?cái)?shù)公開(kāi),這樣,當(dāng)使用別人的p和q時(shí),即使不知道私鑰,你也能確認(rèn)它們是否是隨機(jī)產(chǎn)生的,還是作了手腳。RSA算法卻作不到。
計(jì)算pi
** Pascal Sebah : September 1999
**
** Subject:
**
** A very easy program to compute Pi with many digits.
** No optimisations, no tricks, just a basic program to learn how
** to compute in multiprecision.
OpenGL中的各種轉(zhuǎn)換是通過(guò)矩陣運(yùn)算實(shí)現(xiàn)的,具體的說(shuō),就是當(dāng)發(fā)出一個(gè)轉(zhuǎn)換命令時(shí),該命令會(huì)生成一個(gè)4X4階的轉(zhuǎn)換矩陣(OpenGL中的物體坐標(biāo)一律采用齊次坐標(biāo),即(x, y, z, w),故所有變換矩陣都采用4X4矩陣),當(dāng)前矩陣與這個(gè)轉(zhuǎn)換矩陣相乘,從而生成新的當(dāng)前矩陣。例如,對(duì)于頂點(diǎn)坐標(biāo)v ,轉(zhuǎn)換命令通常在頂點(diǎn)坐標(biāo)命令之前發(fā)出,若當(dāng)前矩陣為C,轉(zhuǎn)換命令構(gòu)成的矩陣為M,則發(fā)出轉(zhuǎn)換命令后,生成的新的當(dāng)前矩陣為CM,這個(gè)矩陣再乘以頂點(diǎn)坐標(biāo)v,從而構(gòu)成新的頂點(diǎn)坐標(biāo)CMv。上述過(guò)程說(shuō)明,程序中繪制頂點(diǎn)前的最后一個(gè)變換命令最先作用于頂點(diǎn)之上。這同時(shí)也說(shuō)明,OpenGL編程中,實(shí)際的變換順序與指定的順序是相反的。文檔對(duì)其進(jìn)行了詳細(xì)的分析。
K9F1208U0M 的ALE、CLE分別由DSP 的A1 和A0 控制。DSP的低8位數(shù)據(jù)線直接與閃存的I/O0-I/O7 相連,實(shí)現(xiàn)命令、地址和數(shù)據(jù)的傳輸; DSP的通用I/O口IOA2 接R/B,監(jiān)測(cè)存儲(chǔ)器的工作狀態(tài),當(dāng)R/ B 處于低電平時(shí),表示有編程、擦除或隨機(jī)讀操作正在進(jìn)行;操作完成后, R/ B 會(huì)自動(dòng)返回高電平。DSP的W E 、R D 分別接FLASH的W E 、R E , 控制讀、寫操作。CS2接閃存的片選線CE。
The task of clustering Web sessions is to group Web sessions based on similarity and consists of maximizing the intra-
group similarity while minimizing the inter-group similarity.
The first and foremost question needed to be considered in clustering
W b sessions is how to measure the similarity between Web
sessions.However.there are many shortcomings in traditiona1
measurements.This paper introduces a new method for measuring
similarities between Web pages that takes into account not only the
URL but also the viewing time of the visited web page.Yhen we
give a new method to measure the similarity of Web sessions using
sequence alignment and the similarity of W eb page access in detail
Experiments have proved that our method is valid and e幣cient.