国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

COMP3334代做、SQL設(shè)計編程代寫

時間:2024-04-09  來源:合肥網(wǎng)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













 

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

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強度疲勞振動
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務(wù)平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 豆包網(wǎng)頁版入口 破天一劍 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产成人免费电影| 国产精品99久久久久久人| 成人免费视频97| 国产精品丝袜白浆摸在线| 日本一区二区三区免费观看| 成人精品久久一区二区三区 | 欧美在线观看日本一区| www黄色av| 精品国产一区二区三| 免费av网址在线| 国产精品网站视频| 青青在线视频一区二区三区| 国产精成人品localhost| 中文字幕在线乱| 国内一区二区三区在线视频| 国产精品手机播放| 黑人中文字幕一区二区三区| 国产成人精品午夜| 热草久综合在线| 深夜福利一区二区| 欧美亚洲在线视频| 久久视频在线看| 今天免费高清在线观看国语| 国产精品无av码在线观看| 极品美女扒开粉嫩小泬| 国产精品视频福利| 精品一区久久久久久| 国产精品久久久久久久久久直播| 黄色免费视频大全| 日韩视频永久免费观看| 欧洲午夜精品久久久| 日韩中文字幕精品| 黄色大片中文字幕| 欧美精品在线免费播放| 成人久久精品视频| 无码人妻精品一区二区三区99v| 久在线观看视频| 日本不卡在线观看视频| 久久精品国产v日韩v亚洲| 黄网站欧美内射| 欧美日本亚洲视频| 91精品国产九九九久久久亚洲| 欧美一区二区三区精美影视 | 国产盗摄视频在线观看| 日韩精品伦理第一区| 国产精品入口日韩视频大尺度 | 久久本道综合色狠狠五月| 欧美一级二级三级| 精品免费日产一区一区三区免费 | 久久久婷婷一区二区三区不卡| 三区精品视频| 国产成人a亚洲精品| 欧美性猛交久久久乱大交小说| 国产精品久久久久久久久久久久久久| 国产欧美日韩高清| 色综合666| 国产精品污www一区二区三区| 国产女人水真多18毛片18精品| 川上优av一区二区线观看| 日韩在线观看免费av| 国产日韩欧美黄色| 天天成人综合网| 国产精品视频久| av一本久道久久波多野结衣| 人妻有码中文字幕| 欧美大片欧美激情性色a∨久久| www.九色.com| 欧美在线精品免播放器视频| 久久国产精品久久久久久| 国产激情一区二区三区在线观看| 欧美高清性xxxxhd| 五月天亚洲综合情| 精品久久久久久一区| 国产成人永久免费视频| 国产麻豆一区二区三区在线观看| 日韩免费在线播放| 亚洲在线第一页| 国产精品国产对白熟妇| 国产av熟女一区二区三区| 国产在线观看一区二区三区| 日韩精品一区二区三区久久| 国产aaa免费视频| 国产精品爽爽ⅴa在线观看| 国产精品10p综合二区| 国产欧美日韩精品在线观看| 欧美日韩电影一区二区三区| 亚洲二区三区四区| 日韩视频免费在线| 成人国产精品久久久| 欧美久久综合性欧美| www.日韩欧美| 99精品国产高清一区二区| 欧美中文字幕在线视频| 在线精品日韩| 国产精品高潮呻吟视频| 91久久国产精品91久久性色| 日本精品久久久久中文字幕| 九色成人免费视频| 日韩在线免费av| 99热一区二区三区| 欧美精品一区二区三区久久 | 久久国产欧美精品| 国产一级做a爰片久久毛片男| 午夜精品美女自拍福到在线| 国产精品久久久久久久久久免费| 91精品国产乱码久久久久久久久| 日韩视频在线视频| 天天久久人人| 欧美激情综合亚洲一二区| 久久久久久久久综合| 粉嫩av一区二区三区免费观看| 欧美亚洲伦理www| 亚洲在线观看一区| 操人视频在线观看欧美| 91精品国产自产在线老师啪| 国产区精品视频| 精品免费视频123区| 涩涩日韩在线| 亚洲精品国产精品国自产观看| 欧美成人免费va影院高清| 国产精品视频专区| 国产精品69精品一区二区三区| 精品一区二区视频| 一本色道久久99精品综合| 欧美激情视频网址| 国产精品国产自产拍高清av水多| 国产v亚洲v天堂无码久久久| av动漫在线免费观看| 国产呦系列欧美呦日韩呦| 欧美最猛性xxxx| 日韩wuma| 亚洲巨乳在线观看| 亚州成人av在线| 在线一区日本视频| 欧美激情18p| 色综合久久久久久中文网| 日韩中文第一页| 久久婷婷国产精品| 91精品久久久久久久久久久| 99久re热视频这里只有精品6| 国产视频一区二区视频| 免费人成在线观看视频播放| 加勒比海盗1在线观看免费国语版| 欧美日韩国产一二| 欧美激情亚洲天堂| 欧美日韩激情四射| 欧美国产二区| 国内精品视频在线播放| 欧美亚洲色图视频| 欧美 日本 亚洲| 国内精品中文字幕| 欧美一二三区| 激情五月宗合网| 国模视频一区二区| 国产女主播一区二区| 99超碰麻豆| 久久青草福利网站| 久久精品五月婷婷| 精品国产一区二区在线| 久久精品国产综合精品| 色婷婷综合久久久久中文字幕1| 色偷偷888欧美精品久久久| 国产精品久久久久影院日本| 欧美成人免费va影院高清| 欧美激情第三页| 无码免费一区二区三区免费播放| 真实国产乱子伦对白视频| 亚洲va久久久噜噜噜| 久久久久成人网| 日韩欧美在线一区二区| 欧美亚州一区二区三区| 麻豆一区区三区四区产品精品蜜桃| 精品视频在线观看一区| 国产精品一码二码三码在线| 91成人福利在线| 国产不卡一区二区在线播放| 久久精品国产电影| 欧美精品在线免费播放| 无码日韩人妻精品久久蜜桃| 欧美有码在线观看| 欧美亚洲视频一区| 国产美女作爱全过程免费视频| 国产成人精品免费视频| 国产精品极品尤物在线观看| 欧美日韩成人在线观看| 亚洲福利av在线| 日韩欧美亚洲天堂| 国精产品一区一区三区有限在线| 精品欧美日韩在线| 99久久国产综合精品五月天喷水| 久久精品美女| 精品国产一区二区三区在线| 亚洲v日韩v欧美v综合| 欧美亚州一区二区三区| 国产美女精品久久久| 99在线视频播放| 九九热久久66| 欧美成人精品在线播放| 日本精品久久久久中文字幕| 国产美女三级视频|