Advanced Cryptography.ppt
《Advanced Cryptography.ppt》由会员分享,可在线阅读,更多相关《Advanced Cryptography.ppt(31页珍藏版)》请在麦多课文档分享上搜索。
1、Advanced Cryptography,Security Computer Science Tripos part 2 Ross Anderson,Advanced Crypto Engineering,Once we move beyond vanilla encryption into creative used of asymmetric crypto and hash functions, all sorts of tricks become possible Its also very easy to shoot your foot off! Framework: Whats t
2、ricky about the maths Whats tricky about the implementation Whats tricky about the protocols etc To roll your own crypto, you need specialist help,Hash Functions,If we want to compute a MAC without using a cipher (e.g. to avoid export controls) we can use HMAC (hash-based message authentication code
3、):HMAC(k,M) = h(k1, h(k2, M)where k1 = k xor 0x5c5c5c5c5c, and k2 = 0x3636363636 (why?) Another app is tick payments make a chain h1 = h(X), h2 = h(h1), ; sign hk; reveal hk-1, hk-2, to pay for stuff A third is timestamping; hash all the critical messages in your organisation in a tree and publish t
4、he result once a day,Public Key Crypto Revision,Digital signatures: computed using a private signing key on hashed data Can be verified with corresponding public verification key Cant work out signing key from verification key Typical algorithms: DSA, elliptic curve DSA Well write sigAX for the hash
5、ed data X signed using As private signing key,Public Key Crypto Revision (2),Public key encryption lets you encrypt data using a users public encryption key She can decrypt it using her private decryption key Typical algorithms Diffie-Hellman, RSA Well write XA Big problem: knowing whose key it is!,
6、PKC Revision Diffie-Hellman,Diffie-Hellman: underlying metaphor is that Anthony sends a box with a message to Brutus But the messengers loyal to Caesar, so Anthony puts a padlock on it Brutus adds his own padlock and sends it back to Anthony Anthony removes his padlock and sends it to Brutus who can
7、 now unlock it Is this secure?,PKC Revision Diffie-Hellman (2),Electronic implementation:A B: MrAB A: MrArBA B: MrB But encoding messages as group elements can be tiresome so instead Diffie-Hellman goes:A B: grAB A: grBA B: MgrArB,PKC Revision El Gamal,Encryption DH can use long-term keys, say priva
8、te key xA and public key yA = gxA The Bob looks up yA and makes the long-term shared key yAxA = gxAxB = yBxA In El Gamal, combine with a transient private key k Bob encrypts M as M.yAk, gk Alice decrypts by forming yAk as (gk)xA,PKC Revision El Gamal (2),Signature trick: given private key xA and pub
9、lic key yA = gxA, and transient private key k and transient public key r = gk, form the private equation rxA + sk = m The digital signature on m is (r,s) Signature verification isg(rxA + sk) = gm i.e. yAr.rs = gm,PKC Revision DSS,The Digital Signature Standard is ElGamal with a few technical weaknes
10、ses fixed p: a prime of 1024 bits; q: a prime dividing p-1; g: an element of order q in the integers mod p Signature on m is (r,s) such thatr = (gk mod p) mod qh(M) = xAr + ks Verification: exercise Only known vuln: choose q = h(M1) - h(M2),Public Key Crypto Revision (3),One way of linking public ke
11、ys to principals is for the sysadmin to physically install them on machines (common with SSH, IPSEC) Another is to set up keys, then exchange a short string out of band to check youre speaking to the right principal (STU-II, Bluetooth simple pairing) Another is certificates. Sam signs Alices public
12、key (and/or signature verification key) CA = sigSTS,L,A,KA,VA But this is still far from idiot-proof,The Denning-Sacco Protocol,In 1982, Denning and Sacco pointed out the revocation problem with Needham-Schroder and argued that public key should be used instead A S: A, B S A: CA, CB A B: CA, CB, sig
13、ATA, KABKB Whats wrong?,The Denning-Sacco Protocol (2),Twelve years later, Abadi and Needham noticed that Bob can now masquerade as Alice to anyone in the world! A S: A, B S A: CA, CB A B: CA, CB, sigATA, KABKB B S: B, C S B: CB, CC B C: CA, CC, sigATA, KABKC,Encrypting email,Standard way (PGP) is t
14、o affix a signature to a message, then encrypt it with a message key, and encrypt the message with the recipients public key A B: KMB, M, sigAh(M)KM X.400 created a detached signature A B: KMB, M KM, sigAh(M) And with XML you can mix and match e.g. by signing encrypted data. Is this good?,Public-key
15、 Needham-Schroeder,Proposed in 1978: A B: NA, AKB B A: NA, NBKA A B: NBKB The idea is that they then use NANB as a shared key Is this OK?,Public-key Needham-Schroeder (2),Attack found eighteen years later, in 1996: A C: NA, AKC C B: NA, AKB B C: NA, NBKA C A: NA, NBKA A C: NBKC C B: NBKB Fix: explic
16、itness. Put all names in all messages,Public Key Protocol Problems,Its also very easy to set up keys with the wrong people man-in-the-middle attacks get more pervasive. Assumptions are slippery to pin down Technical stuff too if the math is exposed, an attacker may use it against you! So data being
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ADVANCEDCRYPTOGRAPHYPPT
