feat: add Cryptography & Network Security (CNS) subject#264
Open
Kartikeyji17 wants to merge 1 commit into
Open
feat: add Cryptography & Network Security (CNS) subject#264Kartikeyji17 wants to merge 1 commit into
Kartikeyji17 wants to merge 1 commit into
Conversation
Contributor
|
@Kartikeyji17 is attempting to deploy a commit to the PushkarScripts Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new Semester 5 “Cryptography & Network Security (CNS)” subject with course pages/chapters and a corresponding quiz entry.
Changes:
- Added CNS quiz data to the centralized quiz dataset.
- Introduced CNS course route (
/sem5/cns) with layout, sidebar navigation, chapter routing, and chapter content pages. - Registered CNS in the subjects list/codes so it shows up in the UI.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/quizData.ts | Adds a new “Cryptography & Network Security” quiz with 20 questions. |
| app/sem5/cns/layout.tsx | New CNS layout wiring Navbar + Sidebar + main content shell. |
| app/sem5/cns/[chapter]/page.tsx | New chapter router page that renders chapter content and prev/next navigation. |
| app/sem5/cns/components/sidebar.tsx | New sidebar navigation for CNS chapters + quiz link. |
| app/sem5/cns/constants.ts | Defines CNS chapter list used by sidebar and routing logic. |
| app/sem5/cns/content/chapter0.tsx | Adds CNS chapter 0 content. |
| app/sem5/cns/content/chapter1.tsx | Adds CNS chapter 1 content. |
| app/sem5/cns/content/chapter2.tsx | Adds CNS chapter 2 content. |
| app/sem5/cns/content/chapter3.tsx | Adds CNS chapter 3 content. |
| app/sem5/cns/content/chapter4.tsx | Adds CNS chapter 4 content. |
| app/sem5/cns/content/chapter5.tsx | Adds CNS chapter 5 content. |
| app/sem5/cns/content/chapter6.tsx | Adds CNS chapter 6 content. |
| app/components/subjects.tsx | Registers CNS as an available subject with code cns. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+46
to
+53
| type ChapterProps = { | ||
| params: Promise<{ chapter: string }>; | ||
| }; | ||
|
|
||
| export async function generateMetadata({ | ||
| params, | ||
| }: ChapterProps): Promise<Metadata> { | ||
| const { chapter: chapterId } = await params; |
Comment on lines
+16
to
+22
| const [open, setOpen] = useState(false); | ||
|
|
||
| useEffect(() => { | ||
| if (typeof window !== "undefined" && window.innerWidth >= 768) { | ||
| setOpen(true); | ||
| } | ||
| }, []); |
Comment on lines
+24
to
+30
| const quizSlugMap: Record<string, string> = { | ||
| cns: "cns", | ||
| }; | ||
|
|
||
| const subjectKey = pathname.split("/")[2] ?? ""; | ||
| const quizSlug = quizSlugMap[subjectKey]; | ||
| const quizHref = quizSlug ? `/quiz/${quizSlug}` : "/quiz"; |
|
|
||
| export const metadata = { | ||
| title: "Cryptography & Network Security | openCSE", | ||
| description: "Free and Open Documentations for Cryptography & Network Security", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Fixes #132
Description
Added complete documentation for Cryptography & Network Security (CNS) as a new Semester 5 subject.
Type of Change
Screenshots / Demo
How Has This Been Tested?
Tested locally with
npm run dev. Verified all 7 chapters load correctly, sidebar navigation works, quiz accessible at/quiz/cns.Checklist
AI Usage
I have not used AI tools for this contribution
I have used AI tools (ChatGPT, Copilot, Claude, etc.) and I have reviewed, verified, and understood all generated code/content before submitting this PR
If AI tools were used, briefly explain how:
Documentation drafting, code structure matching existing subject pattern, quiz question generation. All content reviewed and significantly expanded by me before submission.
Additional Notes
CNS is a core Sem 5 subject missing from openCSE. Content covers all 5 units of the standard university syllabus — symmetric encryption (DES, AES), asymmetric encryption (RSA, DH, ECC), hash functions and digital signatures (SHA family, HMAC, PKI), network protocols (TLS 1.2/1.3, HTTPS, IPSec, Kerberos), and network defense (firewalls, IDS/IPS, common attacks). Each chapter includes detailed explanations with real-world examples, worked numerical examples (RSA key generation, DH exchange), and a key points summary. A 22-question quiz is included covering all units.