Nis-Manual Compress
Nis-Manual Compress
Name:Rohit B Harshe
Roll No:- 30
Enrollment No:-1801320123
Practical No.1(A)
In this practical we study about how to install and configure an antivirus on system
Practical 1(B)
Requirements:-
• Computer system with i5 Intel processor having 8 GB RAM and 1 TB Hard-disk
• Operating system:- Windows
Conclusion
Requirements:-
• Computer system with i5 Intel processor having 8 GB RAM and 1 TB Hard-disk
• Operating system:- Windows
1. In the search box on the taskbar, type restore files, and then select Restore your files with File
History.
2. Look for the file you need, then use the arrows to see all its versions.
3. When you find the version you want, select Restore to save it in its original location. To save it
in a different place, right-click Restore, select Restore to, and then choose a new location.
4. Find your backups created on previous versions of Windows
5. If you used Backup and Restore to back up files or create system image backups in previous
versions of Windows, your old backup is still available in Windows 10. In the search box on the
3|Page
Network and Information System
taskbar, type control panel. Then select Control Panel > System and Security > Backup and
Restore (Windows 7).
• Restore files from a file backup after restoring your computer from a system image
backup
After you restore your computer from a system image backup, there may be
newer versions of some of your files in a file backup that you want to restore.
To restore files from a file backup that was created after the system image backup was
created, follow these steps.
1. Select the Start button, then select Control Panel > System and
Maintenance >Backup and Restore.
2. Choose Select another backup to restore files from. If you're prompted
for an administrator password or confirmation, type the password or provide
confirmation.
3. In Backup Period, select the date range of the backup that contains the files that
you want to restore, and then follow the steps in the wizard.
Conclusion
In this practical we learnt about how to perform backup and restore on windows 10.
Practical No.3
Assuming you haven't configured Windows to automatically log in, chances are you simply
don't have a password set for your Windows account. You need to correct this by creating
a password right now.
You can make one from Control Panel. Once you have, you must use it to log on to
4|Page
Network and Information System
Windows from that point forward. That is, unless you at some point remove your
Windows password.
The specific steps you need to follow to create a Windows logon password differ somewhat
depending on the operating system you're using. See What Version of Windows Do I
Have? if you're not sure which of those several versions of Windows is installed on your
computer.
It's always a good idea to create a password reset disk after creating a new password. If
your password is really complex and you don't want to make a reset disk, consider storing it
in a password manager.
2. Select User Accounts (Windows 10) or User Accounts and Family Safety
(Windows 8).
7. Enter the new password in the first two text fields. You have to do it twice to make
sure you type the password correctly.
8. In the Password hint field, enter something that will help you remember the password
should you forget it, and then select Next.
10. You can now exit out of any windows you opened to make the
password, like Settings or PC settings.
5|Page
Network and Information System
4. In the Make changes to your user account area, select Create a password for your
account.
5. Type the password you want to use in the first two text boxes.
6. Enter something useful in the Type a password hint text box. This step is optional
but we highly recommend that you use it. If you try logging in to Windows but enter
the wrong password, this hint will pop up, hopefully jogging your memory.
6|Page
Network and Information System
5. In the first two text boxes, enter the password you would like to start using.
6. Choose Create Password to confirm your new password.
7. The next screen might ask Do you want to make your files and folders private? . If
other user accounts will be set up on this PC and you'd like to keep your personal
files private, select Yes, Make Private.
If you're not concerned about this kind of security or this account is the only
account on your PC, you can choose No.
8. You can now close the User Accounts window and the Control Panel window.
Conclusion:
Practical No. 4
Aim: Apply security to file folder or application using access permission and
verify.
Steps to Assign File/Folder Permissions
2. In left panel of “Group Policy Management Console”, you have to create a new
Group Policy Object or edit an existing Group Policy Object.
3. To create a new GPO, right click “Group Policy Objects”, and select “New” from the
7|Page
Network and Information System
4. Enter a name for the Group Policy Object (GPO) (in this case it is Assigning Folder
Permissions), leave “Source Starter GPO” as “(none)”.
8|Page
Network and Information System
5. Right-click on the newly created “User Folder Permissions” GPO, and select “Edit
GPO”. Group Policy Management Editor window appears on the screen
7. Right-click on “File System” in the left pane and select “Add File…” It shows the
following dialog box
9|Page
Network and Information System
.
Figure 3: Select file or folder which you want to assign permissions on
8. Browse the folder or file that you wish to assign permissions on, and left click to select
it. Click “OK”.
10. Click “Advanced” button to access “Advanced Security Settings” window. Stay on
the “Permissions” tab that appears by default.
10 | P a g e
Network and Information System
11. On this tab, either select an existing user and click “Edit…” or click “Add…”
to add a new user to the permissions.
12. “Permissions Entry for…” dialog box opens up. Here, you will see that there is a
list of permissions available for your users, and you can also choose where you
want to apply those permissions.
11 | P a g e
Network and Information System
13. Use the drop-down menu in the “Apply to” field to assign selected
permissions to desired folders.
16. Now, move to the “Auditing” tab. Under this tab, you can do audit settings for the folder,
so that any change done to this folder or its permission will be audited. Configure the
auditing settings as per requirement.
12 | P a g e
Network and Information System
17. Similarly, you can do ownership settings for the folder under “Owner” tab.
18. Once you have done “Permission”, “Auditing” and “Ownership” settings, click
“OK” to close “Advanced Security…” window.
19. Click “OK” to close “Database Security…” window. Next, you will see “Add Object”
window.
a. Configure this file or folder then: Select this option to apply the settings. It contains
the following two options.
i. Propagate inheritable permissions to all subfolders and files: Selecting this option
means, all the subfolders and files will inherit permissions from the parent folder. In
case of a mismatch or conflict, explicit permissions that
13 | P a g e
Network and Information System
ii. Replace existing permissions on all subfolders and files with inheritable
permissions: This option will overwrite all the settings on all subfolders and files with
the ones on the parent, so ultimately they will have identical permissions to the parent
folder.
b. Do not allow permissions on this file or folder to be replaced: Use this setting for
subfolders and files that you do not want to inherit permissions. For this, make an
additional entry for those subfolders and files that will not inherit permissions e.g. let’s
say you want the “A” folder to inherit permission but don’t want “B” folder to inherit
permissions, in that case create an entry for the “B” folder.
14 | P a g e
Network and Information System
23. Select the new “Assigning Folder Permissions” GPO, then click OK.
24. In the right pane, stay on the “Linked Group Policy Objects” tab that appears by
default.
25. Right-click on the “Assigning Folder Permissions”, and select “Enforced” from the
context menu. A confirmation message appears on the screen.
Conclusion: Assigning permissions for each file and folder individually can be complex
and time consuming. To avoid going through the annoyances of changing permissions for a
bunch of folders individually, we can use Group Policy to do it. In this article, you will see
the process of assigning file and folder permissions across a domain through GPO. These
instructions can be extremely helpful, and save your time if you have to assign permissions
to a large number of systems with a common setup.
15 | P a g e
Network and Information System
Practical No. 5
Aim: Write a program to implement Caesar Cipher
Introduction:
• Each letter of plain text is replaced by a letter with some fixed number of positions
down with alphabet.
16 | P a g e
Network and Information System
Explanation
• After the steps is followed, a new string is generated which is referred as cipher
text.
This algorithm consists of a few features that are given below. o This technique is quite
simple to apply encryption. o Each text is replaced by the fixed number of position
down or up with the alphabet. o It is a simple type of substitute cipher.
There is an integer value required to define each latter of the text that has been moved
down. This integer value is also known as the shift.
We can represent this concept using modular arithmetic by first transmuting the letter
into numbers, according to the schema, A = 0, B = 1, C = 2, D = 3 Z = 25.
17 | P a g e
Network and Information System
Program:
#A python program to illustrate
Caesar Cipher Technique
def encrypt(text,s):
result = ""
# traverse text
for i in range(len(text)):
char = text[i]
return result
18 | P a g e
Network and Information System
Output:
Conclusion:
The Caesar Cipher technique is one of the earliest and simplest method of encryption
technique. It’s simply a type of substitution cipher, i.e., each letter of a given text is
replaced by a letter some fixed number of positions down the alphabet. For example with a
shift of 1, A would be replaced by B, B would become C, and so on. The method is
apparently named after Julius Caesar, who apparently used it to communicate with his
officials.
Thus to cipher a given text we need an integer value, known as shift which indicates the
number of position each letter of the text has been moved down
Practical No. 6
Aim: Write a program to implement Vernam
Cipher
19 | P a g e
Network and Information System
Introduction:
Encryption Algorithm:
1. Assign a number to each character of the plain-text and the key according to
alphabetical order.
2. Add both the number (Corresponding plain-text character number and Key character
number()
20 | P a g e
Network and Information System
3. Subtract the number from 26 if the added number is greater than 26, if it isn’t then
leave it.
Example:
Plain-Text: RAMSWARUPK
Key: RANCHOBABA
Now according to our encryption algorithm we assign a number to each character of our
plain-text and key.
PT: R A M S W A R U P K
NO: 17 0 12 18 22 0 17 20 15 10
KEY: R A N C H O BAB A
NO: 17 0 13 2 7 14 1 0 1 0
Now add the number of Plain-Text and Key and after doing the addition and subtraction
operation (if required), we will get the corresponding Cipher-Text character number.
CT-NO: 34 0 25 20 29 14 18 20 16 10
In this case, there are two numbers which are greater than the 26 so we have to subtract 26
from them and after applying the subtraction operation the new Cipher text character
numbers are as follow:
21 | P a g e
Network and Information System
CT-NO: 8 0 25 20 3 14 18 20 16 10
New Cipher-Text is after getting the corresponding character from the number.
CIPHER-TEXT: I A Z U D O S U Q K
Program:
# Vernam cypher demo
# T Street 2015-10-16
MY_KEY = "cvwopslweinedvq9fnasdlkfn2"
while True:
print("\n\n---Vernam Cypher---")
PlainText = input("Enter text to encrypt: ")
# Encrypt
Cypher = makeVernamCypher(PlainText, MY_KEY)
print("Cypher text: "+Cypher)
# Decrypt
decrypt = makeVernamCypher(Cypher, MY_KEY)
print("Decrypt: "+decrypt)
Output:
22 | P a g e
Network and Information System
Conclusion:
The Vernam cipher is, in theory, a perfect cipher. Instead of a single key, each plaintext
character is encrypted using its own key. This key -- or key stream — is randomly
generated or is taken from a one-time pad, e.g. a page of a book. The key must be equal in
length to the plaintext message. The fact that each character of the message is encrypted
using a different key prevents any useful information being revealed through a frequency
analysis of the ciphertext
23 | P a g e
Network and Information System
Practical No. 7
Introduction:
A hash function is a function that takes input of a variable
length sequence of bytes and converts it to a fixed length sequence. It is a one way
function. This means if f is the hashing function, calculating f(x) is pretty fast and simple,
but trying to obtain x again will take years. The value returned by a hash function is often
called a hash, message digest, hash value, or checksum. Most of the time a hash function
will produce unique output for a given input. However depending on the algorithm, there is
a possibility to find a collision due to the mathematical theory behind these functions.
Now suppose you want to hash the string "Hello Word" with the SHA1 Function, the result is
0a4d55a8d778e5022fab701977c5d840bbc486d0.
Hash functions are used inside some cryptographic algorithms, in digital signatures,
message authentication codes, manipulation detection, fingerprints, checksums (message
integrity check), hash tables, password storage and much more. As a Python programmer
24 | P a g e
Network and Information System
you may need these functions to check for duplicate data or files, to check data integrity
when you transmit information
over a network, to securely store passwords in databases, or maybe some work related to
cryptography.
Program:
#hash for integer unchanged
Output:
Conclusion:
Hash method in Python is a module that is used to return the hash value of an object. In
programming, the hash method is used to return integer values that are
25 | P a g e
Network and Information System
used to compare dictionary keys using a dictionary look up feature. When used, it calls for
the hash () of an object which is set by default during the creation of the
object by the user.
Practical No. 8
Aim: Write a program to implement Rail fence technique.
Introduction:
Rail- fence cipher is a transposition cipher that encrypts the plain text by
changing the position of each character.
This cipher takes an input string and a key and arranges the letters in the string in a
diagonal fashion. For implementing Rail-fence Cipher in Python, a rectangular grid is
required with the number of rows corresponding to the key, and the number of columns
corresponding to the length of string to be encrypted. Then the ciphertext is generated by
reading the resultant grid row by row.
For example
Program:
# Python3 program to illustrate
# Rail Fence Cipher Encryption
# and Decryption
for i in range(len(text)):
27 | P a g e
Network and Information System
row += 1
else:
row -= 1
# now we can construct the cipher
# using the rail matrix
result = []
for i in range(key):
for j in range(len(text)):
if rail[i][j] != '\n':
result.append(rail[i][j])
return("" . join(result))
col += 1
if dir_down:
row += 1
else:
row -= 1
return("".join(result))
# Driver code
if __name__ == "__main__":
print(encryptRailFence("attack at once", 2))
print(encryptRailFence("GeeksforGeeks ", 3))
print(encryptRailFence("defend the east wall", 3))
Output:
30 | P a g e
Network and Information System
Conclusion:
In the rail fence cipher, the plaintext is written downwards diagonally on successive
"rails" of an imaginary fence, then moving up when the bottom rail is reached, down
again when the top rail is reached, and so on until the whole plaintext is written out. The
cipher text is then read off in rows.
Practical No. 9
Aim: Write a program to implement Simple Columnar transposition Technique
Introduction:
The Columnar Transposition rearranges the plaintext letters, based on a matrix filled with
letters in the order determined by the secret keyword.
The encryption and decryption can be performed by hand, using a piece of paper and a
31 | P a g e
Network and Information System
simple matrix, into which the user enters the letters of the message.
Example:
A simple example for a transposition cipher is columnar transposition cipher where each
character in the plain text is written horizontally with specified alphabet width. The cipher
is written vertically, which creates an entirely different cipher text.
Consider the plain text hello world, and let us apply the simple columnar transposition
technique as shown below
The plain text characters are placed horizontally and the cipher text is created with vertical
format as : holewdlo lr. Now, the receiver has to use the same table to decrypt the cipher
text to plain text.
32 | P a g e
Network and Information System
Program:
# Python3 implementation of
# Columnar Transposition
import math
key = "HACK"
# Encryption
def encryptMessage(msg):
cipher = ""
msg_len = float(len(msg))
msg_lst = list(msg)
key_lst = sorted(list(key))
33 | P a g e
Network and Information System
for _ in range(col):
curr_idx = key.index(key_lst[k_indx])
cipher += ''.join([row[curr_idx]
for row in matrix])
k_indx += 1
return cipher
# Decryption
def decryptMessage(cipher):
msg = ""
for _ in range(col):
curr_idx = key.index(key_lst[k_indx])
for j in range(row):
dec_cipher[j][curr_idx] = msg_lst[msg_indx]
msg_indx += 1
k_indx += 1
null_count = msg.count('_')
if null_count > 0:
return msg[: -null_count]
return msg
# Driver Code
msg = "Geeks for Geeks"
cipher = encryptMessage(msg)
print("Encrypted Message: {}".
format(cipher))
35 | P a g e
Network and Information System
Output:
Conclusion:
Transposition Cipher is a cryptographic algorithm where the order of alphabets in the
plaintext is rearranged to form a cipher text. In this process, the actual plain text alphabets
are not included. In cryptography, a transposition cipher is a method of encryption by which
the positions held by units of plaintext (which are commonly characters or groups of
characters) are shifted according to a regular system, so that the cipher text constitutes a
permutation of the plaintext. That is, the order of the units is changed (the plaintext is
reordered).
Mathematically a bijective function is used on the characters' positions to encrypt
and an inverse function to decrypt.
36 | P a g e
Network and Information System
37 | P a g e