【正文】
[Managementof Computing and Information Systems]: Security andProtection—Unauthorized accessGeneral TermsDesign, Experimentation, SecurityKeywordsLogic Flaw,Web Application Security, Extended Finite StateMachine, SQL Signature, InvariantPermission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or mercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.CODASPY’12, February 7–9, 2012, San Antonio, Texas, USA.Copyright 2012 ACM 9781450310918/12/02 ...$.Databasebacked web applications have bee a prevalent venue for disseminating information and services. An enormous amount of information is made accessible on Internet through web applications, which interact with the backend database on behalf of users. While providing great convenience to users, those web applications also attract a large number of security exploits. According to a recent survey [29], the attacks that successfully disclose or tamper sensitiveinformation by promising vulnerable web applications account for more than 30% of all the cyber attacks. For instance, on June 2010, it was reported that a vulnerability of ATamp。由于本理論水平比較有限,論文中的有些觀點(diǎn)以及對(duì)企業(yè)示例的歸納和闡述難免有疏漏和不足的地方,歡迎老師和專家們指正。感謝所有的任課老師,是你們讓我能夠靜靜地坐下來,在知識(shí)的海洋里吸取更多的營養(yǎng),從而能夠?yàn)樽约哼M(jìn)一步地加油充電。還有教過我的所有老師們,你們嚴(yán)謹(jǐn)細(xì)致、一絲不茍的作風(fēng)一直是我工作、學(xué)習(xí)中的榜樣;他們循循善誘的教導(dǎo)和不拘一格的思路給予我無盡的啟迪。首先誠摯的感謝我的論文指導(dǎo)老師胡程瑜老師??偠灾畔踩男问饺找鎳?yán)峻,信息安全形式的多樣性必然會(huì)導(dǎo)致破解信息安全的方法日漸增多,時(shí)代在改變,技術(shù)也在發(fā)展,我希望能在今后的工作中習(xí)得更加先進(jìn)的信息安全技術(shù),獲得更加先進(jìn)的信息安全理念新技術(shù)、新理念融合進(jìn)系統(tǒng),使系統(tǒng)功能得到不斷完善,使之在信息系統(tǒng)安全中發(fā)揮更大作用。但與此同時(shí),本系統(tǒng)中還有很多缺陷,比如在密文存入硬盤的過程只是簡單的調(diào)用了IO文件的輸入輸出,沒有在存儲(chǔ)進(jìn)硬盤這一模塊下工夫,我今后的工作中一定會(huì)多多研究這一方面。在數(shù)據(jù)加密的過程中 ,使用RSA和DES等加密技術(shù),在很大程度上對(duì)數(shù)據(jù)安全進(jìn)行了加強(qiáng),保證了數(shù)據(jù)加密強(qiáng)度的同時(shí)也增加了數(shù)據(jù)安全存儲(chǔ)的效率。該系統(tǒng)可在不用對(duì)數(shù)據(jù)解密的情況下對(duì)數(shù)據(jù)進(jìn)行關(guān)鍵詞查找,保證了效率的同時(shí)也保證了其安全性和穩(wěn)定性。本文設(shè)計(jì)和實(shí)現(xiàn)了數(shù)據(jù)安全存儲(chǔ)系統(tǒng),使用密碼技術(shù)和手段對(duì)信息系統(tǒng)內(nèi)部的數(shù)據(jù)進(jìn)行透明加密保護(hù),成功達(dá)到了信息系統(tǒng)等級(jí)保護(hù)中有關(guān)數(shù)據(jù)安全保護(hù)的基本要求和目標(biāo)。 } return ()。i。//解密明文 byte[] mt=()。 BigInteger c=new BigInteger(miwen)。 BigInteger d=new BigInteger(dStr)。 else return 1。 element_pairing(tmp, cipherc1, twt)。}(2) 在PEKS系統(tǒng)中生成陷門函數(shù)后,系統(tǒng)會(huì)將陷門函數(shù)生成的加密后的關(guān)鍵詞密文發(fā)送至存儲(chǔ)系統(tǒng)中的關(guān)鍵詞檢索算法中,當(dāng)該算法返回TRUE時(shí),即找到該數(shù)據(jù),具體的實(shí)現(xiàn)代碼如下,其中tw為陷門函數(shù)中生成的加密后的關(guān)鍵詞密文,cipher為存儲(chǔ)在系統(tǒng)中的密文int test(sysparams *param, Trapdoor *tw, PEKSCipher *cipher) { element_t tmp。 element_pow_zn(twt, tmp, skalpha)。 element_from_hash(tmp,keyword,keywordLen)。(1) 當(dāng)用戶輸入關(guān)鍵詞keyword結(jié)束后,系統(tǒng)會(huì)將keyword發(fā)送給PEKS系統(tǒng),調(diào)用其中的陷門函數(shù),生成加密后的關(guān)鍵詞密文,具體實(shí)現(xiàn)代碼如下,其中sk為私鑰,keyword為關(guān)鍵詞,keywordLen為關(guān)鍵詞長度int trapdoor(sysparams *param, privatekey *sk, unsigned char *keyword, int keywordLen, Trapdoor *tw) { element_t tmp。 } (content_result)。 try { content_result = (keyWord_cipher)。 SaveImpl si = new SaveImpl()。 PEKSSystem peksSys = new PEKSSystem()。a++){ (chardata[a])。 for(int a=0。 }(3) PEKS系統(tǒng)在加密完數(shù)據(jù)和關(guān)鍵詞后會(huì)將兩個(gè)密文一起發(fā)送給存儲(chǔ)模塊進(jìn)行存儲(chǔ),存儲(chǔ)模塊調(diào)用IO輸出流,將密文寫入文件中實(shí)現(xiàn)存儲(chǔ),具體代碼實(shí)現(xiàn)如下FileOutputStream fos = new FileOutputStream(current)。 } catch (UnsupportedEncodingException ex) { (()).log(, null, ex)。 BigInteger c = (e, n)。 byte[] ptext = (UTF8)。 try { BigInteger e = new BigInteger(eStr)。 return 0。 element_pow_zn(tmp2, pkh, r)。 element_from_hash(tmp1,keyword,keywordLen)。 element_pow_zn(cipherc1, pkg, r)。 element_init_Zr(r, parampairing)。 element_init_G1(cipherc1,parampairing)。 ()。 String cipher = (keyword1, content1)。 String content1 = ()。 } return output。 output[4]=()。 output[2]=()。 output[0]=()。 BigInteger p = ()。 BigInteger n = ()。 RSAPrivateCrtKey prk = (RSAPrivateCrtKey)()。 //指定密鑰的長度,初始化密鑰對(duì)生成器 KeyPair kp = ()。 //用來存儲(chǔ)密鑰的e n d p q try { KeyPairGenerator kpg = (RSA)。 return 0。 element_random(skalpha)。 element_init_Zr(skalpha, parampairing)。其中調(diào)用了PCB庫中的函數(shù),代碼實(shí)現(xiàn)如下int keygen(sysparams *param, pubkey *pk, privatekey *sk) { element_init_G1(pkg, parampairing)。 } return 0。 } rv = pairing_is_symmetric(pairing)。 rv = pairing_init_set_buf(pairing, PairingInitString,strlen(PairingInitString))。 if (!count) printf(input error)。 if (!fp) printf(error opening %s, )。 FILE *fp = stdin。 int rv。 PEKS系統(tǒng)初始化(1) 首先調(diào)用PCB庫中的函數(shù),形成雙線性初始化函數(shù),其中pbc_pairing_init_demo為pbc庫中的函數(shù),具體實(shí)現(xiàn)代碼如下:int pbc_pairing_init_demo(pairing_t pairing) { char *PairingInitString = type a\n q 8780710799663312522437781984754049815806883199414208211028653399266475630880222957078625179422662221423155858769582317459277713367317481324925129998224791\n h 12016012264891146079388821366740534204802954401251311822919615131047207289359704531102844802183906537786776\n r 730750818665451621361119245571504901405976559617\n exp2 159\n exp1 107\n sign1 1\n sign0 1\n。(5) 陷門結(jié)構(gòu)體 typedef struct Trapdoor{ element_t t。(4) PEKS密文結(jié)構(gòu)體 typedef struct PEKSCipher{ element_t c1, c2。(3) 私鑰結(jié)構(gòu)體 typedef struct privatekey{ element_t alpha。(2) 公鑰對(duì)結(jié)構(gòu)體 typedef struct pubkey{ element_t g, h。數(shù)據(jù)加密系統(tǒng)以及陷門生成系統(tǒng)(1)數(shù)據(jù)加密系統(tǒng):對(duì)即將存儲(chǔ)的數(shù)據(jù)進(jìn)行加密,采用公鑰加密的方式進(jìn)行加密,以確保其安全強(qiáng)度(2)關(guān)鍵詞加密系統(tǒng):用于對(duì)傳來的關(guān)鍵詞w進(jìn)行加密,并將密文與(1)中系統(tǒng)加密形成的密文共同傳輸給存儲(chǔ)模塊(3)陷門生成系統(tǒng):在數(shù)據(jù)檢索時(shí)用于生成陷門,并實(shí)現(xiàn)和存儲(chǔ)模塊的連接,以便數(shù)據(jù)的檢索存儲(chǔ)模塊:主要用來實(shí)現(xiàn)對(duì)用戶模塊傳來的密文的存儲(chǔ)功能以及在數(shù)據(jù)檢測時(shí)對(duì)關(guān)鍵詞檢測并選擇消息的功能(1) 關(guān)鍵詞檢索系統(tǒng):其中含有關(guān)鍵詞檢索函數(shù)test,對(duì)于傳遞來的陷門函數(shù),進(jìn)行關(guān)鍵詞檢索(2) 密文存儲(chǔ):對(duì)于傳遞來的密文,存儲(chǔ)模塊將會(huì)將他寫入到硬盤里 第四章 數(shù)據(jù)安全存儲(chǔ)系統(tǒng)設(shè)計(jì) 系統(tǒng)初始化(1) 雙線性對(duì)結(jié)構(gòu)體 typedef struct sysparam{ pairing_t pairing。當(dāng)用戶提出獲取關(guān)鍵詞w的數(shù)據(jù)時(shí),用戶首先通過用戶模塊生成搜索陷門,然后將搜索陷門傳送給存儲(chǔ)模塊進(jìn)行檢索。在用戶模塊中包含公鑰加密算法E,偽隨機(jī)序列生成器G,加密關(guān)鍵詞所需的帶密鑰的和秘密參數(shù)UN的安全哈希函數(shù)H,帶密鑰c的偽隨機(jī)函數(shù)。所以在系統(tǒng)的