Skip to content

Commit 29b18ba

Browse files
Merge pull request #14 from virtual-labs/testing
Testing to main
2 parents 641c2b5 + 4573c25 commit 29b18ba

33 files changed

+1721
-6901
lines changed

.github/workflows/deployment-script.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ jobs:
1515
- name: Setup node
1616
uses: actions/setup-node@v2
1717
with:
18-
node-version: '12'
18+
node-version: '16'
1919
check-latest: true
2020
- run: |
21-
git clone https://github.com/virtual-labs/ph3-lab-mgmt
21+
git clone --depth=1 https://github.com/virtual-labs/ph3-lab-mgmt
2222
cd ph3-lab-mgmt
2323
npm install
24-
node exp.js
24+
npm run build-exp
2525
cd ../
2626
git config --local user.email "admin@vlabs.ac.in"
2727
git config --local user.name "vleadadmin"
2828
git checkout --orphan gh-pages
2929
git reset
3030
git add build/* -f
3131
git mv build/* ./ -f
32-
git commit -m "https://virtual-labs.github.io/${{ github.repository }} click on the link to test your code."
32+
git commit -m "https://virtual-labs.github.io/${{ github.event.repository.name }} click on the link to test your code."
3333
- uses: ad-m/github-push-action@master
3434
with:
3535
github_token: ${{ secrets.ORG_OWNER_GITHUB_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package.json
2+
package-lock.json
3+
build/
4+
plugins/
5+
node_modules/
6+
.DS_Store

experiment-descriptor.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"unit-type": "lu",
33
"label": "",
44
"basedir": ".",
5+
"LaTeXinMD": "true",
56
"units": [
67
{
78
"unit-type": "aim"
@@ -36,10 +37,10 @@
3637
},
3738
{
3839
"target": "assignment.html",
39-
"source": "assignment/index.html",
40+
"source": "assignment.md",
4041
"label": "Assignment",
4142
"unit-type": "task",
42-
"content-type": "simulation"
43+
"content-type": "text"
4344
},
4445
{
4546
"target": "references.html",
@@ -50,4 +51,3 @@
5051
}
5152
]
5253
}
53-

experiment/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

experiment/aim.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
A private-key encryption scheme consists of a set of all possible messages, called the message space **M**, and three algorithms, namely,
22

3-
(a) **Gen**
3+
(a) **Gen**
44

5-
(b) **Enc**
5+
(b) **Enc**
66

7-
(c) **Dec**
7+
(c) **Dec**
88

9-
The algorithm for key generation **Gen** is used to choose a key **k** at random from the set of all possible secert keys, denoted by the key space **K**.
9+
The algorithm for key generation **Gen** is used to choose a key **k** at random from the set of all possible secret keys, denoted by the key space **K**.
1010

1111
The algorithm for encryption **Enc** takes as inputs the message **m** and the secret key **k** and outputs the ciphertext **c**.
1212

1313
The algorithm for decryption **Dec** inputs the ciphertext **c** and the key **k** and outputs the message **m**.
1414

15-
**About the experiment:**
16-
17-
Apparently, the system is easily broken if the total number of distinct secret keys is small, that is the key space **K** is small.
15+
We are able to break many classical ciphers because of their vulnerabilities. In cryptography, we learn that a large key space is necessary for secrecy, but understanding how small key spaces make ciphers vulnerable is equally important for learning cryptographic principles.
1816

19-
In this experiment, we work with a well-known historical encryption scheme, namely the shift cipher, that has a very small key space.
17+
**About the experiment:**
2018

21-
Your task is to break the shift cipher. Specifically, given (only) the ciphertext in some instance of a shift cipher, you need to find the plaintext and the secret key.
19+
In this experiment, we work with a well-known historical encryption scheme, namely the shift cipher (also known as Caesar cipher), that has a very small key space. The shift cipher is easily broken using brute force attack methods because it has only 26 possible keys for the English alphabet. Your task is to break this cipher. Specifically, given (only) the ciphertext in some instance of a shift cipher, you need to find the plaintext and the secret key.

experiment/assignment.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Use the **PART III** provided in the simulation page to solve the following problems. The tool includes a shift cipher calculator and a workspace for your analysis.
2+
3+
**1. Encrypt the following plaintext using key k= 7.**
4+
5+
Given:
6+
7+
- **Plaintext:** `Lord Rama was a good king.`
8+
- **Key:** k = 7
9+
10+
**2.Given a plaintext and its corresponding ciphertext, determine the key used for encryption.**
11+
12+
Given:
13+
14+
- **Plaintext:** `abcdefghijklmnopqrstuvwxyz`
15+
- **Ciphertext:** `tuvwxyzabcdefghijklmnopqrs`
16+
17+
Hint: Compare the first few letters: a→t, b→u, c→v...
18+
19+
**3. How many different keys are possible with an n-letter alphabet?**
20+
21+
**4. For English alphabet (n=26): How many distinct keys exist?**
22+
23+
**5. Decrypt the following ciphertext using brute force attack.**
24+
25+
Given: Ciphertext: `HAAHJR HA KHDU`

experiment/assignment.md.1

Lines changed: 0 additions & 25 deletions
This file was deleted.

experiment/assignment/index.html

Lines changed: 0 additions & 91 deletions
This file was deleted.

experiment/objective.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
1-
- To understand that secure encryption is not possible with small keyspace. This is more popularly known as the principle of large key space
1+
After completing this experiment, you will be able to:
22

3+
1. **Understand Basic Cryptography Concepts**
4+
5+
- Comprehend the fundamental principles of encryption and decryption
6+
- Recognize the importance of key space in cryptographic systems
7+
- Understand why secure encryption is not possible with small keyspace (principle of large key space)
8+
9+
2. **Master Shift Cipher Operations**
10+
11+
- Perform encryption using the shift cipher algorithm
12+
- Execute decryption using the shift cipher algorithm
13+
- Calculate the total number of possible keys for a given alphabet
14+
15+
3. **Analyze Cryptographic Security**
16+
17+
- Identify vulnerabilities in the shift cipher
18+
- Understand why the shift cipher is considered insecure
19+
- Recognize the importance of key space size in cryptographic security
20+
21+
4. **Develop Cryptanalysis Skills**
22+
23+
- Apply brute force attacks to break shift cipher encryption
24+
- Use frequency analysis to decrypt messages
25+
- Determine encryption keys from known plaintext-ciphertext pairs
26+
27+
5. **Apply Practical Knowledge**
28+
- Implement shift cipher operations manually
29+
- Solve real-world cryptographic challenges
30+
- Evaluate the security of simple encryption schemes

0 commit comments

Comments
 (0)