Skip to content

feat: add Cryptography & Network Security (CNS) subject#264

Open
Kartikeyji17 wants to merge 1 commit into
pushkarscripts:mainfrom
Kartikeyji17:feat/cryptography-network-security
Open

feat: add Cryptography & Network Security (CNS) subject#264
Kartikeyji17 wants to merge 1 commit into
pushkarscripts:mainfrom
Kartikeyji17:feat/cryptography-network-security

Conversation

@Kartikeyji17
Copy link
Copy Markdown
Contributor

Related Issue

Fixes #132


Description

Added complete documentation for Cryptography & Network Security (CNS) as a new Semester 5 subject.


Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • UI/UX improvement
  • Refactor

Screenshots / Demo

image image image image

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

  • My code follows the project structure and conventions
  • I have tested the changes locally
  • I have linked the related issue properly
  • I have added screenshots where applicable
  • No existing functionality was broken

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.

Copilot AI review requested due to automatic review settings June 7, 2026 02:05
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 7, 2026

@Kartikeyji17 is attempting to deploy a commit to the PushkarScripts Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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";
Comment thread app/sem5/cns/layout.tsx

export const metadata = {
title: "Cryptography & Network Security | openCSE",
description: "Free and Open Documentations for Cryptography & Network Security",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[COURSE REQUEST] Cryptography & Network Security

2 participants