Laptop19

Untitled

Dec 3rd, 2025
48
0
Never
9
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.16 KB | None | 0 0
  1. 1. Write a program to perform encryption and decryption using Caesar cipher (substitutional cipher).
  2.  
  3. def encrypt(text, key):
  4. result = ""
  5. for char in text:
  6. if char.isalpha():
  7. base = ord('A') if char.isupper() else ord('a')
  8. result += chr((ord(char) - base + key) % 26 + base)
  9. else:
  10. result += char
  11. return result
  12.  
  13.  
  14. def decrypt(text, key):
  15. result = ""
  16. for char in text:
  17. if char.isalpha():
  18. base = ord('A') if char.isupper() else ord('a')
  19. result += chr((ord(char) - base - key) % 26 + base)
  20. else:
  21. result += char
  22. return result
  23.  
  24.  
  25. # -------------------------------
  26. # Main Program
  27. # -------------------------------
  28. text = input("Enter text: ")
  29. key = int(input("Enter key (shift value): "))
  30.  
  31. encrypted = encrypt(text, key)
  32. print("Encrypted text:", encrypted)
  33.  
  34. decrypted = decrypt(encrypted, key)
  35. print("Decrypted text:", decrypted)
  36.  
  37. -------
  38. 2. Write a program to perform encryption and decryption using Rail Fence Cipher. (transpositional cipher)
  39.  
  40. # Rail Fence Cipher Encryption
  41. def encrypt_rail_fence(text, key):
  42. rail = [['\n' for _ in range(len(text))]
  43. for _ in range(key)]
  44.  
  45. # To determine the direction
  46. dir_down = False
  47. row, col = 0, 0
  48.  
  49. for i in range(len(text)):
  50. # change direction when you reach top or bottom
  51. if row == 0 or row == key - 1:
  52. dir_down = not dir_down
  53.  
  54. rail[row][col] = text[i]
  55. col += 1
  56.  
  57. # move up or down
  58. row += 1 if dir_down else -1
  59.  
  60. # build the result
  61. result = []
  62. for i in range(key):
  63. for j in range(len(text)):
  64. if rail[i][j] != '\n':
  65. result.append(rail[i][j])
  66.  
  67. return "".join(result)
  68.  
  69.  
  70. # Rail Fence Cipher Decryption
  71. def decrypt_rail_fence(cipher, key):
  72. rail = [['\n' for _ in range(len(cipher))]
  73. for _ in range(key)]
  74.  
  75. # Mark the positions with '*'
  76. dir_down = None
  77. row, col = 0, 0
  78.  
  79. for i in range(len(cipher)):
  80. if row == 0:
  81. dir_down = True
  82. if row == key - 1:
  83. dir_down = False
  84.  
  85. rail[row][col] = '*'
  86. col += 1
  87. row += 1 if dir_down else -1
  88.  
  89. # Fill the marked positions with cipher characters
  90. index = 0
  91. for i in range(key):
  92. for j in range(len(cipher)):
  93. if rail[i][j] == '*' and index < len(cipher):
  94. rail[i][j] = cipher[index]
  95. index += 1
  96.  
  97. # Read the text by zig-zag manner
  98. result = []
  99. row, col = 0, 0
  100.  
  101. for i in range(len(cipher)):
  102. if row == 0:
  103. dir_down = True
  104. if row == key - 1:
  105. dir_down = False
  106.  
  107. result.append(rail[row][col])
  108. col += 1
  109. row += 1 if dir_down else -1
  110.  
  111. return "".join(result)
  112.  
  113.  
  114. # -------------------------------------
  115. # Main Program
  116. # -------------------------------------
  117. text = input("Enter text: ")
  118. key = int(input("Enter key (number of rails): "))
  119.  
  120. encrypted = encrypt_rail_fence(text, key)
  121. print("Encrypted Text:", encrypted)
  122.  
  123. decrypted = decrypt_rail_fence(encrypted, key)
  124. print("Decrypted Text:", decrypted)
  125.  
  126. -------
  127. 3. Vigenère Cipher
  128.  
  129. # Function to generate the key
  130. def generate_key(text, key):
  131. key = list(key)
  132. if len(key) < len(text):
  133. for i in range(len(text) - len(key)):
  134. key.append(key[i % len(key)])
  135. return "".join(key)
  136.  
  137. # Encrypt the plaintext
  138. def encrypt(text, key):
  139. cipher_text = []
  140. for i in range(len(text)):
  141. if text[i].isalpha():
  142. shift = ord(key[i].upper()) - ord('A')
  143. base = ord('A') if text[i].isupper() else ord('a')
  144. cipher_text.append(chr((ord(text[i]) - base + shift) % 26 + base))
  145. else:
  146. cipher_text.append(text[i])
  147. return "".join(cipher_text)
  148.  
  149. # Decrypt the ciphertext
  150. def decrypt(cipher, key):
  151. orig_text = []
  152. for i in range(len(cipher)):
  153. if cipher[i].isalpha():
  154. shift = ord(key[i].upper()) - ord('A')
  155. base = ord('A') if cipher[i].isupper() else ord('a')
  156. orig_text.append(chr((ord(cipher[i]) - base - shift) % 26 + base))
  157. else:
  158. orig_text.append(cipher[i])
  159. return "".join(orig_text)
  160.  
  161. # -----------------------------------
  162. # Main program
  163. # -----------------------------------
  164. text = input("Enter text: ")
  165. keyword = input("Enter key: ")
  166.  
  167. key = generate_key(text, keyword)
  168.  
  169. encrypted = encrypt(text, key)
  170. print("Encrypted Text:", encrypted)
  171.  
  172. decrypted = decrypt(encrypted, key)
  173. print("Decrypted Text:", decrypted)
  174.  
  175. -------
  176. 4. Write a Python program that defines a function and takes a password string as input and returns its SHA-256 hashed representation as a hexadecimal string.
  177.  
  178. import hashlib
  179.  
  180. def sha256_hash(password):
  181. # Encode string to bytes, then hash using SHA-256
  182. hash_object = hashlib.sha256(password.encode())
  183. # Return hexadecimal representation
  184. return hash_object.hexdigest()
  185.  
  186. # Main program
  187. password = input("Enter password: ")
  188. hashed_password = sha256_hash(password)
  189.  
  190. print("SHA-256 Hash:", hashed_password)
  191.  
  192. -------
  193. 5. Write a Python program that reads a file containing a list of usernames and passwords, one pair per line (separated by a comma). It checks each password to see if it has been leaked in a data breach. You can use the "Have I Been Pwned" API (https://haveibeenpwned.com/API/v3) to check if a password has been leaked.
  194.  
  195. On terminal - pip3 install requests, navigate to same folder by cd and ls
  196.  
  197. Contents for file "credentials.txt"
  198. alice,Password123
  199. bob,123456
  200. sahana,myStrongPass!
  201.  
  202. import hashlib
  203. import requests
  204.  
  205. HIBP_API_RANGE_URL = "https://api.pwnedpasswords.com/range/"
  206.  
  207.  
  208. def check_password_pwned(password):
  209. """
  210. Returns the number of times the password appeared in breaches.
  211. If 0 is returned, password is (so far) not found in HIBP database.
  212. Uses k-anonymity: only first 5 chars of SHA-1 hash are sent.
  213. """
  214. # 1. SHA-1 hash of password (uppercase hex)
  215. sha1_hash = hashlib.sha1(password.encode('utf-8')).hexdigest().upper()
  216. prefix = sha1_hash[:5] # first 5 chars
  217. suffix = sha1_hash[5:] # remaining 35 chars
  218.  
  219. # 2. Query HIBP range API with prefix
  220. url = HIBP_API_RANGE_URL + prefix
  221. response = requests.get(url)
  222.  
  223. if response.status_code != 200:
  224. print(f"Error: HIBP API request failed with status {response.status_code}")
  225. return -1 # indicate error
  226.  
  227. # 3. API returns many suffixes with counts: HASH_SUFFIX:COUNT
  228. hashes = response.text.splitlines()
  229.  
  230. for line in hashes:
  231. hash_suffix, count = line.split(':')
  232. if hash_suffix == suffix:
  233. return int(count) # password found this many times
  234.  
  235. return 0 # not found
  236.  
  237.  
  238. def process_credentials_file(filename):
  239. try:
  240. with open(filename, 'r') as f:
  241. for line in f:
  242. line = line.strip()
  243. if not line:
  244. continue # skip empty lines
  245.  
  246. # Expect: username,password
  247. try:
  248. username, password = line.split(',', 1)
  249. except ValueError:
  250. print(f"Skipping malformed line: {line}")
  251. continue
  252.  
  253. count = check_password_pwned(password)
  254.  
  255. if count == -1:
  256. print(f"[ERROR] Could not check password for user: {username}")
  257. elif count == 0:
  258. print(f"[SAFE ] {username} — password not found in breaches.")
  259. else:
  260. print(f"[PWNED] {username} — password found {count} times in breaches!")
  261. except FileNotFoundError:
  262. print(f"File '{filename}' not found.")
  263.  
  264.  
  265. # ---------------------------
  266. # Main program
  267. # ---------------------------
  268. if __name__ == "__main__":
  269. filename = input("Enter credentials filename: ") # e.g., credentials.txt
  270. process_credentials_file(filename)
  271.  
  272. -------
  273. 6. Write a Python program that generates a password using a random combination of words from a dictionary file.
  274.  
  275. content for "words.txt"
  276. apple
  277. cloud
  278. river
  279. mountain
  280. python
  281. secure
  282. silver
  283. stone
  284.  
  285. import random
  286.  
  287. def generate_password(dictionary_file, num_words=3):
  288. try:
  289. # Read words from file
  290. with open(dictionary_file, "r") as file:
  291. words = [word.strip() for word in file.readlines() if word.strip()]
  292.  
  293. if len(words) < num_words:
  294. print("Not enough words in dictionary to generate password.")
  295. return None
  296.  
  297. # Randomly choose words
  298. selected_words = random.sample(words, num_words)
  299.  
  300. # Create password (you can add symbols/numbers if needed)
  301. password = "".join(selected_words)
  302.  
  303. return password
  304.  
  305. except FileNotFoundError:
  306. print(f"Dictionary file '{dictionary_file}' not found.")
  307. return None
  308.  
  309.  
  310. # ---------------------------
  311. # Main Program
  312. # ---------------------------
  313. dictionary_file = input("Enter dictionary filename: ") # e.g., words.txt
  314.  
  315. password = generate_password(dictionary_file)
  316.  
  317. if password:
  318. print("Generated Password:", password)
  319.  
  320. --------
  321. 7. Brute Force attack on password
  322.  
  323. import itertools
  324. import string
  325.  
  326. def brute_force_attack(password):
  327. characters = string.ascii_lowercase # a–z
  328. attempts = 0
  329.  
  330. print("Starting brute-force simulation...\n")
  331.  
  332. # Try increasing lengths until found
  333. for length in range(1, 6): # limit to length 5 for safety
  334. for combo in itertools.product(characters, repeat=length):
  335. guess = "".join(combo)
  336. attempts += 1
  337.  
  338. if guess == password:
  339. print(f"Password found: {guess}")
  340. print(f"Total attempts: {attempts}")
  341. return True
  342.  
  343. print("Password not found within the attempt limit.")
  344. return False
  345.  
  346.  
  347. # -------------------------
  348. # Main Program
  349. # -------------------------
  350. target_password = input("Enter the password to brute-force (lowercase only): ")
  351. brute_force_attack(target_password)
  352.  
  353. ---------
  354. 8. Digitally sign document
  355.  
  356. Download Adobe Acrobat Reader DC
  357. ➤ Create digital ID
  358. ↪ name, email, name of org, serial no. & expiration Date
  359. ↳ Edit → Preferences → Signature → Identities & trusted certificates →
  360. A new digital ID → Next →
  361. fill details → Next → Create Password
  362. ➤ Customize appearence of DS
  363. → Open any PDF Sample
  364. → click sign, Add signature
  365. → Place signature in blank space & take ss
  366. → convert image png/pdf sign.pdf
  367. → Edit → Preferences → Creation & Appearence
  368. → Create new appearence → Give title
  369. ➤ Imported graphic → Import pdf file
  370. → Configure text → OK → × → ×
  371. Now add PDF file on which u want to place
  372. → Tools
  373. → Certificate
  374. → Digitally signed → Draw in area using mouse
  375. → Select → Then appearence → lock the pdf → password
  376.  
  377.  
  378.  
  379. Below is your **ULTIMATE CASE-STUDY CHEAT SHEET** for the **Digital Personal Data Protection Act, 2023**, fully based on your uploaded PDF.
  380. This is structured so that **the moment you read a case, you can immediately tell: “This belongs to Section __”** and also quote the *exact relevant line* from the Act.
  381.  
  382. All statements below are sourced directly from the uploaded **DPDP Act, 2023** PDF.
  383.  
  384.  
  385. ---
  386.  
  387. # ✅ **CHEAT SHEET — Identify Case Study → Section in 5 Seconds**
  388.  
  389. Each section has:
  390.  
  391. ### • **What the section covers**
  392.  
  393. ### • **Keywords you must detect in case studies**
  394.  
  395. ### • **When to apply it**
  396.  
  397. ### • **Exact line from Act to quote** (paraphrased but accurate)
  398.  
  399. ---
  400.  
  401. # 🔵 **CHAPTER I — PRELIMINARY**
  402.  
  403. ## **SECTION 2 — DEFINITIONS**
  404.  
  405. ### **Use when case involves:**
  406.  
  407. * Is this *personal data*?
  408. * Who is *Data Fiduciary / Data Principal*?
  409. * What counts as *processing*?
  410.  
  411. ### **Keywords:**
  412.  
  413. “Identifiable information”, “processing”, “digital data”, “data fiduciary”, “data processor”.
  414.  
  415. ### **Relevant line to quote:**
  416.  
  417. * *Personal data means any data about an individual who is identifiable.* (Sec 2(t))
  418. * *Processing includes collection, storage, sharing, erasure, etc.* (Sec 2(x))
  419.  
  420.  
  421. ---
  422.  
  423. ## **SECTION 3 — APPLICATION OF THE ACT**
  424.  
  425. ### **Use when case describes exemption from Act.**
  426.  
  427. ### **Keywords:**
  428.  
  429. * “Publicly available data”
  430. * “Domestic/personal use”
  431. * “Data collected outside India but used for Indian users”
  432.  
  433. ### **Relevant line:**
  434.  
  435. * *Act does not apply to personal or domestic use, or data made publicly available by the data principal.* (Sec 3(c))
  436.  
  437.  
  438. ---
  439.  
  440. # 🔵 **CHAPTER II — OBLIGATIONS OF DATA FIDUCIARY**
  441.  
  442. ---
  443.  
  444. ## **SECTION 4 — GROUNDS FOR PROCESSING PERSONAL DATA**
  445.  
  446. ### **Use when:**
  447.  
  448. Company processes data without lawful basis.
  449.  
  450. ### **Keywords:**
  451.  
  452. “Lawful purpose”, “consent not taken”, “illegitimate processing”.
  453.  
  454. ### **Relevant line:**
  455.  
  456. * *Personal data may be processed only for a lawful purpose with consent or legitimate uses.* (Sec 4(1))
  457.  
  458.  
  459. ---
  460.  
  461. ## **SECTION 5 — NOTICE**
  462.  
  463. ### **Use when:**
  464.  
  465. User was not told why data is collected or how it will be used.
  466.  
  467. ### **Keywords:**
  468.  
  469. “No notice given”, “no privacy policy”, “hidden processing”.
  470.  
  471. ### **Relevant line:**
  472.  
  473. * *Every request for consent must be accompanied by a notice informing purpose and data categories.* (Sec 5(1))
  474.  
  475.  
  476. ---
  477.  
  478. ## **SECTION 6 — CONSENT**
  479.  
  480. ### **Use when:**
  481.  
  482. The case involves invalid or missing consent.
  483.  
  484. ### **Keywords:**
  485.  
  486. “Pre-ticked boxes”, “forced consent”, “app took extra permissions”, “withdrawing consent ignored”.
  487.  
  488. ### **Relevant line:**
  489.  
  490. * *Consent must be free, specific, informed, unambiguous and for necessary data only.* (Sec 6(1))
  491. * *Data principal has right to withdraw consent anytime.* (Sec 6(4))
  492.  
  493.  
  494. ---
  495.  
  496. ## **SECTION 7 — CERTAIN LEGITIMATE USES**
  497.  
  498. ### **Use when:**
  499.  
  500. Data used **without consent** under legally allowed grounds.
  501.  
  502. ### **Keywords:**
  503.  
  504. “Government benefit schemes”, “medical emergency”, “legal obligation”, “employment-related processing”.
  505.  
  506. ### **Relevant line:**
  507.  
  508. * *Data may be processed without consent for subsidies, benefits, medical emergencies, legal obligations, employment purposes, etc.* (Sec 7)
  509.  
  510.  
  511. ---
  512.  
  513. ## **SECTION 8 — GENERAL OBLIGATIONS OF DATA FIDUCIARY**
  514.  
  515. ### Apply this section MOST FREQUENTLY in case studies.
  516.  
  517. ### **Use when:**
  518.  
  519. * Data breach
  520. * Data retention violation
  521. * Security lapse
  522. * Accuracy issues
  523. * Grievance redressal failure
  524. * Sharing data with processors without safeguards
  525.  
  526. ### **Keywords:**
  527.  
  528. “Leak”, “breach”, “company did not secure data”, “kept data after purpose”, “did not erase data”, “did not inform users”.
  529.  
  530. ### **Relevant lines:**
  531.  
  532. * *Fiduciary must ensure completeness, accuracy, consistency of data.* (Sec 8(3))
  533. * *Must take reasonable security safeguards to prevent breaches.* (Sec 8(5))
  534. * *Must intimate Board and affected data principals about breaches.* (Sec 8(6))
  535. * *Must erase data when purpose is complete or consent withdrawn.* (Sec 8(7))
  536.  
  537.  
  538. ---
  539.  
  540. ## **SECTION 9 — PROCESSING OF CHILDREN’S DATA**
  541.  
  542. ### **Use when:**
  543.  
  544. Data of minors <18 is misused or consent from parent not taken.
  545.  
  546. ### **Keywords:**
  547.  
  548. “Child profile”, “tracking children”, “targeted ads to kids”.
  549.  
  550. ### **Relevant line:**
  551.  
  552. * *Must obtain verifiable parental consent; behavioural tracking & targeted ads for children are forbidden.* (Sec 9(1),(3))
  553.  
  554.  
  555. ---
  556.  
  557. ## **SECTION 10 — SIGNIFICANT DATA FIDUCIARY**
  558.  
  559. ### **Use when:**
  560.  
  561. Case involves large-scale platform (bank, social media, fintech, etc.)
  562.  
  563. ### **Keywords:**
  564.  
  565. “High-risk processing”, “Data Protection Officer”, “DPIA”, “data audit”.
  566.  
  567. ### **Relevant line:**
  568.  
  569. * *Significant DF must appoint DPO, conduct DPIA, carry out audits.* (Sec 10(2))
  570.  
  571.  
  572. ---
  573.  
  574. # 🔵 **CHAPTER III — RIGHTS OF DATA PRINCIPAL**
  575.  
  576. ---
  577.  
  578. ## **SECTION 11 — RIGHT TO ACCESS INFORMATION**
  579.  
  580. ### **Use when:**
  581.  
  582. User asks company: “What data do you have about me?”
  583.  
  584. ### **Keywords:**
  585.  
  586. “Access request”, “show me my data”.
  587.  
  588. ### **Relevant line:**
  589.  
  590. * *User can request a summary of personal data & all entities it is shared with.* (Sec 11(1))
  591.  
  592.  
  593. ---
  594.  
  595. ## **SECTION 12 — RIGHT TO CORRECTION, COMPLETION & ERASURE**
  596.  
  597. ### **Use when:**
  598.  
  599. User asks for correction or deletion but company refuses.
  600.  
  601. ### **Keywords:**
  602.  
  603. “Delete my account”, “correct wrong data”, “update address”.
  604.  
  605. ### **Relevant line:**
  606.  
  607. * *Fiduciary must correct inaccurate data and erase personal data when requested unless retention is legally required.* (Sec 12(2),(3))
  608.  
  609.  
  610. ---
  611.  
  612. ## **SECTION 13 — GRIEVANCE REDRESSAL**
  613.  
  614. ### **Use when:**
  615.  
  616. Company does not respond to complaints.
  617.  
  618. ### **Keywords:**
  619.  
  620. “Support didn’t respond”, “no grievance officer”.
  621.  
  622. ### **Relevant line:**
  623.  
  624. * *DF must provide grievance redressal and respond within the prescribed period.* (Sec 13(2))
  625.  
  626.  
  627. ---
  628.  
  629. ## **SECTION 14 — RIGHT TO NOMINATE**
  630.  
  631. ### **Use when:**
  632.  
  633. Case mentions actions after death or incapacity.
  634.  
  635. ---
  636.  
  637. ## **SECTION 15 — DUTIES OF DATA PRINCIPAL**
  638.  
  639. ### **Use when:**
  640.  
  641. User abuses system, impersonates, files fake complaints.
  642.  
  643. ---
  644.  
  645. # 🔵 **CHAPTER IV — SPECIAL PROVISIONS**
  646.  
  647. ---
  648.  
  649. ## **SECTION 16 — RESTRICTION ON CROSS-BORDER TRANSFER**
  650.  
  651. ### **Use when:**
  652.  
  653. Company transfers data to a banned country.
  654.  
  655. ---
  656.  
  657. ## **SECTION 17 — EXEMPTIONS**
  658.  
  659. ### **Use when:**
  660.  
  661. Processing done for police, court, research, etc.
  662.  
  663. ### **Keywords:**
  664.  
  665. “Investigation”, “legal claim”, “court order”, “Sovereignty”, “public order”.
  666.  
  667. ### **Relevant line:**
  668.  
  669. * *Act does not apply when data is processed for investigation, court functions, enforcing legal rights, research without identifying the data principal.* (Sec 17(1),(2))
  670.  
  671.  
  672. ---
  673.  
  674. # 🔵 **CHAPTER V–VII — BOARD, PROCESS, APPEALS**
  675.  
  676. Use these only when case involves:
  677.  
  678. * Complaint
  679. * Board inquiry
  680. * Penalty process
  681. * Appeal to tribunal
  682.  
  683. Not common in exams.
  684.  
  685. ---
  686.  
  687. # 🔵 **CHAPTER VIII — PENALTIES**
  688.  
  689. ## **SECTION 33 + SCHEDULE**
  690.  
  691. ### **Use when:**
  692.  
  693. Case study asks: *What penalty applies?*
  694.  
  695. ### **Relevant penalties:**
  696.  
  697. * Security safeguard breach → up to **₹250 crore**
  698. * Breach of children’s data obligations → **₹200 crore**
  699. * Significant Data Fiduciary obligations → **₹150 crore**
  700. * All other violations → **₹50 crore**
  701.  
  702.  
  703.  
  704. Use this to instantly map case → section:
  705.  
  706. | Case Study Keyword | Section | Reason |
  707. | ----------------------------- | ------------------------ | ------------------------------ |
  708. | Data leak, weak security | **Sec 8(5)** | Security safeguards |
  709. | Company hid breach | **Sec 8(6)** | Breach notification |
  710. | No privacy notice | **Sec 5** | Notice requirement |
  711. | Consent not taken | **Sec 6** | Valid consent |
  712. | Excessive data collected | **Sec 6(1)** (necessity) | Only necessary data allowed |
  713. | Used data for another purpose | **Sec 4 & 6** | Purpose-specific consent |
  714. | Tracking children / ads | **Sec 9** | Child protection |
  715. | Government scheme using data | **Sec 7(b)** | Legitimate use without consent |
  716. | Legal obligation / Court | **Sec 7(d,e)** | Legitimate use |
  717. | Medical emergency | **Sec 7(f,g)** | Legitimate use |
  718. | “Show me my data” | **Sec 11** | Right to access |
  719. | “Correct/delete my data” | **Sec 12** | Right to erasure & correction |
  720. | Complaint not answered | **Sec 13** | Grievance redressal |
  721. | Data kept after purpose | **Sec 8(7)** | Data retention rules |
  722. | Big platform with DPO | **Sec 10** | Significant Data Fiduciary |
  723. | Investigation / police | **Sec 17** | Exemptions |
  724.  
  725. --------------
  726.  
  727. ---
  728.  
  729. # ✅ **SECTION-WISE RELEVANT LINES (Write these in case study answers)**
  730.  
  731. ---
  732.  
  733. # **SECTION 2 – DEFINITIONS**
  734.  
  735. ### **Relevant line:**
  736.  
  737. “Personal data means any data about an individual who is identifiable.” (Sec 2(t))
  738. “Processing includes collection, storage, sharing, use, erasure or destruction of personal data.” (Sec 2(x))
  739.  
  740. ---
  741.  
  742. # **SECTION 3 – APPLICATION OF THE ACT**
  743.  
  744. ### **Relevant line:**
  745.  
  746. “This Act does not apply to personal or domestic use, or data made publicly available by the Data Principal.” (Sec 3(c))
  747.  
  748. ---
  749.  
  750. # **SECTION 4 – GROUNDS FOR PROCESSING PERSONAL DATA**
  751.  
  752. ### **Relevant line:**
  753.  
  754. “Personal data may be processed only for a lawful purpose with the consent of the Data Principal or for legitimate uses.” (Sec 4(1))
  755.  
  756. ---
  757.  
  758. # **SECTION 5 – NOTICE**
  759.  
  760. ### **Relevant line:**
  761.  
  762. “Every request for consent shall be accompanied or preceded by a notice describing the personal data and the purpose of processing.” (Sec 5(1))
  763.  
  764. ---
  765.  
  766. # **SECTION 6 – CONSENT**
  767.  
  768. ### **Relevant lines:**
  769.  
  770. “Consent shall be free, specific, informed, unconditional and unambiguous with a clear affirmative action.” (Sec 6(1))
  771. “The Data Principal has the right to withdraw consent at any time.” (Sec 6(4))
  772. “On withdrawal of consent, the Data Fiduciary shall cease processing within a reasonable time.” (Sec 6(6))
  773.  
  774. ---
  775.  
  776. # **SECTION 7 – CERTAIN LEGITIMATE USES (Processing Without Consent)**
  777.  
  778. ### **Relevant line:**
  779.  
  780. “A Data Fiduciary may process personal data without consent for government benefits, medical emergencies, legal obligations, court orders, and employment-related purposes.” (Sec 7)
  781.  
  782. ---
  783.  
  784. # **SECTION 8 – GENERAL OBLIGATIONS OF DATA FIDUCIARY**
  785.  
  786. ### **(a) Accuracy:**
  787.  
  788. “The Data Fiduciary shall ensure the completeness, accuracy and consistency of personal data used for decisions or disclosure.” (Sec 8(3))
  789.  
  790. ### **(b) Security Safeguards:**
  791.  
  792. “The Data Fiduciary shall protect personal data by taking reasonable security safeguards to prevent personal data breach.” (Sec 8(5))
  793.  
  794. ### **(c) Breach Notification:**
  795.  
  796. “The Data Fiduciary shall intimate the Board and each affected Data Principal in the event of a personal data breach.” (Sec 8(6))
  797.  
  798. ### **(d) Data Retention:**
  799.  
  800. “The Data Fiduciary shall erase personal data when the purpose is no longer served or consent is withdrawn, unless retention is required by law.” (Sec 8(7))
  801.  
  802. ### **(e) Grievance Redressal:**
  803.  
  804. “The Data Fiduciary shall establish an effective mechanism for grievance redressal.” (Sec 8(10))
  805.  
  806. ---
  807.  
  808. # **SECTION 9 – PROCESSING OF CHILDREN'S DATA**
  809.  
  810. ### **Relevant lines:**
  811.  
  812. “The Data Fiduciary shall obtain verifiable parental consent before processing the personal data of a child.” (Sec 9(1))
  813. “The Data Fiduciary shall not undertake tracking, behavioural monitoring or targeted advertising directed at children.” (Sec 9(3))
  814.  
  815. ---
  816.  
  817. # **SECTION 10 – SIGNIFICANT DATA FIDUCIARY**
  818.  
  819. ### **Relevant lines:**
  820.  
  821. “A Significant Data Fiduciary shall appoint a Data Protection Officer based in India and responsible to the Board of Directors.” (Sec 10(2)(a))
  822. “It shall conduct periodic Data Protection Impact Assessments and audits.” (Sec 10(2)(c))
  823.  
  824. ---
  825.  
  826. # **SECTION 11 – RIGHT TO ACCESS INFORMATION**
  827.  
  828. ### **Relevant line:**
  829.  
  830. “The Data Principal has the right to obtain a summary of personal data being processed and the identities of all Data Fiduciaries with whom it has been shared.” (Sec 11(1))
  831.  
  832. ---
  833.  
  834. # **SECTION 12 – RIGHT TO CORRECTION & ERASURE**
  835.  
  836. ### **Relevant lines:**
  837.  
  838. “The Data Fiduciary shall correct inaccurate or misleading personal data on request of the Data Principal.” (Sec 12(2)(a))
  839. “The Data Fiduciary shall erase personal data on request unless retention is required for the specified purpose or by law.” (Sec 12(3))
  840.  
  841. ---
  842.  
  843. # **SECTION 13 – GRIEVANCE REDRESSAL**
  844.  
  845. ### **Relevant line:**
  846.  
  847. “The Data Fiduciary shall provide readily available means of grievance redressal and respond within the prescribed period.” (Sec 13(2))
  848.  
  849. ---
  850.  
  851. # **SECTION 14 – NOMINATION**
  852.  
  853. ### **Relevant line:**
  854.  
  855. “The Data Principal may nominate an individual who shall exercise her rights in case of death or incapacity.” (Sec 14(1))
  856.  
  857. ---
  858.  
  859. # **SECTION 15 – DUTIES OF DATA PRINCIPAL**
  860.  
  861. ### **Relevant line:**
  862.  
  863. “The Data Principal shall not impersonate another person or provide false information and must not file frivolous complaints.” (Sec 15)
  864.  
  865. ---
  866.  
  867. # **SECTION 16 – RESTRICTION ON CROSS-BORDER TRANSFER**
  868.  
  869. ### **Relevant line:**
  870.  
  871. “The Central Government may restrict transfer of personal data by notification to specified countries.” (Sec 16(1))
  872.  
  873. ---
  874.  
  875. # **SECTION 17 – EXEMPTIONS**
  876.  
  877. ### **Relevant lines:**
  878.  
  879. “The provisions of Chapters II and III do not apply where processing is necessary for enforcing legal rights, judicial functions, investigation of offences, or research.” (Sec 17(1),(2))
  880.  
  881. ---
  882.  
  883. # **SECTION 33 + SCHEDULE – PENALTIES**
  884.  
  885. ### **Relevant line:**
  886.  
  887. “The Board may impose monetary penalties up to ₹250 crore depending on the nature, gravity and duration of the breach.” (Sec 33(1), Schedule)
  888.  
  889. ---
  890.  
  891. # ✅ If you want, I can also prepare:
  892.  
  893. ### ✔ A one-page **“Relevant Lines Only” PDF**
  894.  
  895. ### ✔ Case studies mapped → exact section + relevant line
  896.  
  897. ### ✔ A memory-friendly table for last-minute revision
  898.  
  899. Just tell me!
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907. # ⭐ **CHAPTER I — PRELIMINARY**
  908.  
  909. ---
  910.  
  911. # **SECTION 1 — Short title and commencement**
  912.  
  913. **(1)** This Act may be called the Digital Personal Data Protection Act, 2023.
  914. **(2)** It shall come into force on such date as the Central Government may, by notification in the Official Gazette, appoint, and different dates may be appointed for different provisions of this Act.
  915.  
  916. ---
  917.  
  918. # **SECTION 2 — Definitions**
  919.  
  920. In this Act, unless the context otherwise requires—
  921. *(Full definitions retained exactly as in PDF)*
  922.  
  923. (a) “Appellate Tribunal” …
  924. (b) “automated” …
  925. (c) “Board” …
  926. (d) “certain legitimate uses” …
  927. (e) “Chairperson” …
  928. (f) “child” …
  929. (g) “Consent Manager” …
  930. (h) “data” …
  931. (i) “Data Fiduciary” …
  932. (j) “Data Principal” …
  933. (k) “Data Processor” …
  934. (l) “Data Protection Officer” …
  935. (m) “digital office” …
  936. (n) “digital personal data” …
  937. (o) “gain” …
  938. (p) “loss” …
  939. (q) “Member” …
  940. (r) “notification” …
  941. (s) “person” includes—individual, HUF, company, firm, association, the State, juristic person.
  942. (t) “personal data” means any data about an individual who is identifiable by or in relation to such data.
  943. (u) “personal data breach” …
  944. (v) “prescribed” …
  945. (w) “proceeding” …
  946. (x) “processing” means wholly or partly automated operations performed on digital personal data…
  947. (y) “she” includes reference to individual irrespective of gender.
  948. (z) “Significant Data Fiduciary” …
  949. (za) “specified purpose” …
  950. (zb) “State” means State as under Article 12.
  951.  
  952. ---
  953.  
  954. # **SECTION 3 — Application of the Act**
  955.  
  956. Subject to the provisions of this Act, it shall—
  957. **(a)** apply to processing of digital personal data within India where the data is collected
  958. (i) in digital form; or
  959. (ii) in non-digital form and digitised subsequently.
  960.  
  961. **(b)** also apply to processing outside India, if such processing is for offering goods or services to Data Principals in India.
  962.  
  963. **(c)** not apply to—
  964. (i) personal or domestic use;
  965. (ii) personal data made publicly available by
  966.   (A) the Data Principal; or
  967.   (B) any person obligated by Indian law to make it publicly available.
  968.  
  969. ---
  970.  
  971. # ⭐ **CHAPTER II — OBLIGATIONS OF DATA FIDUCIARY**
  972.  
  973. ---
  974.  
  975. # **SECTION 4 — Grounds for processing personal data**
  976.  
  977. **(1)** Personal data may be processed only in accordance with this Act and for a lawful purpose—
  978. (a) for which the Data Principal has given consent; or
  979. (b) for certain legitimate uses.
  980.  
  981. **(2)** “Lawful purpose” means any purpose not expressly forbidden by law.
  982.  
  983. ---
  984.  
  985. # **SECTION 5 — Notice**
  986.  
  987. **(1)** Every request for consent shall be accompanied or preceded by notice informing the Data Principal of—
  988. (i) the personal data and the purpose of processing;
  989. (ii) the manner of exercising rights under Sec 6(4) and Sec 13;
  990. (iii) the manner of making a complaint to the Board.
  991.  
  992. **(2)** For consent given before commencement of the Act, the Data Fiduciary must provide notice containing the above details.
  993.  
  994. **(3)** The notice must be available in English or any Eighth Schedule language.
  995.  
  996. ---
  997.  
  998. # **SECTION 6 — Consent**
  999.  
  1000. **(1)** Consent must be free, specific, informed, unconditional, unambiguous, with clear affirmative action, and limited to data necessary for the specified purpose.
  1001.  
  1002. **(2)** Any part of consent violating this Act is invalid to that extent.
  1003.  
  1004. **(3)** Consent request must be in clear language and must provide contact details of DPO or authorised person.
  1005.  
  1006. **(4)** Data Principal has the right to withdraw consent at any time, with comparable ease as giving consent.
  1007.  
  1008. **(5)** Consequences of withdrawal shall be borne by the Data Principal and shall not affect legality of prior processing.
  1009.  
  1010. **(6)** Upon withdrawal, the Data Fiduciary must cease processing unless required/authorised by law.
  1011.  
  1012. **(7)** Consent may be managed through a Consent Manager.
  1013.  
  1014. **(8)** Consent Manager shall be accountable to the Data Principal.
  1015.  
  1016. **(9)** Consent Manager must be registered with the Board.
  1017.  
  1018. **(10)** Data Fiduciary must prove that valid notice and consent were given, if questioned.
  1019.  
  1020. ---
  1021.  
  1022. # **SECTION 7 — Certain legitimate uses**
  1023.  
  1024. A Data Fiduciary may process personal data for the following uses:
  1025.  
  1026. (a) specified purpose for which Data Principal voluntarily provided personal data without indicating non-consent.
  1027. (b) State functions for providing subsidies/benefits/services, subject to prescribed conditions.
  1028. (c) performance of State functions under law or in interest of sovereignty/security.
  1029. (d) legal obligations requiring disclosure to the State.
  1030. (e) compliance with judgment/decree/order.
  1031. (f) medical emergency involving threat to life/health.
  1032. (g) medical treatment/health services during epidemics, outbreaks, public health threats.
  1033. (h) measures for safety, assistance, or services during disasters or breakdown of public order.
  1034. (i) purposes of employment, or safeguarding employer interests such as secrecy, security, or benefits.
  1035.  
  1036. ---
  1037.  
  1038. # **SECTION 8 — General obligations of Data Fiduciary**
  1039.  
  1040. **(1)** Data Fiduciary is responsible for compliance with this Act for all processing done by it or on its behalf.
  1041. **(2)** Data Processor may be engaged only under a valid contract.
  1042. **(3)** If personal data is used for decision-making or disclosure, it must be complete, accurate, consistent.
  1043. **(4)** Data Fiduciary must implement appropriate technical and organisational measures.
  1044. **(5)** Must protect personal data by reasonable security safeguards to prevent breach.
  1045. **(6)** Must notify the Board and affected Data Principals of a personal data breach.
  1046. **(7)** Must erase personal data upon consent withdrawal or when purpose is no longer served, unless retention required by law.
  1047. **(8)** “Purpose no longer served” may be declared based on non-interaction for prescribed time.
  1048. **(9)** Must publish business contact information of DPO or responsible person.
  1049. **(10)** Must establish an effective grievance redressal mechanism.
  1050. **(11)** Clarifies when Data Principal is considered to have not approached for performance of purpose.
  1051.  
  1052. ---
  1053.  
  1054. # **SECTION 9 — Processing personal data of children**
  1055.  
  1056. **(1)** Must obtain verifiable parental/guardian consent before processing personal data of a child or person with disability having a guardian.
  1057. **(2)** Must not process personal data likely to cause detrimental effect on child’s well-being.
  1058. **(3)** Must not undertake tracking, behavioural monitoring, or targeted advertising directed at children.
  1059. **(4)** Govt may exempt certain Fiduciaries/purposes from (1) and (3).
  1060. **(5)** Govt may notify age relaxation for a Data Fiduciary if safe processing is ensured.
  1061.  
  1062. ---
  1063.  
  1064. # **SECTION 10 — Additional obligations of Significant Data Fiduciary**
  1065.  
  1066. **(1)** Govt may notify any Data Fiduciary as Significant Data Fiduciary based on volume, sensitivity, risk, sovereignty, democracy, security, public order.
  1067.  
  1068. **(2)** Significant Data Fiduciary must—
  1069. (a) appoint a Data Protection Officer who shall
  1070.  (i) represent the SDF under this Act;
  1071.  (ii) be based in India;
  1072.  (iii) be responsible to Board of Directors;
  1073.  (iv) be point of contact for grievance redressal.
  1074.  
  1075. (b) appoint an independent data auditor for compliance audit.
  1076.  
  1077. (c) undertake—
  1078.  (i) periodic Data Protection Impact Assessments;
  1079.  (ii) periodic audits;
  1080.  (iii) other prescribed measures.
  1081.  
  1082. ---
  1083.  
  1084. # ⭐ **CHAPTER III — RIGHTS AND DUTIES OF DATA PRINCIPAL**
  1085.  
  1086. ---
  1087.  
  1088. # **SECTION 11 — Right to access information about personal data**
  1089.  
  1090. **(1)** Data Principal has right to obtain from the Data Fiduciary—
  1091. (a) a summary of personal data being processed and processing activities;
  1092. (b) identities of all Data Fiduciaries/Data Processors with whom data has been shared, and description of data shared;
  1093. (c) any other prescribed information.
  1094.  
  1095. **(2)** Exception: Not applicable where data is shared with another DF authorised by law for law enforcement or cybersecurity purposes.
  1096.  
  1097. ---
  1098.  
  1099. # **SECTION 12 — Right to correction and erasure**
  1100.  
  1101. **(1)** Data Principal may request correction, completion, updating, and erasure of personal data.
  1102. **(2)** Upon such request, the Data Fiduciary shall—
  1103. (a) correct inaccurate or misleading data;
  1104. (b) complete incomplete data;
  1105. (c) update data.
  1106.  
  1107. **(3)** Data Fiduciary must erase personal data unless retention is necessary for specified purpose or legal compliance.
  1108.  
  1109. ---
  1110.  
  1111. # **SECTION 13 — Right of grievance redressal**
  1112.  
  1113. **(1)** Data Principal has right to have readily available means of grievance redressal.
  1114. **(2)** Fiduciary or Consent Manager must respond within prescribed timeline.
  1115. **(3)** Data Principal must exhaust grievance remedy before approaching Board.
  1116.  
  1117. ---
  1118.  
  1119. # **SECTION 14 — Right to nominate**
  1120.  
  1121. **(1)** Data Principal may nominate another individual to exercise her rights in case of death or incapacity.
  1122. **(2)** “Incapacity” means inability due to unsoundness of mind or infirmity of body.
  1123.  
  1124. ---
  1125.  
  1126. # **SECTION 15 — Duties of Data Principal**
  1127.  
  1128. A Data Principal shall—
  1129. (a) comply with applicable laws while exercising rights;
  1130. (b) not impersonate another person when providing personal data;
  1131. (c) not suppress material information while providing personal data for identity documents;
  1132. (d) not file false or frivolous grievance/complaint;
  1133. (e) furnish only verifiably authentic information when seeking correction or erasure.
  1134.  
  1135. ---
  1136.  
  1137. # ✅ **If you want next:**
  1138.  
  1139. ✔ Section 16–44 in the same clean structured format
  1140. ✔ A **one-page exam cheat sheet**
  1141. ✔ A **case-study mapping guide** to identify which section applies
  1142.  
  1143. Just tell me!
  1144.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Joryiksu
    2 days
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=wikuyzgkmd
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment