99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

COMP3334代做、SQL設計編程代寫

時間:2024-04-09  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



COMP3334 Project
End-to-end encrypted chat web application
Semester 2, 2023/2024
Nowadays, web services are the most
common form of applications that users are
exposed to. Web browsers become the most
popular application on a computer that
enables users to access those web services.
Ensuring the security of web services is
essential for the Internet. Moreover, privacy
of communications is an important feature of
modern times. Your job is to implement an
end-to-end encrypted chat web application
and secure various aspects of the website.
Overview
Objectives
1. Adapt a basic chat web application to become a secure E2EE chat web app
2. Comply with some of the requirements in NIST Special Publication 800-63B “Digital
Identity Guidelines – Authentication and Lifecycle Management” for US federal
agencies (which is also a reference for other types of systems)
3. Implement a secure MFA mechanism based on passwords and OTP (or FIDO2)
4. Encrypt communications between two users so that the server does not know the
content of the messages (E2E encryption)
5. Protect communications in transit by configuring a modern TLS deployment
6. Package a docker image of your web app
Requirements (authentication)
1. From NIST Special Publication 800-63B:
1. Comply with all SHALL and SHOULD requirements from sections listed below
2. Use the following authenticators:
• User-chosen Memorized Secret (i.e., password/passphrase)
• and Single-Factor OTP Device (e.g., Google Authenticator)
• or Single-Factor Cryptographic Device (e.g., Yubikey) if you have one
• and Look-Up Secrets (recovery keys)
• Comply with related requirements in §5.1 and §4.2.2
• §5.1.1.2: “Memorized secrets SHALL be salted and hashed using a suitable one-way key
derivation function”
• See our Password Security lecture for an appropriate function
• Memorized Secret Verifiers (§5.1.1.2)
• Choose “Passwords obtained from previous breach corpuses” and refer to
https://haveibeenpwned.com/API/v3#PwnedPasswords for the corpus to check against
• §5.2.8 and §5.2.9 are automatically complied
Requirements (authentication)
1. From NIST Special Publication 800-63B:
3. §5.2.2: Implement rate-limiting mechanisms AND image-based CAPTCHAs
4. Implement new account registration and bind authenticators (OTP/Yubikey and recovery keys) at
the same time
• Optional: provide a way to change authenticators after account registration
5. §7.1: Implement proper session binding requirements
6. Exceptions:
• OTP authenticators — particularly software-based OTP generators — SHOULD discourage and
SHALL NOT facilitate the cloning of the secret key onto multiple devices.
• Google Authenticator and related apps are OK
Requirements (E2EE chat)
2. Once users are logged in, secure chat messages between two users in a way so that the server cannot
decrypt the messages
1. Use the ECDH key exchange protocol to establish a shared secret between two users
• Leverage the WebCrypto API, see demo https://webkit.org/demos/webcrypto/ecdh.html
• Exchanged information during the key exchange can be sent through the server
• The server is trusted not to modify messages of the key exchange
• Choose P-384 as the underlying curve
2. Derive two 256-bit AES-GCM encryption keys and two 256-bit MAC keys from the shared secret
using HKDF-SHA256
• One key for encryption between user1 to user2, and another one from user2 to user1
• Using WebCrypto API again, see https://developer.mozilla.org/enUS/docs/Web/API/HkdfParams
• The salt should be unique so another key derivation in the future produces different keys, use
for instance a counter starting at 1
• The info parameter should represent the current context (e.g., “CHAT_KEY_USER1to2” for the
key for user1user2, and “CHAT_MAC_USER1to2” for the MAC key for user1user2)
Requirements (E2EE chat)
2. Once users are logged in, secure chat messages between two users in a way so that the server cannot
decrypt the messages
3. Messages will be encrypted using AES in GCM mode
• 96-bit IVs are counters representing the number of messages encrypted with the same key
• Note: GCM does not require unpredictable IVs, but unique IVs
• Send the IV together with the ciphertext to the recipient
• As a recipient, verify that IV𝑖𝑖 > IV𝑖𝑖−1 to prevent replay attacks
• Protect the IV with HMAC-SHA256 using the derived MAC key to prevent the attacker from
choosing IVs
• Associated data should reflect the current context (e.g., “CHAT_MSG_USER1to2”)
• Authentication tags should be 128 bits
4. Store all key material in the HTML5 Local Storage of the browser to be retrieved after the browser
is reopened
5. Display the history of previous messages being exchanged + new messages
• If Local Storage has been cleared, previous messages cannot be decrypted, show warning
Requirements (E2EE chat)
2. Once users are logged in, secure chat messages between two users in a way so that the server cannot
decrypt the messages
6. All symmetric keys and IVs should be re-derived from the shared secret when user clicks on a
“Refresh” button in the chat (not the browser refresh button), using a new salt
• The participant that requests a change should inform the other party with a special message
composed of the last IV that has been used, the string “change”, altogether protected with
the old MAC key AND the new MAC key
• Two different MACs over the message
• The other party should verify the old MAC before processing the message, then derive
new keys and verify again the new MAC before accepting the new keys
• Both parties should show a message “Keys changed” in the chat history
• Old keys should be kept to decrypt older messages when the browser is reopened, you
should identify which set of keys to use for a given message based on the preceding values
sent during the key exchange (i.e., keep track of user public keys)
• Key exchange messages older than a minute should not be considered as a fresh key
exchange to engaged into
Requirements (E2EE chat)
2. Once users are logged in, secure chat messages between two users in a way so that the server cannot
decrypt the messages
7. When the Local Storage is cleared, or when there is no shared secret for a given recipient, the
sender should initiate the ECDH key exchange using a special message and the recipient should
engage in the key exchange even when there had been a shared secret previously established
8. Chat messages should be encoded using UTF-8, and network messages between users should be
formatted in JSON using your own schema (e.g., {“type”:”ECDH”, “key”:”…”}, {“type”:”msg”,
“ciphertext”:”…”, “IV”:”…”, “MAC”:”…”})
9. Use console.log() to log all crypto operations (including key, IV, plaintext, etc.)
• It should be visually obvious that IVs are not reused, keys change when needed (see next
requirements), etc.
10. The chat app should be protected against cross-site request forgery (CSRF), cross-site scripting
(XSS), and SQL injection attacks
Requirements (TLS)
3. Communications should be encrypted in transit using TLS with the following configuration:
• Reuse Mozilla’s “modern” configuration for nginx, and change it as needed:
• https://ssl-config.mozilla.org/
1. TLS version 1.3 only
2. x25519 Elliptic Curve Group only
3. TLS_CHACHA20_POLY1305_SHA256 cipher suite only
4. No OCSP stappling (since you will use a self-signed CA certificate)
5. HSTS for one week
6. TLS certificate requirements:
1. X.509 version 3
2. ECDSA public key over P-384
3. SHA384 as hashing algorithm for signature
4. CA flag (critical): false
5. Key Usage (critical) = Digital Signature
6. Extended Key Usage = Server Authentication
7. Include both Subject Key Identifier and Authority Key Identifier
8. Validity period = ** days
Requirements (TLS)
3. Communications should be encrypted in transit using TLS with the following configuration:
7. The website should be hosted at
https://group-[your-group-number].comp3334.xavier2dc.fr:8443/
• Group #10 will be at group-10.comp3334.xavier2dc.fr
8. All subdomains *.comp3334.xavier2dc.fr will redirect to 127.0.0.1
• You can effectively use “group-X.comp3334.xavier2dc.fr” instead of “localhost”
• If you do not host the docker container on localhost,
add a manual entry in your hosts file
• Linux: /etc/hosts
• Windows: C:\Windows\System**\drivers\etc\hosts
9. Issue the certificate from the given CA certificate and private key
• Use the domain name corresponding to your group
• Domain should appear as both Common Name and Subject Alternative Name
10. The CA certificate is domain-constrained to subdomains of comp3334.xavier2dc.fr, meaning
you can safely trust it on your computer (nobody can generate valid certificates for other
domains)

Simple Chat Demo
1. Deploy the docker container using the following line within the folder that contains the dockercompose.yaml file:
$ sudo docker-compose up -d
2. So far, the chat app works over plain HTTP on port 8080, access it at:
http://group-0.comp3334.xavier2dc.fr:8080
3. Open a new private window of your browser and access the website again
1. Chrome:
2. Firefox:
4. Login as Alice (password: password123) on the first window
5. Login as Bob (password: password456) on the second (private) window
6. Select Bob as contact from Alice’s chat, select Alice as contact from Bob’s chat
7. Send messages each other!
8. When modifying the server-side (app.py) or client-side (login.html, chat.html), simply restart the
docker container, you do not need to rebuild the container:
$ sudo docker restart [you-container-name]-webapp-1
Areas of assessments
1. Explanations of your solution and design [50%]
• Provide list of features/requirements implemented
• Describe how your solution works, especially explain how user passwords are
stored, verified, which libraries do you use, how key materials are derived, how
do you store them, their size, how do you generate the domain certificate, etc.
• Show autonomy and creativity when requirements allow
2. Implementation of your solution & demo [50%]
• Follow proper coding style, write informative comments, give concise and
relevant variable names, respect indentation, stay consistent in style
• Make things work!
Submission
• Submit a ZIP’d file containing:
1. Modified chat app docker-compose stack
• “sudo docker-compose up -d” should work!
• Accessing https://group-X.comp3334.xavier2dc.fr:8443/ should work with
a valid certificate issued by the given CA
• Group number is the one you registered on Blackboard
2. PDF report
3. 8-minute video with a demonstration of your solution
• User registration + new chat with existing user + refresh website & reload chat
4. Statement of individual contributions
• Who did what, how much % of the work does that represent?
• Format will be given to you later
• Deadline for submission is Sunday, April 14 @ 23:59 (hard deadline)
Questions?
Technical questions:
• CUI Bowen bowen.cui@connect.polyu.hk
Administrative questions:
• LYU Xinqi xinqi.lyu@connect.polyu.hk
FAQ
1. Can I use a library?
• Depends, does it replace the whole chat protocol with a better and secure chat?
Then, no. You still need to implement a secure chat protocol.
• Does the library implement part of the requirements (e.g., proper session
management, OTP, hashing algorithm, etc.)? Then, yes.
2. How can I rebuild the docker container if I need to modify, say, the nginx config?
1. docker-compose down -v
2. docker-compose build --no-cache
3. docker-compose up -d
3. How can I debug errors?
• docker logs [your-container]
FAQ
4. How does the web chat application work?
1. It is written in Python using Flask
2. It is running behind the WSGI server Gunicorn
3. Which is running behind the reverse proxy nginx (which should provide TLS)
4. The front-end is written in HTML and Javascript
5. The server app writes messages into a MySQL database
請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp













 

掃一掃在手機打開當前頁
  • 上一篇:Ac.F633代做、Python程序語言代寫
  • 下一篇:菲律賓簽證13c(申請13C簽證的條件)
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                午夜精品福利在线| 国产一区二区按摩在线观看| 精品婷婷伊人一区三区三| 国产麻豆91精品| 久久国产麻豆精品| 午夜电影网一区| 亚洲成人在线免费| 亚洲成人av一区二区三区| 亚洲自拍与偷拍| 亚洲大型综合色站| 天堂va蜜桃一区二区三区 | 日韩女优电影在线观看| 在线播放中文一区| 精品噜噜噜噜久久久久久久久试看| 日韩免费观看高清完整版在线观看| 精品av综合导航| 国产精品乱码妇女bbbb| 亚洲欧美日韩一区| 亚洲电影一区二区三区| 久久国产精品一区二区| 成人黄色网址在线观看| 欧美性xxxxxx少妇| 日韩精品在线一区| 国产精品久久免费看| 亚洲黄色免费电影| 日韩1区2区日韩1区2区| 国产中文字幕一区| 91社区在线播放| 日韩视频中午一区| 欧美高清一级片在线观看| 亚洲摸摸操操av| 天堂成人免费av电影一区| 国产综合色视频| 国产自产视频一区二区三区 | 亚洲综合在线第一页| 亚洲一卡二卡三卡四卡| 免费观看日韩av| 99精品桃花视频在线观看| 欧美日韩国产影片| 中文字幕精品综合| 偷拍一区二区三区四区| 国产精品夜夜爽| 欧美日韩国产a| 国产精品系列在线| 免费精品视频在线| 91色婷婷久久久久合中文| 日韩免费电影一区| 亚洲另类春色校园小说| 另类小说综合欧美亚洲| 在线一区二区三区四区五区| 久久女同性恋中文字幕| 日韩综合小视频| 成人av网站在线观看免费| 欧美一区二区日韩一区二区| 中文字幕中文在线不卡住| 午夜影院久久久| 91在线视频网址| 欧美大片一区二区三区| 国产欧美日韩精品在线| 成人国产在线观看| 欧美国产精品v| 亚洲激情六月丁香| 高清视频一区二区| 色婷婷av一区二区三区软件| 美女视频一区在线观看| 国产精品久久久久永久免费观看| 最新中文字幕一区二区三区| 亚洲精品视频免费观看| 欧美一区二区成人| 免费人成在线不卡| 欧美一区二区人人喊爽| 国产精品区一区二区三区| 亚洲国产日日夜夜| 麻豆精品在线观看| 日韩欧美专区在线| 最新久久zyz资源站| 日韩不卡一区二区三区| 成人免费毛片高清视频| 日韩三区在线观看| 午夜精品福利一区二区三区av | 国产精品久久久久精k8 | 日韩毛片高清在线播放| 成人综合婷婷国产精品久久| 亚洲人成伊人成综合网小说| 日韩一区二区在线免费观看| 欧洲人成人精品| 精品国产一区二区三区忘忧草 | 三级不卡在线观看| 精品污污网站免费看| 亚洲综合色区另类av| 欧美日韩中文字幕一区| 亚洲成人高清在线| 日韩一区二区三区在线| 久久国产精品色| 日本一区二区三区在线观看| 91麻豆免费看| 五月激情六月综合| 精品理论电影在线| 风间由美一区二区av101 | 亚洲成人久久影院| 欧美一区二区三区公司| 国产综合久久久久影院| 国产精品久久久久久久久晋中| 99这里都是精品| 天天综合天天综合色| 久久九九99视频| 91免费观看在线| 免费高清在线一区| 欧美精品在线视频| 欧美精品少妇一区二区三区| 亚洲欧美综合在线精品| 色婷婷综合五月| 蜜臀久久99精品久久久久宅男 | 午夜精品福利久久久| 91精品国产综合久久婷婷香蕉| 国产一区二区美女诱惑| 亚洲狼人国产精品| 久久色视频免费观看| 99re亚洲国产精品| 麻豆91精品91久久久的内涵| 国产精品视频一二三区| 欧美日韩亚洲综合一区二区三区| 久久爱另类一区二区小说| 亚洲视频一区二区免费在线观看| 一本色道久久综合亚洲aⅴ蜜桃| 日韩和欧美一区二区| 欧美精品一区二区三区高清aⅴ| 91浏览器在线视频| 久久99国内精品| 亚洲国产精品一区二区www在线 | 在线视频一区二区三| 久久99精品一区二区三区三区| 一区二区三区四区乱视频| 欧美成人国产一区二区| 色婷婷激情久久| 国产成人亚洲精品狼色在线 | 岛国av在线一区| 婷婷国产在线综合| 一卡二卡欧美日韩| 国产精品久久久久影院亚瑟| 日韩一区二区不卡| 欧美自拍丝袜亚洲| 99在线精品视频| 国产精品综合二区| 日韩成人一区二区| 亚洲国产一区在线观看| 亚洲精品日韩专区silk| 国产精品久久久久aaaa| 久久综合中文字幕| 日韩你懂的电影在线观看| 欧美日韩国产综合久久| 91原创在线视频| 成人精品视频.| 国产精品一区一区三区| 久久99精品久久只有精品| 免费欧美日韩国产三级电影| 亚洲mv大片欧洲mv大片精品| 亚洲主播在线播放| 中文字幕一区二区三区蜜月| 中文字幕不卡在线观看| 久久夜色精品国产欧美乱极品| 欧美日韩亚洲国产综合| 欧美日韩在线一区二区| 欧美体内she精视频| 欧美视频一区二区三区四区| 欧美在线一区二区三区| 欧美巨大另类极品videosbest| 91精品国产综合久久精品 | 国产成人av福利| 国产一区二区福利| 国产一区二区女| 国产99久久久国产精品潘金 | 欧美无乱码久久久免费午夜一区 | 亚洲色图.com| 亚洲一区视频在线| 日韩**一区毛片| 韩国三级在线一区| 国产91在线看| 色综合久久久久网| 欧美偷拍一区二区| 国产精品资源在线观看| 亚洲国产精品久久一线不卡| www.亚洲色图.com| 婷婷久久综合九色国产成人| 麻豆免费精品视频| 成人网页在线观看| 色老汉一区二区三区| 欧美高清视频不卡网| 精品剧情在线观看| 国产日本欧洲亚洲| 亚洲美女视频一区| 日韩和的一区二区| 国内成人免费视频| 91麻豆精品秘密| 欧美一区二区三区公司| 国产日韩精品一区二区三区在线| 亚洲欧美日本韩国| 蜜芽一区二区三区| 9人人澡人人爽人人精品| 欧美一区二区三区不卡|