|
[求助]RSA 模幂运算 的问题?
請看 【原创】植基於RSA加密演算法頻率特性之研究--- Utilities 裏面有 xyz 及 xzy4 兩個 小 tools. 應該可以滿足你的需求。 ps. 那兩個 tools 無法計算很大的數。 |
|
[求助]求serpent算法的源程序
pkg://C-Linux-HOWTOs-sgml.tar.gz:1441422/Loopback-Encrypted-Filesystem-HOWTO.sgml.gz downloads <!doctype linuxdoc system> <!-- Loopback Encrypted Filesystem HOWTO by Ryan T. Rhea Translated into Chinese by Pinwang Chao tchao@worldnet.att.net --> <article> <!-- Title information --> <title>Loopback Encrypted Filesystem HOWTO <author>作者:Ryan T. Rhea, <tt/zzrhear@pobox.winthrop.edu/ <newline> 譯者:趙平望 <tt/tchao@worldnet.att.net/ <date>v1.1, 29 November 1999 翻譯日期:2000年1月15日 <abstract> 本文件解釋如何安裝和使用一種使用者加載後可動態和無需採取特別步驟就能加密文檔內容的文檔系統。 這種文檔系統存放在通常文件內,它可作為隱藏文件隱藏,也可使用極可能會被忽略的一般文檔名稱存放, 以此提高數據資料儲存的安全。 </abstract> <!-- Table of contents 加入目錄--> <toc> <!-- Begin the document 內容開始--> <sect>前言 <p> 建立這個文檔系統需要有內核的源代碼、編輯代碼的能力和耐心,同時強烈建議手邊隨時有啟動盤可用。 把重要資料長期存放在加密的文檔系統之前,應首先製作備份保存, 因為任何存放在電腦的資料都有遭到損壞不可取用的可能。 要完成建立這個文檔系統,起碼要修補 Linux 內核 2.2.9 版。關於修補的細節, 見下文<ref id="詳細內容">一節內的內容。 內核源代碼可從下列網址下載: <tscreen> <url url="ftp://ftp.kerneli.org/"> </tscreen> 關於重編內核的程序可查閱相關 HOWTO 文件,網址如下: <tscreen> <url url="http://metalab.unc.edu/LDP/HOWTO/"> </tscreen> 這份文件可全文或部分轉載,不收費用,但需符合下列條件: <itemize> <item>在全文或部分轉載中應全文載列版權說明和這份轉載同意書。 <item>任何翻譯或由這份文件生成的文本在散發前均應取得作者的書面同意。 <item>如果只散發本文部分內容,則應在散發的文本內列入取得本文全文的詳細方法和途徑。 <item>文內所有源代碼均受到 GNU 一般公共許可証的保護。許可証內容可通過匿名 FTP 網址下載: </itemize> <tscreen> <url url="ftp://prep.ai.mit.edu/pub/gnu/COPYING/"> </tscreen> <sect>導言 <p> 這項過程使用“/dev/loop*”(在多數安裝系統中* 為 0-7 )加載 loopback 文檔系統。 採用同種方法可將 Linux 的文檔系統不加密地存放在非 Linux 分割區。在前述 LDP 網址上存有關于這方面的 HOWTO。 文檔加密的方法佷多,包括 XOR, DES, twofish, blowfish, cast128, serpent, MARS, RC6, DFC 和 IDEA。 “losetup”程式的工作便是將加密文檔和文檔系統及其密碼聯系在一起。根據管理 kerneli.org 和國際加密修補軟件(international crypto patches)的 Alexander Kjeldaas 先生的看法, DES 和 losetup 目前並不兼容。 這是由于這兩種軟件處理 parity bit 的方法不同的緣故。目前 Linux 系統並無支持 DES 的計畫,因為 DES 密碼的加密程度比較不夠嚴密。 Twofish, blowfish, cast128 和 serpent 密碼可任意使用,沒有任何許可証的限制。 其他密碼可能有一些許可証方面的規定。有些密碼入選作為 AES 標準。 最後選定的密碼將作為全世界免費使用的密碼。 本文使用 serpent 加密法加密,因為這種加密法保密性強,運行極快,同時根據 GPL 的規定可免費散發。 在 serpent 有關的文件中指出,serpent 軟件使用 Ross Anderson, Eli Biham 和 Lars Knudsen 設計的長度 128-bit 的密碼組。這對使用者的保密要求提供了最高保證, 因為到目前為止,並無解碼的簡單辦法。有關 serpent 的文件及其源代碼可從下列網址下載: <tscreen> <url url="http://www.cl.cam.ac.uk/~rja14/serpent.html"> </tscreen> 這份文件假設使用者將密碼直接編入內核。不過,密碼也可作為模組編入, 但在該文件中並未對這種方法加以討論。不過方法也佷簡單,只需編輯“/etc/conf.module”; 詳情見前面提到的關於編輯內核的 HOWTO 文件。 <sect>摘要 <p> 這項過程涉及許多步驟。在下節<ref id="詳細內容">中對這些步驟有詳細說明。 先對這些步驟作出摘要說明也許是不錯的主意,因為 Unix 和 Linux 的高手也許不需要詳細步驟。 這些步驟如下: <enum> <item>下載最新的國際加密修補軟件 (編寫本文時的最新版本為“patch-int-2.2.10.4”): <p><tscreen> <url url="http://ftp.kerneli.org/pub/kerneli/"> </tscreen> <p><item>修補內核 <p><item>運行 'config' (或 'menuconfig' 或 'xconfig'),為新內核設置 'MakeFile'。 設定加密的各個選項並不集中在一起。首先,要設定任何選項都得選用 'Code Maturity level options' 項下的 'Prompt for development and/or incomplete code/drivers'。在 'Crypto options' 項下選用 'crypto ciphers' 和 'serpent' 兩項。在此再次假設使用 serpent 加密,不過也可試用其他的加密辦法。 在此必需指出,DES 到 2.2.10.4 版都還與系統不兼容 - 估計未來也不會兼容。在 'Block Devices' 下有几個重要選項必需選定。這包括 'Loopback device support', 'Use relative block numbers as basis for transfer functions (RECOMMENDED)' 和 'General encryption support' 等各項。此處不要選 'cast 128' 或 'twofish' 加密。此外在各種網路中也不需選取任何加密選項。 任何有關內核的設置方法均可參閱 LDP 文件,不在此處再次贅述。 <p><item>編輯新內核 <p><item>編輯 '/etc/lilo.conf',以便在設置文檔內增加新內核。運行 'lilo -v' 將內核加到 boot loader 內。 <p><item>從下列網址下載最新的 'util-linux' 源代碼 (此處使用 'util-linux-2.9v' 版): <p><tscreen> <url url="ftp://ftp.kernel.org/pub/linux/utils/util-linux/"> </tscreen> <p><item>解壓 'util-linux' 源代碼。 <p><item>利用在 '/usr/src/linux/Documentation/crypto/' 目錄內的相應修補軟件。 <p><item>仔細閱讀 'INSTALL'。這套軟件內有許多與系統有關的文檔的源代碼 (重要的工具如'login', 'passwd'和'init'等)。如果在編輯這些源代碼之前 不仔細地編輯 MCONFIG,最好手頭隨時有啟動片可用,因為系統隨時都會錯亂。 基本上,將所有 'HAVE_*' 都設成“yes”,使所有重要的系統軟件都不會被更改。 需要重建的工具是 'mount' 和 'losetup',以適合新的加密需要。 細節不妨參看下文<ref id="詳細內容">。 <p><item>編輯和安裝 'util-linux'。 <p><item>用新內核重新啟動電腦。 <p><item>編輯 '/etc/fstab',增加加載點,步驟如下: <p><tscreen><code> /dev/loop0 /mnt/crypt ext2 user,noauto,rw,loop 0 0 </code></tscreen> <p><item>如上文 '/mnt/crypt' 的方式,建立能收存文檔系統的目錄。 <p><item>作為使用者,收存加密的文檔如下: <p><tscreen><verb> dd if=/dev/urandom of=/etc/cryptfile bs=1M count=10 </verb></tscreen> <p><item>運行 losetup 如下: <p><tscreen><verb> losetup -e serpent /dev/loop0 /etc/cryptfile </verb></tscreen> 注意:設定使用密碼的機會只有一次。可用下列指令查核使用密碼: <p><tscreen><verb> losetup -d /dev/loop0 </verb></tscreen> 這條指令會使 loop device 停止作用。隨後再啟動 losetup 就可測試使用密碼,方法如下: <p><tscreen><verb> losetup -e serpent /dev/loop0 /etc/cryptfile </verb></tscreen> <p><item>設定 ext2 文檔系統如下: <p><tscreen><verb> mkfs -t ext2 /dev/loop0 100000 </verb></tscreen> <p><item>此時就可加載加密的文檔系統: <p><tscreen><verb> mount -t ext2 /dev/loop0 /mnt/crypt </verb></tscreen> <p><item>完成加密之後,可卸載和保護文檔系統如下: <p><tscreen><verb> umount /dev/loop0 losetup -d /dev/loop0' </verb></tscreen> </enum> <sect>詳細內容<label id="詳細內容"> <p><bf/內核修補軟件:/ 可從“2.2.x”版的內核開始修補內核。為“2.2.x”版的內核編寫的修補軟件都附帶除錯程序(bugfixes)。 新功能都會加入 Linux “2.3.x”版的開發內核。修補內核的辦法是首先取得所有修補軟件, 然後以下列指令修補: <tscreen><verb> cd /usr/src gzip -cd patchXX.gz patch -p0 </verb></tscreen> 重復 xx 各版本的修補,從次序低的 xx 往高的方向依次修補。 內核源代碼的默認目錄是 '/usr/src/linux'。如源代碼在其他目錄,可從 '/usr/src/linux' 建立一個符號連接(symbolic link)。 <p><bf/為 'util-linux' 的編輯設定 'MCONFIG':/ 以下是編輯 'util-linux' 時修改 'MCONFIG' 檔的部分內容。隨著系統版本的不同,修改方式並不完全相同, 此處基本上以 RedHat 5.2 為準。關鍵之處是不要覆蓋重要的系統工具,例 如'login'、'getty'或'passwd' 等。以下列出一些重要的設定: <tscreen><code> CPU=$(shell uname -m sed s/I.86/intel/) LOCALEDIR=/usr/share/locale HAVE_PAM=no HAVE_SHADOW=yes HAVE_PASSWD=yes REQUIRE_PASSWORD=yes ONLY_LISTED_SHELLS=yes HAVE_SYSVINIT=yes HAVE_SYSVINIT_UTILS=yes HAVE_GETTY=yes USE_TTY_GROUP=yes HAVE_RESET=yes HAVE_SLN=yes CC=gcc </code></tscreen> <p><bf/建議:/ 從'dev/loop0' 到 '/dev/loop7',這 8 個 loopback devices 均可用于此處。 利用目錄名稱不太顯眼的目錄作為加載點。不妨在 home 目錄內建立一個權限為 700 的加密目錄。 也用不顯眼的目錄存放加密文檔。不妨在 '/etc' 內使用 'sysfile' 或 'config.data' 這類名稱。 一般這類名稱的目錄或文檔都不太受人注意。 下列 Perl 腳本可用于加載和卸載文檔系統。將其抄入系統,改成可運行(chmod u+x), 然後存放在路徑目錄中。 <tscreen><code> #!/usr/bin/perl -w # #minimal utility to setup loopback encryption filesystem #Copyright 1999 by Ryan T. Rhea `losetup -e serpent /dev/loop0 /etc/cryptfile`; `mount /mnt/crypt`; </code></tscreen> 將上述腳本稱為 'loop',就可用一個指令('loop')和密碼設定 loopback 加密文檔系統。 <tscreen><code> #!/usr/bin/perl -w # #minimal utility to deactivate loopback encryption filesystem #Copyright 1999 by Ryan T. Rhea `umount /mount/crypt`; `losetup -d /dev/loop0`; </code></tscreen> 將這個腳本稱為 'unloop',以後只要鍵入 'unloop' 就可立即停止這個文檔系統的運作。 <!-- pxq --> </article> Results 1 - 1 Help - FTP Sites List - Software Dir. Searching half a billion files worldwide © 1997-2009 MARUHN Internet Solutions source from http://www.filewatcher.com/p/C-Linux-HOWTOs-sgml.tar.gz.1441422/Loopback-Encrypted-Filesystem-HOWTO.sgml.gz.html |
|
[求助]求serpent算法的源程序
==== MYCPLUS Sample Code === http://www.mycplus.com This code is made available as a service to our visitors and is provided for the purpose of illustration but you are free to use this source code for any purpose. If you wish to use this code on your website please retain this message including the link to mycplus.com. Please direct all inquiries to saqib at mycplus.com. === 256-bit Serpent VB Implementation === Contributors: David Tags: Source Code, Visual Basic, Encryption Platform: Visual Basic, Visual Studion Version: 6.0 === Description === This is an extremely slow but working Visual Basic implementation of the 256-bit Serpent algorithm. Serpent was a finalist for AES and appears to be a very secure powerful algorithm. The C implementation is by far the fastest and most efficient. Since Visual Basic is bogged down by memory problems and lacks the power that C provides, high level speeds for this algorithm may never be achieved in VB. If you find ways to increase the speed please contact David and let him know. source from http://www.mycplus.com/source-code/visual-basic/256-bit-serpent-vb-implementation/ |
|
|
|
[讨论]XOR加密算法的一个重要伪命题
An NP decision procedure for protocol insecurity with XOR.pdf (361.9 KB) 這個很理論,難度很高,法國或是德國人寫的內容。 Obfuscation of The Standard XOR Encryption Algorithm.pdf (118.4 KB) 這個有理論也很實務,qwert123 大大參考看看。 Note on the integer geometry of bitwise XOR.pdf (228.1 KB) 這個也是理論與實務參半,可是內容還是理論表達的多一點。 Cryptanalysis of two chaotic encryption schemes based on circular bit shift and XOR operations.rar 這個論文,qwert123 大大應該會喜歡,到底它市理論還是實作,看看就會明瞭。 |
|
|
|
[分享]Improving Shieh-Lin-Yang-Sun signature scheme
To lingyu 大大~ 這個是最原始我開始的版本~~ 也是最後一次用 word 寫論文 ~~ 之後我都是用 latex 來寫論文 ~ 其實我還是習慣/也喜歡用 word ~因為簡單方便~~ 附上這個 word file~讓你把裏面的內容修改一下 ~~ 修改的部分就是和你一起討論的地方 ~~ 然後再請你回傳給我~~ 我們一起聯名發表在 international conference 吧~ 這篇~是 Elgamal-like type (Elgamal 的變形)~ 等這篇發表后~可以把這個 Scheme 改成 ECC (橢圓曲線密碼)~ ECC 的 scheme 我已經寫稿 初稿的 equations 近一年半了。 |
|
[原创]密码学学习之DES(申请邀请)
根據我和副壇主討論的結果,有些內容可以在 http://74.125.155.132/search?q=cache:GjObrGnmKYsJ:cms.hit.edu.cn/mod/assignment/view.php%3Fid%3D1888+%E9%9A%8F%E6%9C%BA%E4%BA%A7%E7%94%9F%E7%9A%84S-%E7%9B%92%E7%94%9F%E6%88%90%E7%AE%97%E6%B3%95%E5%8F%8A%E5%85%B6%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E8%AE%BE%E8%AE%A1&cd=1&hl=en&ct=clnk&client=opera 找到一些重覆的內容。 主要包括: (1) DES 密钥生成算法; (2) DES 加、解密算法的概要描述; (3) 随机明文生成算法; (4) S- 盒的差分分布表计算算法; (5) 基于某个线性函数计算的 S- 盒 生成算法; (6) 随机产生的 S- 盒 生成算法; (7) 自行设计一种 S- 盒 生成算法 ( 选做 ) 。 想請 kerberosdc 解釋一下。 謝謝。 另外,我會請密碼版塊的密碼小組,對DES 學專精的成員參與你這帖的內容討論。 |
|
[讨论]XOR加密算法的一个重要伪命题
是的。 For example: 假設 C 為密文(ciphertext), A 為 明文(plaintext), B 為 key(secret key). 若 C= A⊕B, 且已知 C , 則要求得 secret key 就是計算 B=A⊕C, 再將計算出來的B 去驗證 B⊕C= A? 若是,那就正確;若不是,就是計算有問題。 以上只是單一的一個例子。 在程序中,很多都是 time sequency 的 status,要追蹤那種 serials,就要 step by step 的追。在追的過程中,去重建它的算法(Reconstructure algorightm)。 在crackme 的過程中,去推出 key genarator 是怎麼設計的,和上面講的,有著異曲同工之妙。 1) 這個反 method,就是尋找 plaintext 及 cipher 之間的彼此關係,你找出之間的關聯性(relationship),就能掌握破解的關鍵。 這點是偏 practical 多,theoretical 的少。 2) 還有另一個方法,就是找出這個算法的漏洞,或是 mathematical model 的缺陷。 這點可以完全是偏重 teoretical 面,或許也可以有 practical。 |
|
[分享]歡迎投稿ISITA2010,並相約在台灣台中見面。
1) 圖中的景色就是著名的日月潭。 在台中的中部,很多大陸同胞到台灣旅遊時,大部分的人都會到日月潭一遊。 2) 我看不出來,該會議是要理論的文章,如果閣下有好的 practical 文章,我相信大會是樂意接受的。 |
|
[讨论]XOR加密算法的一个重要伪命题
看了LZ 的敘述,我想LZ 誤解了一些內容。 XOR与字符串长度有关 以上這些,是應用 XOR 的方法,這個 method 只是借用了XOR 的特性,你要先瞭解 這個 method ,才有辦法去反這個 method,或是說~去解這個 method,或 crack 這個 method。 本身不是 XOR 有問題。 |
|
[原创]The XOR Secret in Our Computer System--延伸討論
如果要看懂這帖的內容的來龍去脈,請看密碼版的所有討論 XOR 相關的帖子。 譬如: 【原创】The XOR Secret in Our Computer System 【原创】The XOR Secret in Our Computer System--延伸討論 【分享+讨论】对 XOR_password 及XOR_cryptanalyiss 等相关论文研讨。(No. 2) 【分享+讨论】对 XOR_password 及XOR_cryptanalyiss 等相关论文研讨。(No. 1) 至於以下的,就當是 optional 吧: 【讨论】征集密码小组成员对 XOR_password 及XOR_cryptanalyiss 等相关论文研讨。 【分享】XOR_password ( cc-96-189 ) 94 篇論文--請幫忙更改檔名。 XOR_password ( cc0-95 ) 96 篇論文--請幫忙更改檔名。 XOR_cryptanalysis (另外的 0-88 篇 papers) -- rename files. 【分享】XOR_password (59 篇 paper) --請幫忙更改檔名。 礙於 qwert123 大大不太喜歡很理論的東西,那後面我就不再補充有關使用 XOR 在 protocol 上 insecurity 的材料。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值