CS 4640: cryptography

德昂
• 阅读 1019

CS 4640: Assignment 1
Basic security concepts and applied cryptography
February 19, 2019
Guidelines
Please read and follow the guidelines articulated here.
Groups. As stated in class, on the website, and on Piazza, this assignment will be done in groups of 5 or

  1. Here are the groups for this assignment.
    Group Members
  2. Chris Schulstad, Sriram Srinivasan, John Thiede, Anthony Tran, Elizabeth Valentine
  3. Derek Choi, Joyanta Debnath, Donny Dong, Yongheng Fan, Owen Kueter, Joshua Magri
  4. Spencer Gritton, Bryce Kosinski, Evan Raab, Tucker Snider, Daniel Stutz, Bincheng Wang
  5. Benjamin Alston, James Bongiovanni, Mercury Cagley, James Glowacki, Greg Mich,
    Zichen Zheng
  6. Jessi Bierbaum, Connor Eschrich, Jake Espey, Ian Gradert, Ziliang Luo, Xiao Song
  7. Logan Brown, Ziqing He, Xin Man, Yao Wang, Jiahua Zhang, Gongyu Zhou
    If you are unable to get in touch with any of your team-mates, send me an email ASAP and I’ll put you in
    touch. I will take complaints of discrimination and harassment extremely seriously and these will be reported
    to the appropriate authorities. You are expected to treat your classmates with respect and kindness.
    Submission. The following rules will apply for all submissions.
    The assignment is due on April 9th at 11:59:00 pm on ICON.
    Late submissions will result in a 10% penalty per day.
    Each team will only submit one set of solutions to be graded.
    You are expected to be able to explain all answers in your submission.
    Non-PDF or non-typeset submissions will face a 10% penalty.
    Group member feedback. Each team member may also complete the following series of questions about
    their team mates and group experience: https://goo.gl/forms/8LbhMqqS... You will receive a
    1% bonus for completing this review. Submissions will not be accepted after May 1st.
    1
  8. Basic security concepts (10 points)
  9. True or False (1 point each).
    (a) If Tyrion uses a browser with no code vulnerabilities and uses a unique, long password for every
    website he visits, then he will be safe against phishing attacks.
    (b) Threat modeling should be done only for the most powerful adversaries. After all, if we’re secure
    against them, we’re also secure against every one else.
    (c) Your home Wi-Fi network is an attack surface that is exploitable to an attacker seeking control
    of your mobile device.
    (d) Requiring users to have long passwords and biometric authentication on their mobile phones is
    one way to prevent some of the threats posed by a thief that has no drawbacks.
    (e) If the system is highly valuable, it is safe to assume that humans will correctly play their roles in
    a security mechanism.
  10. Threat modeling (5 points). You need to build a video sharing platform which monetizes videos
    by placing ads on them. Revenue generated by a video depends on the number of views received by
    the video. These payments are made by the advertisers on your platform. Generated revenue is split
    between your platform, the content creator, and any other copyright holders in the video. Perform an
    in-depth threat model of this system.
  11. Historical ciphers (10 points)
    Write code to decrypt the following alpha-numeric and alphabetic English language strings. Show the
    decrypted strings and their keys. Note: You will be required to explain and demo your code in class after
    submission.
  12. (3 points) Hint: This string is alpha-numeric.
    9QXX P1ZQ TQ4Q’5 G 21UZ65
  13. (7 points) Hint: This string only has the English alphabet.
    XITOVEYRLKKGFIWYYSZVGMOYCXJOCUOVCXSQDVYXKCBWRYPMFIWYYIXSUD
    LCBYJOWYXHQYHMSEDEPJMSKWMRWILDWURERSQRRMLUMLQSDISSGSSVHLDK
    CDXFSWDBSKKRWYXFOVEECGTYQDAYXRYDIJVCMELMGMKPICVMLQKMDXYWEI
    OCMEYLNIPCXYXHLOZCBKMXRYQMTOCMEYNXITOVEYRLKPCDCMEHMGRLOZCB
    KMXRYBYLKVMERBKRBNIQOVRISSXITOVEYRLKQYUIWYYABCLOZCBKMXRYCE
    WQSMNFWORCFIPQSLXEROPJKPGOELNLSBXWYYUOZCURMGRCKGFYXFOVDYVQ
    YPMXKWYYPRIYBXQLICXEARMLQFSDCMEVCDSMCLWDSQKCGDMLCMBOACLSRR
    OLYAURERCFCOREYMLQSLGIIXSUDLCQEKOELNACBIEYRLKTJKCGDELNMDIS
    SKWIWIFYAGWJCOPGXKBYRRDIJVQCISSBIRYSZVMLNXMCICXITOVEYRLKKG
    FIWYYSZRCFIPQSLXEJOXWYYBYALXITOVEYRLKVSXEPYYLNELNHCCIPDCME
    RCFIPQSLXEKKOCISSMVWXITOVEYRLKWYIKMYHZIILOZCBKMXRYDIJVEJSI
    YXHFEVRISSXITOVEYRLKKGFIWYYSZRCFIPQSLXEJOXWYYBYALXITOVEYRL
    KVSXEPYYLNELNHCCIPDCMERCFIPQSLXEKKOCISSMVWXITOVEYRLKWYIKMY
    HZIILOZCBKMXRYDIJVEJSIYXHFEVRISSXITOVEYRLKKGFILOZCBKMXRYQM
    TOKGFIWYYSZSMRRCFIPQSLXEESZCXITOVEYRLKKGFIESZCISSETUOZCURM
    GRCKGFYXFOVDYVQYPMXKWYYPRIYBXQLICXEARMLQFSDCMEVCDSMCLWDSQK
    CGDMLCMBOACLSRROLYAURERCFCOREYMLQSLGIIXSUDLCQEKOELNACBIEYR
    LKTJKCGDMHEWRGELXEROPJISSRSUSQDOIJSREQSRDEKKOCISSERBOVQDEL
    NRCFIPQSLXEESZCISSETLOZCBKMXRYVIRISSNSUXRCFIPQSLXEPERYBSSX
    2
    HYXHBOWCBXWYYLOZCBKMXRYWEIOCMEGPIRCFIPQSLXEQKCEYSBLCCXITOV
    EYRLKXCVPYVMCKRBRYPDCMERCFIPQSLXEESZCISSETLOZCBKMXRYVIRISS
    NSUXRCFIPQSLXEPERYBSSXHYXHBOWCBXWYYLOZCBKMXRYWEIOCMEGPIRCF
    IPQSLXEQKCEYSBLCCXITOVEYRLKXCVPYVMCKRBRYPDCMERCFIPQSLXEESZ
    CISSETLOZCBKMXRYVIRISSNSUXRCFIPQSLXEPERYBSSXHYXHBOWCBXWYYL
    OZCBKMXRYWEIOCMEGPI
  14. Perfect secrecy and definitions of security (15 points)
  15. (5 points) Prove that the WEP protocol is CPA-secure.
  16. (5 points) Show that when the number of queries permitted by the CPA attacker is ≥ 5K, common
    implementations of WEP are practically broken. Assume WEP is being used in 64-bit mode.
  17. (5 points) Assume that we require only that an encryption scheme (Gen, Enc, Dec) over a message
    space M satisfies the following: for all m ∈ M, the probability that Deck(Enck(m)) = m is at least t.
    Show that perfect secrecy (as defined in class) can be achieved even when |K| < |M| as long as t ≥ 1.
    What is the lower bound on the required size of K.
  18. Block ciphers (15 points)
  19. (5 points) Consider a variant of the CBC-mode encryption where the sender simply increments the IV
    by 1 each time a message is encrypted (rather than choosing a random IV). Show that the resulting
    scheme is not CPA-secure.
  20. (5 points) Show that the CBC-mode encryption is not CCA-secure.
  21. (5 points) Let Π1 = (Gen1, Enc1, Dec1) and Π2 = (Gen2, Enc2, Dec2) be two encryption schemes
    for which it is known that at least one is CPA-secure. The problem is that you do not know which one
    is CPA-secure. Show how to construct an encryption scheme Π which is guaranteed to be CPA-secure
    as long as at least one of Π1 or Π2 are CPA-secure. Provide an overview of your proof (similar level of
    detail to our in-class proofs).
    Hint: Generate two plaintext messages from the original plaintext message so that knowledge of either
    one of the parts reveals nothing about the plaintext, but knowledge of both yields the original plaintext.
  22. Integrity (15 points)
  23. (10 points) Let F be a pesudorandom function. Show that each of the following message authentication
    codes is insecure.
    (a) (5 points) To authenticate a message m = m1|| . . . ||ml
    , where mi ∈ {0, 1}
    n, compute tag :=
    Fk(m1) ⊕ . . . ⊕ Fk(ml), and send < tag >.
    (b) (5 points) To authenticate a message m = m1|| . . . ||ml
    , where mi ∈ {0, 1}
    n, select r ← {0, 1}
    n at
    random and compute tag := Fk(r) ⊕ Fk(m1) ⊕ . . . ⊕ Fk(ml), and send < r, tag >.
  24. (5 points) Let H1 and H2 be two hash functions. We define a third hash function H3 such that
    H3(x) = H1(x)||H2(x). Prove that as long as at least one of H1 and H2 is collision resistant, then H3
    is also collision resistant.
    3
  25. Public-key cryptography (15 points)
  26. (5 points) Describe in detail a man-in-the-middle attack on the Diffie-Hellman key-exchange protocol
    where the adversary ends up sharing a key kA with Aisha and a different key kB with Beth, and Aisha
    and Beth cannot detect that anything has gone wrong. How can they try to prevent this scenario from
    arising?
  27. (5 points) Consider the following key-exchange protocol:
    Maya chooses k, r ← {0, 1}
    n at random, and sends s := k ⊕ r to Rashida.
    Rashida chooses t ← {0, 1}
    n at random and sends u := s ⊕ t to Maya.
    Maya computes w := u ⊕ r and sends it to Rashida.
    Maya outputs k and Rashida computes w ⊕ t.
    Show that Rashida and Maya output the same key. How secure is this scheme? Can an adversary
    reconstruct the key by simply observing the public transcript?
  28. (5 points) Generate an OpenSSL RSA public and private key pair. Publish your public key on your
    ICON user profile. Submit a file containing your name and sign it using the RSA implementation in
    the OpenSSL library.
  29. Credit reel (20 points)
    You get 20 points just for submitting this assignment with a well written and formatted credit reel! Use the
    following section to tell us what references you used to complete this assignment (e.g., stackoverflow posts,
    wikipedia, etc.), who helped you IRL or on Piazza, and which team-mates did which parts of the assignment.
    WX:codehelp
点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Karen110 Karen110
3年前
一篇文章带你了解JavaScript日期
日期对象允许您使用日期(年、月、日、小时、分钟、秒和毫秒)。一、JavaScript的日期格式一个JavaScript日期可以写为一个字符串:ThuFeb02201909:59:51GMT0800(中国标准时间)或者是一个数字:1486000791164写数字的日期,指定的毫秒数自1970年1月1日00:00:00到现在。1\.显示日期使用
美凌格栋栋酱 美凌格栋栋酱
6个月前
Oracle 分组与拼接字符串同时使用
SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(
待兔 待兔
1年前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Jacquelyn38 Jacquelyn38
4年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
Stella981 Stella981
3年前
KVM调整cpu和内存
一.修改kvm虚拟机的配置1、virsheditcentos7找到“memory”和“vcpu”标签,将<namecentos7</name<uuid2220a6d1a36a4fbb8523e078b3dfe795</uuid
Stella981 Stella981
3年前
Android So动态加载 优雅实现与原理分析
背景:漫品Android客户端集成适配转换功能(基于目标识别(So库35M)和人脸识别库(5M)),导致apk体积50M左右,为优化客户端体验,决定实现So文件动态加载.!(https://oscimg.oschina.net/oscnet/00d1ff90e4b34869664fef59e3ec3fdd20b.png)点击上方“蓝字”关注我
Wesley13 Wesley13
3年前
35岁是技术人的天花板吗?
35岁是技术人的天花板吗?我非常不认同“35岁现象”,人类没有那么脆弱,人类的智力不会说是35岁之后就停止发展,更不是说35岁之后就没有机会了。马云35岁还在教书,任正非35岁还在工厂上班。为什么技术人员到35岁就应该退役了呢?所以35岁根本就不是一个问题,我今年已经37岁了,我发现我才刚刚找到自己的节奏,刚刚上路。
Stella981 Stella981
3年前
CS231N assignment1
Visualizesomeexamplesfromthedataset.Weshowafewexamplesoftrainingimagesfromeachclass.classes'plane','car','bird','cat','deer','dog','frog'
Python进阶者 Python进阶者
1年前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这