最近正在研究(为了作业)加密技术,有兴趣讨论下吗?

0 views
Skip to first unread message

Lucas

unread,
Nov 10, 2006, 8:10:46 AM11/10/06
to Linux小抽屉
最基础的加密算法,RSA。算法简洁和python
实现在我的blog上 http://luweiblog.squarespace.com

正在做有关watermark中关于DCT算法(Discrete cosine
trasform)的实现。


另,这好像就张宇和王涛吧,最近咋样都?

又另,有人想看xml and xsl
tutorial的在我blog上有surrey大学的课件连接。

国宝

unread,
Nov 10, 2006, 9:50:55 AM11/10/06
to Linux小抽屉
好好好!好东东!呵呵!

国宝

unread,
Nov 10, 2006, 9:51:46 AM11/10/06
to Linux小抽屉
你那里有没有搞硬盘的牛人!我这里需要帮忙!急急急!

国宝

unread,
Nov 10, 2006, 9:56:47 AM11/10/06
to Linux小抽屉
你那个blog上不去啊!!!搞什么搞啊??RP??

Lucas

unread,
Nov 10, 2006, 3:20:47 PM11/10/06
to Linux小抽屉
你确定我那个连接打不开.......我靠,我可是www.squarespace.com上注册的BLOG啊!!!!
MD,估计又让咱国内那帮畜生给封了!

Lucas

unread,
Nov 10, 2006, 3:25:10 PM11/10/06
to Linux小抽屉
搞硬盘啥的?拆,砸,摔等我行!

Lucas

unread,
Nov 10, 2006, 3:31:08 PM11/10/06
to Linux小抽屉
RSA encryption arithmetic and be achieved by Python
The first approach of the algorithm, we random produce two prime
numbers named p and q, Compute N = p * q note that N. Choose which
should be less than N such that e and (p-1) (q-1) are relatively prime
numbers. Public key is a pair of numbers (N, e). They should have no
common factor other than 1. For example d is the decryption key,
According to this algorithm (e*d) %( p-1) (q-1) = = = 1(identity sign),
get d is the private key. Using the Euclidean algorithm to compute the
modular inverse of e modulo N, the result is d. For example P is the
ASCII code of a char in clear text. Then we take the RSA algorithm C =
Pe % N. we can get C.

Why chose python. Because there is a problem for the other language,
big number operation but python can it directly.

Main code: rsaEncrption.py

N = p * q # two big prime number p and q

d = 2 # d is the private key. it make the identic equation (e*d)
% ((p-1)*(q-1)) === 1

while (e*d) %(p-1)*(q-1) != 1

d += 1

# public key : (N, e) private key : d

# cipherCode is a ASCII code of a char of cipherText

# plainCode is a ASCII Code of a char of clearText

cipherAsciiCode = (plainAsciiCode ** e) % N # encryption

plainAsciiCode = (cipherAsiccCode ** d) % N # decryption

Lucas

unread,
Nov 10, 2006, 3:41:23 PM11/10/06
to Linux小抽屉
一个英国杂志的网站 http://www.linuxformat.co.uk/
有闲工夫去看看,都是内核及应用方面的.

Spoo...@gmail.com

unread,
Nov 13, 2006, 8:35:19 PM11/13/06
to Linux小抽屉
blog确实上不去,估计用代理才行吧,可是我又没用过......

Spoo...@gmail.com

unread,
Nov 13, 2006, 9:11:07 PM11/13/06
to Linux小抽屉

"Lucas 写道:

最近不爽,老干一些和专业技术不相干的事情。前一段时间被一个国内的垃圾报表工具折腾的够戗,整个给它充当免费测试,靠,强烈bs国内软件产品!!(那个谁,把砖头放下!)项目组里又出现一个败类,和这个败类在一个项目组是我人生之大不幸也!注:败类毕业于北航软件工程硕士,做了快两年的开发,现在项目组中基本上只能以^C、^V混生活,经常向我请教类似"html里的表格线怎么显示?"这类让我当场晕倒人事不醒的问题,我一直不加bs的无私的事后才去wc狂吐一通地帮助他,然有一天我想让丫给传个项目中共享的文档,丫竟万分不耐烦地拒绝,别人有问题请教丫丫也显得巨牛B不帮别人,丫的做法实在是丢丫自己、丫父母、丫学校的脸,从此对丫不正脸相对,丫也不敢再向我请教那些弱智问题,只是在我写完代码后偷偷^C^V我的代码,有一次竟然连bug也一同拷贝了,事后测试的报上来丫半天找不出原因,只好厚着脸皮来找我,看丫那低三下四的样,我那个乐.......
为了不虚度我本已所剩不多的程序生涯,也为了不再每天看见败类就象吃了苍蝇似的恶心,我,决定,明年过完年之后开始寻找新东家,把自己卖个好价钱......

国宝

unread,
Nov 14, 2006, 5:14:35 AM11/14/06
to Linux小抽屉
呵呵,我最近这几天在讲课,呵呵!也还好!
在哪里都会遇到这种人!哈哈,你好好去爽爽那个硕士!哈哈~~~
做技术是需要点时间沉下心来,好好在一个方向上钻研一段时间的,你还年轻(狂流汗!!~)
呵呵,我现在在琢磨一点关于系统底层操作硬盘的东东!比较痛苦!呵呵,不过,有一点收获的时候还是比较爽的!
建议你也抽点固定的时间钻研点啊!好把自己卖个好价钱!

国宝

unread,
Nov 14, 2006, 5:17:19 AM11/14/06
to Linux小抽屉
你说的新东家是什么意思?已经卖了??

Lucas

unread,
Nov 14, 2006, 4:26:42 PM11/14/06
to Linux小抽屉
同学们,这Y的是聊技术的地方,不要老说写无关话题!

......................

草,我这几天在忙到计算机思想品德课作业.......MD,都TM懒的骂了!

Jia Lu

unread,
Nov 14, 2006, 6:58:25 PM11/14/06
to linux...@googlegroups.com
我又一个硬盘坏了 不知道能不能修好

2006/11/14, 国宝 <steve...@gmail.com>:
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '001...@liamg.moc'.split('@')])"
--
\     "Unix is an operating system, OS/2 is half an operating system, |
  `\       Windows is a shell, and DOS is a boot partition virus."  -- |
_o__)                                                  Peter H. Coffin |

国宝

unread,
Nov 15, 2006, 3:53:27 AM11/15/06
to Linux小抽屉
没问题,老天和上帝会保佑你的!呵呵!:)
又,就是说已经坏过了?I'm so sorry!

Spoo...@gmail.com

unread,
Nov 15, 2006, 9:14:23 PM11/15/06
to Linux小抽屉

"国宝 写道:
"
> 你说的新东家是什么意思?已经卖了??

还没寻呢。昨天又听说公司年底有大动作,人事有大调整,哥们让我这段时间好好表现,说大调整就有大机会,我等着春节前看看到底啥动作吧。

Lucas

unread,
Nov 16, 2006, 9:43:33 AM11/16/06
to Linux小抽屉
我的BLOG国内能上去啊.....?!

莫非是人品....

Reply all
Reply to author
Forward
0 new messages