计算机类 外文文献 翻译.doc
《计算机类 外文文献 翻译.doc》由会员分享,可在线阅读,更多相关《计算机类 外文文献 翻译.doc(13页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、本科毕业论文外文文献及译文文献、资料题目:Core Java Volume IIAdvanced Features文献、资料来源:著作文献、资料发表(出版)日期:2008.12.1院 (部): 计算机科学与技术学院专 业: 网络工程班 级: 网络082姓 名: 刘治华学 号: 指导教师: 许丽娜翻译日期: 2012.5.10外文文献:Core Java Volume IIAdvanced FeaturesWhen Java technology first appeared on the scene, the excitement was not about a well-crafted pr
2、ogramming language but about the possibility of safely executing applets that are delivered over the Internet (see Volume I, Chapter 10 for more information about applets). Obviously, delivering executable applets is practical only when the recipients are sure that the code cant wreak havoc on their
3、 machines. For this reason, security was and is a major concern of both the designers and the users of Java technology. This means that unlike other languages and systems, where security was implemented as an afterthought or a reaction to break-ins, security mechanisms are an integral part of Java t
4、echnology.Three mechanisms help ensure safety:Language design features (bounds checking on arrays, no unchecked type conversions, no pointer arithmetic, and so on).An access control mechanism that controls what the code can do (such as file access, network access, and so on).Code signing, whereby co
5、de authors can use standard cryptographic algorithms to authenticate Java code. Then, the users of the code can determine exactly who created the code and whether the code has been altered after it was signed.Below, youll see the cryptographic algorithms supplied in the java.security package, which
6、allow for code signing and user authentication.As we said earlier, applets were what started the craze over the Java platform. In practice, people discovered that although they could write animated applets like the famous nervous text applet, applets could not do a whole lot of useful stuff in the J
7、DK 1.0 security model. For example, because applets under JDK 1.0 were so closely supervised, they couldnt do much good on a corporate intranet, even though relatively little risk attaches to executing an applet from your companys secure intranet. It quickly became clear to Sun that for applets to b
8、ecome truly useful, it was important for users to be able to assign different levels of security, depending on where the applet originated. If an applet comes from a trusted supplier and it has not been tampered with, the user of that applet can then decide whether to give the applet more privileges
9、.To give more trust to an applet, we need to know two things:Where did the applet come from?Was the code corrupted in transit?In the past 50 years, mathematicians and computer scientists have developed sophisticated algorithms for ensuring the integrity of data and for electronic signatures. The jav
10、a.security package contains implementations of many of these algorithms. Fortunately, you dont need to understand the underlying mathematics to use the algorithms in the java.security package. In the next sections, we show you how message digests can detect changes in data files and how digital sign
11、atures can prove the identity of the signer.A message digest is a digital fingerprint of a block of data. For example, the so-called SHA1 (secure hash algorithm #1) condenses any data block, no matter how long, into a sequence of 160 bits (20 bytes). As with real fingerprints, one hopes that no two
12、messages have the same SHA1 fingerprint. Of course, that cannot be truethere are only 2160 SHA1 fingerprints, so there must be some messages with the same fingerprint. But 2160 is so large that the probability of duplication occurring is negligible. How negligible? According to James Walsh in True O
13、dds: How Risks Affect Your Everyday Life (Merritt Publishing 1996), the chance that you will die from being struck by lightning is about one in 30,000. Now, think of nine other people, for example, your nine least favorite managers or professors. The chance that you and all of them will die from lig
14、htning strikes is higher than that of a forged message having the same SHA1 fingerprint as the original. (Of course, more than ten people, none of whom you are likely to know, will die from lightning strikes. However, we are talking about the far slimmer chance that your particular choice of people
15、will be wiped out.)A message digest has two essential properties:If one bit or several bits of the data are changed, then the message digest also changes.A forger who is in possession of a given message cannot construct a fake message that has the same message digest as the original.The second prope
16、rty is again a matter of probabilities, of course. Consider the following message by the billionaire father:Upon my death, my property shall be divided equally among my children; however, my son George shall receive nothing.That message has an SHA1 fingerprint of2D 8B 35 F3 BF 49 CD B1 94 04 E0 66 2
17、1 2B 5E 57 70 49 E1 7EThe distrustful father has deposited the message with one attorney and the fingerprint with another. Now, suppose George can bribe the lawyer holding the message. He wants to change the message so that Bill gets nothing. Of course, that changes the fingerprint to a completely d
18、ifferent bit pattern:2A 33 0B 4B B3 FE CC 1C 9D 5C 01 A7 09 51 0B 49 AC 8F 98 92Can George find some other wording that matches the fingerprint? If he had been the proud owner of a billion computers from the time the Earth was formed, each computing a million messages a second, he would not yet have
19、 found a message he could substitute.A number of algorithms have been designed to compute these message digests. The two best-known are SHA1, the secure hash algorithm developed by the National Institute of Standards and Technology, and MD5, an algorithm invented by Ronald Rivest of MIT. Both algori
20、thms scramble the bits of a message in ingenious ways. For details about these algorithms, see, for example, Cryptography and Network Security, 4th ed., by William Stallings (Prentice Hall 2005). Note that recently, subtle regularities have been discovered in both algorithms. At this point, most cry
21、ptographers recommend avoiding MD5 and using SHA1 until a stronger alternative becomes available. (See for more information.)The Java programming language implements both SHA1 and MD5. The MessageDigest class is a factory for creating objects that encapsulate the fingerprinting algorithms. It has a
22、static method, called getInstance, that returns an object of a class that extends the MessageDigest class. This means the MessageDigest class serves double duty:As a factory classAs the superclass for all message digest algorithmsFor example, here is how you obtain an object that can compute SHA fin
23、gerprints:MessageDigest alg = MessageDigest.getInstance(SHA-1);(To get an object that can compute MD5, use the string MD5 as the argument to getInstance.)After you have obtained a MessageDigest object, you feed it all the bytes in the message by repeatedly calling the update method. For example, the
24、 following code passes all bytes in a file to the alg object just created to do the fingerprinting:InputStream in = . . .int ch;while (ch = in.read() != -1)alg.update(byte) ch);Alternatively, if you have the bytes in an array, you can update the entire array at once:byte bytes = . . .;alg.update(byt
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 计算机类 外文文献 翻译 计算机 外文 文献
限制150内