When the tides of life turn against you... And the current upsets your boat... Don't waste those tears on what might have been... Just lay on your back and float!...

Lecture 3 ~Modern Cryptography~

Assalamualaikum w.b.t..

Lam lecture 3 nie encek ajr kiteorg bab Modern Cryptography... Lecture nie mmg best tp kdg2 tue pening gakk.. tp aku suker.. hehhee.. kalu der yg kire2 lg syok!.. byk guner IQ daaaa...Aku nie mmg ske sgt berpkir... sejak azali lagi.. da mmg sesuai la aku yg fanatik green nie... org yg kuat berfikir.. uhukss... Topics lam lecture nie adalah :-
~Modern Cryptography Algorithm
~Block and Stream
~DES
~AES
~MAC
~Digital Signature, RSA

Modern Cryptography Algorithm
•Most modern ciphers use a sequence of binary digits (bits), that is, zeros and ones such as ASCII.
•This bit sequence representing the plaintext is then encrypted to give the ciphertext as a bit sequence.
•The encryption algorithm may act on a bit-string in a number of ways.
~stream ciphers where the sequence is encrypted bit-by-bit.
~block ciphers, where the sequence is divided into blocks of a predetermined size.
~ASCII requires 8 bits to represent one character, and so for a block cipher that
has 64-bit blocks, the encryption algorithm acts on eight characters at once.
•Since most modern algorithms operate on binary strings we need to be familiar with a method of combining two bits called Exclusive OR and often written as XOR or .

•Stream ciphers
~they convert one symbol of plaintext immediately into a symbol of ciphertext
~depends on symbol, key and control information of encipherment algorithm
•Block ciphers
~encrypt a group of plaintext symbols as one block
~examples are transposition ciphers
•e.g, in columnar transposition, the entire message is translated as one block,
block size need not have any particular relationship to the size of the character

Stream Ciphers
~The plaintext is enciphered bit by bit.
•The value of each bit is changed to the alternative value or leave unchanged.
•If a bit is changed twice, it returns to its original value.
~If an attacker knows that a stream cipher has been used, then their task is to try
to identify the position of those bits which have been changed and to change them
back to their original values.
•If there is any easily detectable pattern that identifies the changed bits then
the attacker task may be simple.
•The position of the changed bits must be unpredictable to the attacker but the
genuine receiver needs to be able to identify them easily.
~The encryption key is often called a keystream sequence.
•0 to mean ‘leave unchanged’, 1 to mean ‘change’.
•Plaintext, ciphertext and keystream are all binary sequences.
~Suppose that we have the plaintext 1100101 and the keystream is 1000110.
•By applying the rule gives 0100011 as the ciphertext.
~Changing a bit twice has the effect of returning it to its original value.
•This means that decryption process is identical to the encryption process, so the
keystream also determines decryption.
~If Pi, Ki and Ci are respectively the plaintext, keystream and ciphertext bits in position i, then the ciphertext bit Ci is given by Ci = Pi  Ki.
•The decryption is defined by Pi = Ci  Ki.
~A stream cipher takes a short key to generate a long keystream.
•This is achieved by using binary sequence generator.
~The keystream bit in position i, Ki = Pi  Ci can be determined as the XOR of the plaintext and ciphertext in position i.
•This highlight the potential weakness for stream ciphers.
•Anyone who is able to launch a known plaintext attack, can deduce parts of the
keystream sequence from the corresponding plaintext and ciphertext bit pairs.
•Thus the keystream must be unpredictable in the sense that knowledge of some of
it should not enable an attacker to deduce the rest.
~If the keystream generator produces the same bit stream every time it is turned on,
the resulting cryptosystem will be trivial to break.
•Anyone who has two different ciphertexts encrypted with the same keystream, can
XOR them together and get two plaintext messages XORed with each other.
•When the interceptor gets a single plaintext/ciphertext pair, they can read
everything.
•That is why all stream ciphers have keys - the output of the keystream generator
is a function of the key.

Block Ciphers
~For a block cipher, the bit-string is divided into blocks of a given size and the
encryption algorithm acts on that block to produce a cryptogram block that, for
most symmetric ciphers, has the same size.
~Block ciphers have many applications.
•Can be used to provide confidentiality, integrity, or user authentication and can
even be used to provide the keystream generator for stream ciphers.
~A symmetric algorithm is said to be well designed if an exhaustive key search is
the simplest form of attack.
~Usual number of blocks are 64,128,256 and 512 bits
~There are a few obvious properties that a strong block cipher should possess.
•Diffusion properties - which a small change in the plaintext, may
be one or two positions, should produce an unpredictable change in the ciphertext.
•Confusion properties - if an attacker is conducting an exhaustive key search then there should be no indication that they are near to the correct key.
•To prevent divide-and-conquer attacks we require completeness - each bit of a
ciphertext must depend on every bit of the key.
•Statistical testing forms a fundamental component of the assessment of block
ciphers for these three listed properties and others.


Data Encryption Standards (DES)
~Widely used encryption scheme
~Adopted by The national Bureau of standard in 1977
~The plaintext is divided into 64 bit blocks with a key of 56 bits(with 8 bit
parity).
~DES structure is similar to Fiestel Network concept.
~Process through 16 round of Expansion, substitution, key mixing and permutation
process.
~Is it breakable?
~Yes, can try brute force attack using all the 2^56 possible key
~1998, Electronic Frontier Foundation (EFF) has created a USD220,000 machine to go
through the entire 56 bit DES key space in average of 4.5 days.
~Triple DES has been introduced to improve the standard.




Advanced Encryption Standard (AES)
•needed a better replacement for DES
•NIST called for proposals in 1997
•selected Rijndael in Nov 2001
•published as FIPS 197
•symmetric block cipher
•uses 128 bit data & 128/192/256 bit keys
•now widely available commercially


Message Authentication
•protects against active attacks
•verifies received message is authentic
~contents unaltered
~from authentic source
~timely and in correct sequence
•can use conventional encryption
~only sender & receiver have key needed
•or separate authentication mechanisms
~append authentication tag to cleartext message


Message Authentication Codes (MAC)


Hash Function



Hash Function Requirements
~applied to any size data
~H produces a fixed-length output.
~H(x) is relatively easy to compute for any given x
~one-way property
•computationally infeasible to find x such that H(x) = h
~weak collision resistance
•computationally infeasible to find y ? x such that H(y) = H(x)
~strong collision resistance
•computationally infeasible to find any pair (x, y) such thatH(x) = H(y)

Simple Hash Functions
•a one-way or secure hash function used in message authentication, digital
signatures
•all hash functions process input a block at a time in an iterative fashion
•one of simplest hash functions is the bit-by-bit exclusive-OR (XOR) of each block

– effective data integrity check on random data
– less effective on more predictable data
– virtually useless for data security


Hash Functions
~two attack approaches
•cryptanalysis
~exploit logical weakness in alg
•brute-force attack
~trial many inputs
~strength proportional to size of hash code (2n/2)
~SHA most widely used hash algorithm
•SHA-1 gives 160-bit hash
•more recent SHA-256, SHA-384, SHA-512 provide improved size and security
~There are 2 prominent algorithms in Hashing functions.
•First, the most popularly used technique is MD5.
•Second, the well accepted standard is secure hashing algorithm SHA-1.
~Nevertheless, SHA-256 is chosen in this class as it is considered to be the
primary next-generation algorithm.
~MD-5   
•A hash function designed by Ron Rivest, one of the inventors of the RSA public-key
encryption scheme.
•The MD-5 algorithm produces a 128-bit output. Note that MD-5 is now known to have
some weaknesses and should be avoided if possible.
•SHA-1 is generally recommended.

~SHA-1 (Secure Hash Algorithm-1)   
•SHA-1 is an MD-5-like algorithm that was designed to be used with the Digital
Signature Standard (DSS).
•NIST (National Institute of Standards and Technology) and NSA (National Security
Agency) are responsible for SHA-1.
•The SHA-1 algorithm produces a 160-bit MAC.
•This longer output is considered to be more secure than MD-5.


SHA Secure Hash Functions
•SHA originally developed by NIST/NSA in 1993
•was revised in 1995 as SHA-1
– US standard for use with DSA signature scheme
– standard is FIPS 180-1 1995, also Internet RFC3174
– produces 160-bit hash values
•NIST issued revised FIPS 180-2 in 2002
– adds 3 additional versions of SHA
– SHA-256, SHA-384, SHA-512
– with 256/384/512-bit hash values
– same basic structure as SHA-1 but greater security
•NIST intend to phase out SHA-1 use
•For SHA-1 and SHA-256, each message block has 512 bits, which are represented as a
sequence of sixteen 32-bit words.
•SHA-256 uses six logical functions, where each function operates on 32-bit words,
which are

•SHA-1 and SHA-256
•Suppose that the length of the message, M, is l bits. Append the bit “1” to the end
of the message.
•followed by k zero bits, where k is the smallest, non-negative solution to the
equation
•l +1+ k º 448mod 512 . Then append the 64-bit block that is equal to the number l
expressed
•using a binary representation. For example, the (8-bit ASCII) message “abc” has
length 8´3 = 24, so the message is padded with a one bit, then 448 - (24 +1) = 423
zero bits, and then the message length, to become the 512-bit padded message

•For SHA-1 and SHA-256, the padded message is parsed into N 512-bit blocks, M(1), M(2),…,M(N). Since the 512 bits of the input block may be expressed as sixteen 32-bit words, the first 32 bits of message block i are denoted M (i) 0, the next 32 bits are M (i) 1, and so on up to M (i) 15.
•For SHA-256, the initial hash value, H(0), shall consist of the following eight 32-bit words, in hex:


Initial value


SHA-512 Structure


SHA-512 Round


Digital Signatures
~It is the provision of a means of settling disputes between sender and receiver
that distinguishes the digital signature mechanism from the MACing process.
•Such dispute can only be settled if there is asymmetric between sender and
receiver.
~For a digital signature scheme based on RSA or El Gamal:
•Each user has a private key that only they can use and its use is accepted as
identifying them.
•There is a corresponding public key.
•Anyone who knows this public key, can check that the corresponding private key has
been used, but cannot determine the private key.
•This gives the receiver assurance of both the origin and content of the message.


Generating a Digital Signature
•Asymmetric cryptographic processing requires much computational processing.
•Thus a condensed version or hash of the message is produced by applying a hash
function to the message.
•The signature is produced from the hash (which represent the message) by using the
asymmetric algorithm with the private key.
•Thus only the owner of the private key can generate the signature.

Digital signature


Hash Function


How to Create a Digital Signature Using RSA


Verifying a Digital Signature
~The signature can be verified by anyone who knows the corresponding public key.
~To do this a value is produced from the signature using the asymmetric algorithm
with the public key.
~This value should be the hash of the message, which anyone can calculate.
~If this value and the hash agree, the signature is accepted as genuine.


How to Verify a Digital Signature Using RSA


Certification Authority (CA)
AIM:
•To guarantee the authenticity of public keys.
METHOD:
•The CA guarantees the authenticity by signing a certificate containing user’s
identity and public key with its secret key.
REQUIREMENT:
•All users must have an authentic copy of the Certification Authority’s public key.


Certification Process


How Does it Work?
~The certificate can accompany all sender’s messages.
~The recipient must directly or indirectly:
•Trust the CA
•Validate the certificate


Certification Authorities
~Problems / Questions
•Who generates users’ key?
•How is identity established?
•How can certificates be cancelled?
•Any others?


Attacks on Digital Signature
•Suppose digital signatures are being used as a means of identification.
•If user A wishes to impersonate user B, then there are two different forms of
attack:
>A attempts to obtain the use of B’s private key
>A tries to substitute their public key for B’s public key.


Public Key Infrastructure (PKI)
~The motivation of using PKI is to facilitate the use of public key cryptography.
~Three key players in PKI system:
•The certificate owner - who applies for the certificate.
•CA - which issues the certificate that binds the owner’s identity to the owner’s
public key value.
•The relying party - who uses on the certificate.
~Other players:
•Registration Authority (RA) - in some systems the identification verification is
performed by a separate authority.
•Validation Authority (VA) - end users ask the VA if a given certificate is still
valid and receive a yes or no answer.


Establishing a PKI
~When a PKI is established, the following processes need to take place:
•The key pairs for CAs must be generated.
•The key pairs for users must be generated.
•Users must request certificates
•Users’ identities must be verified.
•Users’ key pairs must be verified.
•Certificates must be produced.
•Certificates must be checked.
•Certificates must be removed/updated (when necessary).
•Certificates must be revoked (when necessary).


Key Management
~A typical requirement specification for a symmetric key system might include each
of the following:
•Keys must be generated using a random or pseudorandom process.
•Any key used by a communicating pair must be unique to them.
•A key must be used for only for a purpose, e.g. the same key should not be used
for both encryption and authentication.
•Each key must be replaced within the time deemed necessary to determine it by an
exhaustive search.
•A key must not be used if its compromise is either known or suspected.
•Compromise of a key which is shared between two parties must not compromise any
key used by a third party.
•Keys should only appear in clear form within a highly tamper resistant device.
Elsewhere all keys must be encrypted or in component form.
•Keys must be protected against misuse.
•Unauthorized modification, substitution or replay of any key must be prevented or
detected.


The Key Life Cycle



RSA
~by Rivest, Shamir & Adleman of MIT in 1977
~best known & widely used public-key scheme
~Ingredients of RSA:



RSA Key Setup
~each user generates a public/private key pair by:
~selecting two large primes at random - p, q
~computing their system modulus n=p*q
•note ø(n)=(p-1)(q-1)
~selecting at random the encryption key e
•where 1~solve following equation to find decryption key d
•e*d=1 mod ø(n) and 0≤d≤n
~publish their public encryption key: PU={e,n}
~keep secret private decryption key: PR={d,n}


RSA Use
~to encrypt a message M the sender:
•obtains public key of recipient PU={e,n}
•computes: C = Me mod n, where 0≤M~to decrypt the ciphertext C the owner:
•uses their private key PR={d,n}
•computes: M = Cd mod n
~note that the message M must be smaller than the modulus n (block if needed)


RSA Example - Key Setup
1. Select primes: p=17 & q=11
2. Compute n = pq =17 x 11=187
3. Compute ø(n)=(p–1)(q-1)=16 x 10=160
4. Select e: gcd(e,160)=1; choose e=7
5. Determine d: de=1 mod 160 and d < 160 Value is d=23
6. Publish public key PU={7,187}
7. Keep secret private key PR={23,187}


RSA Example - En/Decryption
sample RSA encryption/decryption is:
•given message M = 88 (number 88<187)
•encryption:
C = Me mod n
C = 887 mod 187 = 11
•decryption:
M = Cd mod n
M = 1123 mod 187 = 88


Exponentiation
~can use the Square and Multiply Algorithm
~a fast, efficient algorithm for exponentiation
~concept is based on repeatedly squaring base
~and multiplying in the ones that are needed to compute the result
~look at binary representation of exponent
~only takes O(log2 n) multiples for number n
•eg. 75 = 74.71 = 3.7 = 10 mod 11
•eg. 3129 = 3128.31 = 5.3 = 4 mod 11


Exponentiation (Algorithm for Computing ab mod n)
c = 0; f = 1
for i = k downto 0
do c = 2 x c
f = (f x f) mod n
if bi == 1 then
c = c + 1
f = (f x a) mod n
return f


Efficient Encryption
~encryption uses exponentiation to power e
~hence if e small, this will be faster
*often choose e=65537 (216-1)
*also see choices of e=3 or e=17
~but if e too small (eg e=3) can attack
*using Chinese remainder theorem & 3 messages with different moduli
~if e fixed must ensure gcd(e,ø(n))=1
*i.e. reject any p or q not relatively prime to e


Efficient Decryption
•decryption uses exponentiation to power d
~this is likely large, insecure if not
•can use the Chinese Remainder Theorem (CRT) to compute mod p & q separately. then
combine to get desired answer
~approx 4 times faster than doing directly
•only owner of private key who knows values of p & q can use this technique


RSA Key Generation
•users of RSA must:
~determine two primes at random - p, q
~select either e or d and compute the other
•primes p,q must not be easily derived from modulus n=p*q
~means must be sufficiently large
~typically guess and use probabilistic test
•exponents e, d are inverses, so use Inverse algorithm to compute the other


RSA Security
~possible approaches to attacking RSA are:
•brute force key search (infeasible given size of numbers)
•mathematical attacks (based on difficulty of computing ø(n), by factoring modulus
n)
•timing attacks (on running of decryption)
•chosen ciphertext attacks (given properties of RSA)


Methods of Attack
~Four general attacks can be perform against encrypted information:
•Ciphertext-only attack guessing the plaintext or using frequency analysis
•Known Plaintext guess using known pliantext.
•Chosen-plaintext
•Chosen-ciphertext attack
~There are also specific attacks that can be launched against encryption systems.
•Brute-Force attack
*Exhaustive key search - trying every possible combination.
•Replay attacks
*Taking encrypted information and playing it back at a later point in time.
~Man-in-the-middle attacks
~Fault in Cryptosytem


yuhuuu... walaupun ia memeningkan... kepuasan n keseronokan itu penting!.. hehehehee...


alhamdulilllah...


"It is easier to be wise for others than for ourselves.."




Read More......

Lab 2 ~The Goals of Information Technology~

Assalamualaikumm w.b.t..

Lam Lab 2 nie encek ckp blajar sndiri... so kiteorg x msk lab la time tue.... godek2 sndiri la saper yg rajin tue... ermm.. aku bacer jer la lab sheet nie.. dop tau nk kater la... Lab nie menerangkan tentang The Goals of Information Technology..
Antare objektif yang perlu dicapai adalah :-

• Understand What is Information Technology Security goals
• Determine if partition is NTFS or FAT32
• Implementing confidentiality in Windows Server 2003
• Implementing integrity in Windows Server 2003
• Implementing availibility in Windows Server 2003


Introduction The goals of Information Technology Security
In general the term “Security” is use to describe the quality or state of being secure that is to be free from danger or to be protected from those who would do harm, intentionally or otherwise. In Information Security it is refer to the protection of information and the systems and hardware that use, store, and transmit that information. Information security involves the security in an organization
regarding the application security, policies involves and Information Technology infrastructure to create a secure and protected computing environment for an organization. The goals of an Information security are confidentiality, integrity and availability.

Confidentiality
-Provides protection to computer related assets from being used by unauthorized user. Its mean only the right person who has the authority can read, view, print or even knowing the existing of the object. It also called as privacy or secrecy.

Integrity
-Ensures data can be modified by authorized parties and by authorized mechanism only. Information can be added, updated or deleted; hence it must be done in a correct ways and by the right person to ensure the correctness and validity of the information. Encryption is one of them mechanism used in providing data integrity.

Availability
-Makes sure authorized user can access information at any time without any failure. Information that is not available to the authorized user is useless, imagine if we went to the ATM machine and we cannot access to our account particular, how frustrated is that?

Using NTFS to Secure Local Resources.
Local computer security, especially at the file level, is often ignored. Most people are familiar with the Windows 9x version of Microsoft Windows, which uses FAT and does not offer local file security. NTFS, the file system for Windows server 2003, is designed with local file security in mind. To take advantage of these capabilities, we must have Windows NT, 2000, 2003, or XP with the NTFS file
system installed. It is important to note that although all of these operating systems are compatible with FAT; local file security will be enabled only if we have NTFS installed.

1. Open the winserv03 virtual machine
2. Log on to the Windows 2003 server as Administrator.
3. Click [Start].
4. Click [Run].
5. Type cmd to invoke the command line. (The FAT partition in this lab will be designated as drive letter D.)
6. At the command line type chkntfs d: to verify that the drive is not using NTFS. We will see the message, “D: is not dirty”. This means that there is no corruption on the drive.

7. To convert a FAT disk to NTFS you need to type at the command line convert d: /fs:ntfs
8. If the drive has a volume label, enter it when prompted. Windows will then convert the drive to NTFS. Note: If we convert the system partition you will have to reboot for the conversion to take place.
9. At the command line type chkntfs d: to verify that the drive is now NTFS.

10. Close all Windows and log off.

Data Confidentiality
Once a secure file system is installed, we can begin to think about data
confidentiality. Data confidentiality refers to making sure that only those intended to have access to certain data actually have that access. With the FAT file system, this is not possible at the local level, but with NTFS we can lock down both folders and files locally. NTFS can be used to protect data from intruders who may
have physical access to the computer containing the data. In this lab, we will create a folder and files, assign NTFS permissions, then verify whether or not the data is confidential.

Creating user account
1. Two user-level accounts: User1 and User2
a. To create user account go to [Start] |[Administrative Tools] | [Computer Management].
b. Choose [Local User and Groups] and double click on the [user] folder.
c. To create new user right click on the pane and from the pop-up menu choose [New User] and fill up the necessary information such as username and password (use easy to remember password e.g. abc123)

Creating data Confidentiality between 2 user accounts.
1. Log on to the Windows 2003 server as Administrator.
2. Open My Computer, and then double-click on the D: drive.This should be the drive that was converted from FAT to NTFS in task 1
3. Create a new folder called Confidentiality.
4. Double-click the Confidentiality folder and create a new folder called User1Folder.
5. To secure this folder from other users, right-click User1Folder.
6. Click [Properties] to open the User1Folder Properties window.
7. Click the [Security] tab, as seen in Figure 2.3. Note: if the drive was not formatted with NTFS the Security tab will be unavailable

8. Click on the Advanced Button, you will receive a windows

9. Uncheck the box “Allow inheritable permissions from
parent to propagate to this object”.
10. You will receive the message shown below

11. Click [Copy] to retain the permissions.
12. Click [Add] and the Select Users, Computers, or Groups window will pop up.
13. Type User1 and then click [Checks Names].

14. Click [OK].
15. In the Permission Entry windows, click the Allow Full Control box and then click [OK].
16. Remove the other username except Administrator, System and User1 by clicking the username and click the [Remove] button.

17. Click OK.
18. Double-click User1Folder.and you should see the content of the folder
19. Close all windows and log off.
20. Log on as User2 and navigate to the User1Folder, can we open it?
21. Close all windows and log off.


Data Availibility
Although it is important that data remains secure and confidential, it is just as important that the data is available when needed. Secured data that is inaccessible is considered downtime and detrimental to a business and its ability to serve customers. Technologies such as clustering and load balancing can help, but if NTFS permissions are assigned inappropriately, these features will not help.
Log on to the Windows 2003 server as Administrator.
1. Open My Computer and then double-click on the D drive.
2. Create a new folder called Availability.
3. Double-click the Availability folder and create the folder User2Folder.
4. Right-click on User2Folder.
5. Follow step 6 to 20 in the previous task to secure the folder so that only User2 can access it.
6. Log on as User2 and verify that you have access to d:\Availability\User2Folder.
7. Close all windows and log off.
8. Log on as Administrator and delete the User2 account from the local security database.
9. Create a new user, also named User2, then log off.
10. Logon as User2 and try to access the d:\Availability\User2Folder. Access should be denied.
11. Log off User2.
12. Log on as Administrator.
13. Check the Security properties of the d:\Availability\User2Folder. Notice the account is no longer listed, but the old SID is.

14. We should be denied access. The data is no longer available to User2.
15. To verify this, log on as User2 and try to open the User2Folder.We will be denied access.
16. Close all windows and log off.


Data Integrity
Once data is secured properly and available to the appropriate people, it is important to make sure that the contents of the data have not been altered accidentally or intentionally. Malicious corruption is a problem, and can be done by a virus, worm, or hacker. Accidental changes, however, can also damage data
integrity. For example, Windows 2003 file synchronization capabilities could easily lead to accidental corruption. Changes made to data that conflict with other changes to the same data can damage data integrity just as much as a hacker can.
1. Log on to the Windows 2003 server as User1.
2. Open My Computer, and then double-click the D drive.
3. Create a new folder called Integrity.
4. Double-click the Integrity folder and create a new folder called User1Folder.
5. Double-click the User1Folder folder.
6. Create a new Text document and edit the contents to say:“This document has not been modified accidentally or intentionally”.
7. Save the file as New Text Document and close the document.
8. Log off User1.
9. Log on as User2.
10. Navigate to the d:\integrity\User1Folder and remove the word “not” from the New Text Document. Because we did not assign permissions to d:\integrity\User1Folder, we can modify the contents of the file.
11. Close the file and save the changes.
12. Log off User2.

Hmmm... then lepas nie kene la wat review question cam biaser... uhuksss...

alhamdulillah

"Always put yourself in others' shoes. If you feel that it hurts you, it probably hurts the person too.."

Read More......

Lecture 2 ~Basic Cryptography~

Assalamualaikum w.b.t...

Lecture 2 nie kiteorg blajor pasal basic cryptography... ermm... semangak giler msk kelas time nie... macam best la pulakk network security nie.. ermm.. macam la tp.... lecture kali nie antare topic2 nyer:-
~Cryptography Concept
~Cryptography Algorithms
~Monoalpahbetic
~Polyalphabetic
~Transposition

Cryptography Concept
~The idea of a cipher system is to disguise information in such a way that its meaning is unintelligible to an unauthorized person.
~The two most common uses are, probably, to store data securely in a computer file or to transmit it across an insecure channel such as the internet.
~Encrypted document does not prevent unauthorized people gaining access to it but, rather, ensures that they cannot understand what they see.

The Art of secret writing





The Earliest Information Security Tool


Mechanical crypto machine in World War II

~The Enigma machine.
~During its height, it was thought to be invincible.
~It was believed to be un-crackable.

Cryptography Terminology
~plaintext - original message
~ciphertext - coded message
~cipher - algorithm for transforming plaintext to ciphertext
~key - info used in cipher known only to sender/receiver
~encipher (encrypt) - converting plaintext to ciphertext
~decipher (decrypt) - recovering ciphertext from plaintext
~cryptography - study of encryption principles/methods
~cryptanalysis (codebreaking) - study of principles/ methods of deciphering ciphertext without knowing key
~cryptology - field of both cryptography and cryptanalysis

Cryptography Algorithms
~Classified along three independent dimensions:
>The number of keys used
*symmetric (single key, or private-key encryption)
*asymmetric (two-keys, or public-key encryption)
>The type of operations used for transforming plaintext to ciphertext
*Substitution/Transposition/Product
>The way in which the plaintext is processed
*Block/Stream

Cryptanalysis
~objective to recover key not just message
~general approaches:
*cryptanalytic attack
*brute-force attack

Cryptanalytic Attacks
~ciphertext only
*only know algorithm & ciphertext, is statistical, know or can identify plaintext
~known plaintext
*know/suspect plaintext & ciphertext
~chosen plaintext
*select plaintext and obtain ciphertext
~chosen ciphertext
*select ciphertext and obtain plaintext
~chosen text
*select plaintext or ciphertext to en/decrypt

More Definitions
unconditional security
~no matter how much computer power or time is available, the cipher cannot be broken since the ciphertext provides insufficient information to uniquely determine the corresponding plaintext
computational security
~given limited computing resources (eg time needed for calculations is greater than age of universe), the cipher cannot be broken

Brute Force Search
~always possible to simply try every key
~most basic attack, proportional to key size
~assume either know / recognise plaintext


Cryptography Algorithms


Symmetric vs. Asymmetric
~If the system is symmetric, then there may be a need to distribute a secret key value before secret messages can be exchanged.
*One of the most difficult aspects of obtaining a secure system.
~If the system is asymmetric, then it may be possible to avoid this particular problem by distributing only the encryption keys, which do not need to be secret.
*However it is then replaced by the problem of guaranteeing the authenticity of each participant’s encryption key.


Symmetric Cryptography Principles


Symmetric Cryptography Requirements
~two requirements for secure use of symmetric encryption:
*a strong encryption algorithm
*a secret key known only to sender / receiver
~mathematically have:
C = EK(P)
P = DK(C)
~assume encryption algorithm is known
~implies a secure channel to distribute key


Public-Key Cryptography (Asymmetric) Principles
~The use of two keys has consequences in: key distribution, confidentiality and authentication.
~The scheme has six ingredients
*Plaintext
*Encryption algorithm
*Public key
*Private key
*Ciphertext
*Decryption algorithm

Encryption using Asymmetric Cryptography


Methods use in Cryptography Algorithm
Substitution
~monoalphabetic substitution
*Formed by shifting the letters of the original alphabet
~polyalphabetic substitution
*Extension of monoalphabetic substitution system
*Using Vigenere Tableau
Transposition
~unkeyed transposition
*Rearrange letters by using matrix
~keyed transposition
*Rearrange letters by using matrix where the size of matrix is determined by the
length of the key used.


Caesar Ciphers
~One of the earliest substitution cipher described by Julius Caesar in the Gallic Wars.
~In this cipher each of the letters A to W is encrypted by being represented by the letter that occurs three places after it in the alphabet.
~Although Caesar used a ‘shift’ of 3, a similar effect could have been achieve using any number from 1 to 25.
*In fact any shift is now commonly regarded as defining a Caesar Cipher.
~The encryption key and decryption key are both determined by a shift but the encryption and decryption rules are different.
~We could have changed the formulation slightly to make the two rules coincide and have different encryption and decryption keys.
*A shift of 26 has the same effect as a shift of 0 and, for any shift from 0 to 25,encryption with that shift is the same as decryption with the new shift obtained by subtracting the original shift from 26.
*E.g: encryption with shift 8 is the same as decryption with shift 26 - 8 =18.


Mathematically present as
~mathematically give each letter a number
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

~then have Caesar cipher as:
c = E(p) = (p + k) mod (26)
p = D(c) = (c – k) mod (26)


Caesar Cipher Exhaustive Key Search: cryptogram XMZVH



Cryptanalysis of Caesar Cipher
~only have 26 possible ciphers
*A maps to A,B,..Z
~could simply try each in turn
~a brute force search
~given ciphertext, just try all shifts of letters
~do need to recognize when have plaintext
~eg. break ciphertext "GCUA VQ DTGCM"

How to make it more secure
~rather than just shifting the alphabet
~could shuffle (jumble) the letters arbitrarily
~each plaintext letter maps to a different random ciphertext letter
~hence key is 26 letters long

Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN

Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA


Simple Substitution Ciphers (Random)
A B C D E F G H I J K L M
D I Q M T B Z S Y K V O F

N O P Q R S T U V W X Y Z
E R J A U W P X H L C N G

~For a Simple Substitution Ciphers (or monoalphabetic ciphers), we write the alphabet in a randomly chosen order underneath the alphabet written in strict alphabetical order.
~The encryption and decryption keys are equal.
~The encryption rule is ‘replace each letter by the one beneath it’ while the decryption rule is the opposite procedure
~The number of keys for a Simple Substitution Cipher is equal to the number of ways in which the 26 letters of the alphabet can be arranged.
*It is called 26 factorial and is denoted by 26! It is 26 x 25 x 24 x … x 3 x 2 x 1 which equals 403,291,461,126,605,635,584,000,000 keys.
~Although having a large number of keys is a necessary requirement for cryptography security, however having a large number of keys is certainly no guarantee that the cipher system is strong.


Examples - Simple Substitution Ciphers
~In the following examples we assume that the cryptograms given have been intercepted by someone who knows that the message is in English and that a Simple Substitution Cipher was used:
Example 1: G WR W RWL
Example 2: HKC
Example 3: HATTPT
Example 4: HATTPT (Given that the message is the name of a country)

But is it Secure Enough
~now have a total of 26! = 4 x 1026 keys
~with so many keys, might think is secure
~but would be !!!WRONG!!!
~problem is language characteristics

Language Redundancy and Cryptanalysis
~human languages are redundant
~eg "th lrd s m shphrd shll nt wnt"
~letters are not equally commonly used
~in English E is by far the most common letter
*followed by T,R,N,I,O,A,S
~other letters like Z,J,K,Q,X are fairly rare
~have tables of single, double & triple letter frequencies for various languages


Use in Cryptanalysis
~key concept - monoalphabetic substitution ciphers do not change relative letter frequencies
~discovered by Arabian scientists in 9th century
~calculate letter frequencies for ciphertext
~compare counts/plots against known values
~if caesar cipher look for common peaks/troughs
*peaks at: A-E-I triple, NO pair, RST triple
*troughs at: JK, X-Z
~for monoalphabetic must identify each letter
*tables of common double/triple letters help

Example Cryptanalysis
~given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZVUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSXEPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
~count relative letter frequencies (see text)
~guess P & Z are e and t
~guess ZW is th and hence ZWP is the
~proceeding with trial and error finally get:
it was disclosed yesterday that several informal but direct contacts have been made with political representatives of the viet cong in moscow


Vigenère Ciphers
~The Vigenère Cipher (the best known of the manual polyalphabetic cipher) uses a Vigenère Square to perform encryption.
~The left-hand (key) column of this square contains the English alphabet and for each letter, the row determined by that letter contains a rotation of the alphabet with that letter as the leading character.
*So each letter in the left-hand column gives a Caesar Cipher whose shift is determined by that letter.
*Example: the letter g gives the Caesar Cipher with shift 6.


Transposition
~Letter is rearranged
~Letter are retain but moved from its position
~Two type
*Unkeyed single transposition
*Keyed single transposition

Example: Unkeyed Single Transposition
~Encrypt the plaintext : “there is no security on this earth there is only opportunity” into a matrix of 10 (vertical) by 5 (horizontal).
~Get the ciphertext horizontally, using 5- letter words.


Example: Keyed Single Transposition
With the key “86423175”, encrypt the plaintext “ignorance is the mother of admiration” using keyed single transposition into 4 by 8 matrix. Use “x” to pad out columns.

huhhh.. fenin2 blajor cipher nie... uhuksss... tunggu ajer lecture seterusnyer nnt.. aku raser musti lg fenin + tensen... adesss....

alhamdulillahh....

"God makes a promise. Faith believes it. Hope anticipates it. Patience quietly awaits it.."





Read More......

Lab 1 ~Introduction to Virtualization & VMware~

Assalamualaikum w.b.t...

First lab kiteorg lak encek ajr Introduction to Virtualization & VMware. Mcmmane care2 nk install VMware lor bih kureng.. errmmm.... mstue kan aku ngntuk giler lam lab... sbb x cukup tdo.. coz mlm tue aku duk prepare nk present Project Management.. so msk lab pn ntah aper2 laaa..... layan ajer la encekk!....

Antare yg kiteorg blajar la nie... aku pn x konpem sbb x braper nk pay attention sgt... kepale da gelongg daa... Antare objektif yg perlu dicapai lam lab nie...

• Understand What is Virtualization
• Install VMware Workstation
• Understand the VMware Workstation Configuration
• Creating disk image on VMware Workstation
• Installing Windows Server 2003 on disk image

Virtualization
Hardware was the first part to be designed in a computer system. It is followed by the software part. Each hardware was specially designed with its own instruction set and developed with its own specific software. In the early days, this was enough to
cater for a small community where file sharing and softwaredistribution are not widely practiced. As time goes by, more and more computers are use and each of them are connected to one another, thus making rewriting and distributing software that are compatible to the hardware a major burden.The need of software that is compatible with any hardware becomes an important consideration in developing a new computer system. This can be achieved by producing hardware that has a
standard feature. One way to achieve this is by defining and controlling the interface between hardware and software. This is where the concept of Instruction Set Architecture (ISA) was introduced.

Virtual Machine
Virtual machine (VM) is defined as an efficient and isolated duplicate of a real machine. This environment is created by using Virtual Machine Monitor (VMM) which provides a second layer on a machine for another operating system to run on it. VMM reproduces everything from the CPU instruction to the I/O devices in software
of operating system which it run on. Virtualization in VM involves mapping of virtual resources, for example, the register and memory to real hardware resources and it also use the host machine instruction to carry out the actions specified by VMM. This is done by emulating the host ISA.

Below is the step how to install VMware Workstation.. hmm.. ikut jer la step2 nie...

VMware Workstation Installation
VMware Workstation Can be Downloaded from http://www.vmware.com/download/ws/

1. Double Click on the VMware launcher to start the installation Wizards.

2. Click on [Next].

3. Choose Typical setup type
4. Choose the location for VMware Workstation installation,example: C:\Program Files\WMware\VMware Workstation\,Click on [Next].

5. Configure the shortcuts for the VMware Workstation and click [Next].
6. Click on [Install], this will take several minutes to finish.

7. Enter the Serial Number for the VMware workstation.

8. Click [Finish], and restart the Computer.




Creating Disk Image
1. From the home tab click on [New Virtual Machine], to open the virtual machine wizard

2. Click [Next] to continue.
3. Choose the typical configuration, click [Next]
4. Choose the type of OS to be installed on the virtual machine. As the next task the virtual machine will be installed with Windows Server 2003, select [Microsoft
Windows] as the guest. In the version list, select Windows Server 2003 Standard Edition. Click [Next].

5. Name the virtual machine and specify the location where the disk image for the virtual machine will be stored in the hard disk. Name the virtual machine as winserv03.

6. For the network type select [Use host-only Networking], this selection will create LAN between the other virtual machine.In order to make the virtual machine connected to the real network select [Use bridged networking]. This setting can be
changed once the virtual machine is created. Click [Next].

7. Specify the disk capacity of the virtual machine. This option will let user to specify the maximum storage capacity of the virtual machine. Initially the size of the disk image you created is small and as you installed your virtual machine
with OS and other software, the size will increase up to the storage capacity set in this configuration. In this task set the storage capacity between 2GB to 4GB (Depends on the size of your PC). Select [Allocate disk space now] and click
[Finish] to start creating your virtual machine. This will take
several minutes.

8. Once your disk image that holds you virtual machine is created you will see figure 1.14. Click [Close]


Get to know the virtual machine console
Once the virtual machine is created, the tab will contain the home and summary view of winserv03 virtual machine configuration.


Installing Windows Server 2003 on virtual machine.
1. Place the Windows Server 2003 installer CD in your cdrom drive
2. From the command menu click on [start the virtual machine] or you can click on the start button on the toolbar, your virtual machine is starting and will be booting from your cdrom drive.


3. Once the winserv03 booting you will see the familiar windows server 2003 installation page, from this point onward you can follow the windows server 2003 installation step.
4. After the installation process is finish, you will see the windows server 2003 login page.

5. Click on the console to start using the windows server 2003,to get the mouse pointer back to your host desktop, type CTRL + ALT on the keyboard.
6. You can try taking the snapshot of your OS by clicking on the [snapshot] button on the toolbar. If anything happened to your OS you can simply click the [Revert] button and choose your previous state.
7. You can also manage the size of your console screen by click on the {Quick switch] and [Full Screen] view option button on the toolbar.

Daa... abes daaa lab 1 duk blajar cara2 nak install VMware.. then lepas tue kene la wat review question... ermmm... jwb jgn x jwb.... surf tenet sudaahh...

Alhamdulillahh...

"God looks not to the quantity of the gift but to the quality of the giver.."

Read More......

Lecture 1 ~ Introduction to Information Security ~

Assalamualaikum w.b.t

First lecture encek ajr Introduction to Information Security.. Nie semue intro ajer dulu... Antara topics lam lecture 1 nie : -
~What is security?
~Security Architecture
~Security Principles
~Security Policy
~Security Attacks / Threats
~Methods of Defense
~Security Services
~Security Mechanisms

What is Security ?
Definition:
~Security is the quality or state of being secure that is to be free from danger and to be protected from adversaries – from those who would do harm, intentionally or otherwise
Information Security:
~Information Security is the protection of information and the systems and hardware that use, store, and transmit that information

Security Trends



Security Area


Security Architecture
~Defined by ITU-T Recommendation X.800 that called OSI Security Architecture.
~Useful to managers as a way of organizing the task of providing security
~Architecture was developed as an international standard, computer and communications vendors have developed security features for their products and services that relate to the structured definition of services and mechanisms.
~Focuses on security attacks, security mechanisms and security services.

Security Principles



Security Policy
~Set of rules to apply to security relevant activities in a security domain
~Level of security policy: objectives, organizational and system.
~Key aspects of security policy: authorization, access control policy, accountability


Security Attacks / Threats


Passive Attacks : Release of Message Contents



Passive Attacks : Traffic Analysis



Active Attacks : Masquerade



Active Attacks : Replay



Active Attacks : Modification of Messages



Active Attacks : Denial of Service



Passive Attack vs. Active Attack
Passive Attack :
~Very difficult to detect. Why?
~Feasible to prevent the success of these attacks. How?
~Emphasis in dealing with passive attacks is on prevention rather than detection. Why?

Active Attacks :
~Quite difficult to prevent active attacks. Why?
~Instead, the goal is to detect active attacks and to recover from any disruption or delays caused by them.
~If the detection has a deterrent effect, it may also contribute to prevention.

Methods of Defense
~We can deal with harm that occurs when a threat is realized against a vulnerability in several ways:
~Prevent it, by blocking the attack or closing the vulnerability.
~Deter it, by making the attack harder, but not impossible.
~Deflect it, by making another target more attractive.
~Detect it, either as it happens or some time after the fact.
~Recover from its effects.

Methods of Defense:Controls
~Encryption
~Software Controls - access limitations in a data base, in operating system protect each user from other users
~Hardware Controls –smartcard
~Policies - frequent changes of passwords
~Physical Controls

Methods of Defense:Software Controls
Program controls include:
~Internal program controls: part of the program that enforce security restrictions, such as access limitations in a database management program.
~Operating system and network system controls: limitations enforced by the operating system or network to protect each user from all other users.
~Independent control programs: application programs, such password checkers, intrusion detection utilities or virus scanners, that protect against certain types of vulnerabilities.
~Development controls: quality standards under which a program is designed, coded, tested and maintained, to prevent software faults from becoming exploitable vulnerabilities

Methods of Defense:Hardware Controls
Numerous hardware devices have been created to assist in providing computer security. These devices include a variety of means, such as:
>Hardware or smart card implementations of encryption
>Locks or cables limiting access or deterring theft
>Devices to verify user’s identities
>Firewalls
>Intrusion detection systems
>Circuit boards that control access to storage media

Methods of Defense:Policies & Procedure Controls
~Controls can also be in place based on agreed-upon procedures or policies among users, rather than enforcing security through hardware or software means.
~Training and administration follow immediately after establishment of policies, to reinforce the importance of security policy and to ensure their proper use.

Methods of Defense:Encryption Controls
~Encryption is the formal name for scrambling data so that interpretation is meaningless without the intruder’s knowing how the scrambling was done.
~Encryption can virtually nullify the value of an interception and the possibility of effective modification or fabrication.
*It clearly addresses the need for confidentiality of data.
*It also can be used to ensure integrity.
~Encryption is the basis of protocols that enable us to provide security while accomplishing an important system or network task.

Methods of Defense:Effectiveness of Controls
~Principle of effectiveness: Controls must be used and used properly to be effective.
~There are several aspects that can enhance the effectiveness of controls:
*Awareness of problem
*Likelihood of use
*Overlapping controls
*Periodic review

Security Services
Defined by X.800:
~A security service as a service provided by a protocol layer of communicating open systems which ensure adequate security of the systems or of data transfers.
Defined by RFC 2828:
~A processing or communication service that is provided by a system to give a specific kind of protection to system resources where security services implement security policies and are implemented by security mechanisms.

~Authentication - assurance that the communicating entity is the one claimed
~Access Control - prevention of the unauthorized use of a resource
~Data Confidentiality –protection of data from unauthorized disclosure
~Data Integrity - assurance that data received is as sent by an authorized entity
~Non-Repudiation - protection against denial by one of the parties in a communication

Security Services: 5 Categories & 14 Specific Services



Security Services:Data Integrity



Security Services:Data Confidentiality



Security Services:Authentication



Security Services:Nonrepudiation



Security Mechanism
~Security mechanism is any process (or a device incorporating such a process) that is designed to detect, prevent or recover from a security attack.
~Security mechanisms exist to provide and support security services and was defined by X.800
~Divided into two classes: those that are implemented in a specific protocol layer and those that are not specific to any particular protocol layer or security services
*Specific Security Mechanisms
*Pervasive Security Mechanisms

Lecture Summary
~Due to the technology era today, information security is made more importance implemented in most of organization.
~Studying information security is also importance due to the demand career in this area.
~Most of the major requirements for security services can be given self-explanatory one word labels:
*Confidentiality, authentication, nonrepudiation, integrity

hmm... tue jer la pengenalan tentang Information Security nie... Laen lecture kiter juper lg encek... yuhuuuu...

"Great minds discuss ideas, normal minds discuss events, small minds discuss people."

Read More......
Related Posts with Thumbnails