Wednesday, 5 August 2015

Computer and Network Security - Better Safe than Sorry

According to English literature, Security is the state of being safe from danger or threat. In the contemporary world, most of the organization relies on their respective Information Systems that include human resource and combination of Hardware and Software. Information system that serves the purpose of the daily transaction of the organization involves the sharing of information between information systems connected through public network called Internet. As the nature of the internet is public, there exist threats like intruders and viruses that lead to the negative impact on the information system resulting loss of information and finally loosing reputation of the organization. Thus there is a dire need of security aspect which is categorized in to Network Security Applications and System Security Applications. Security aspects related to web server and web client fall into category of Computer or System Security. Security concern that ensure the data traffic satisfying confidentiality, authentication and data integrity during the transmission fall into the category of Network Security. Both Computer security and Network Security works on the top of Cryptography which is art of secret writing. Cryptography includes two categories of encryption algorithms such as Public Key (Asymmetric) Cryptography and Secret (Symmetric) key Cryptography.

Symmetric key Cryptography involves the transposition and substitution which are performed at greater speed by the computer. Hence symmetric key cryptography is employed in the case of large message encryptions. Key overhead issue in the symmetric key cryptography is resolved in public key cryptography by adopting concept called public key and private key for each entity. Public key cryptography involves the mathematics operations which are performed bit slower than transposition and substitution in symmetric cryptography. Thus public key cryptography is being used in encrypting smaller messages like secret keys and also in the case of secure key exchange between two entities. Messages encrypted by private key of the sender always ensure the authentication and provides Digital Signature. Cryptography which is basis for the Network Security Applications include IP Security (IPSec), E-mail Security (PGP, PEM & S/MIME), Key distribution with User Authentication ( Kerberoes & X.509 Directory), Transport Layer Security ( TLS, SSL, SET). There exist various System security Applications like Virus Counter Measures, Trusted Systems, Firewalls and Intrusion Detection System. These applications control the access to the computer resources and perform the auditing and logging the various events of a system. 

Safe transactions that are happening around the world digitally are just because of the great work done by researchers of Cryptography and Network Security. I feel responsible to acknowledge them and my teachers who enlighten me in this domain of Security. 

-------------------------------------------------------------
Article By:
Sravan Kumar G
Asst. Professor
CSE Department
Sphoorthy Engineering College

Sphoorthy Engineering College






Data Structures

The way the data is organized in the memory is called data structure.

It is a representation of the logical relationship among individual elements of data.


------------------------------------------------------------
Article By:

A.Sunitha,
Associate Professor, 
CSE Department, 
Sphoorthy Engineering College

Sphoorthyh Engineering College



Different Versions of Java

How JAVA was implemented from time to Time:

Java 1.0
Java 1.0 is started from January 23, 1996
Its originally  called Oak.
The first stable version is java 1.0.2.

Java 1.1
Java 1.1 is Started from February 19, 1997    
Features added:
- Retooling of the AWT event model
- Inner classes added to the language
- JavaBeans
- JDBC
- RMI                                                                      
- Reflection which supported introspection only.

Java 1.2
Features added: 
       -keyword Strictfp is added                                  
- reflection which supported introspection only
- Swing api integration into the core classes
- JVM equipped with a jit compiler
- Java plug-in
- Java IDL
- An IDL implementation for corba interoperability
- Collections Framework

Java 1.3
Features added: 
- Hotspot jvm included
- Java Sound

- JNDI included in core libraries
- Java platform debugger architecture (jpda)
- RMI was modified to support optional compatibility with corba

Java 1.4
Features added: 
- assert keyword
- Regular expressions
- Exception chaining (allows an exception to encapsulate original lower-level exception)
- Internet protocol version 6 (IPV6) support
- Non-blocking nio (new input/output)
- Logging API
- Image i/o api for reading and writing images in formats like jpeg and png
- Integrated XML parser and XSLT processor (JAXP)
- Integrated security and cryptography extensions (JCE, JSSE, JAAS)
- Java web start

Java 5
Features added: 
- Generics: provides compile-time (static) type safety for collections and eliminates the need for most typecasts (type conversion).
- Metadata: also called annotations; allows language constructs such as classes and methods to be tagged with additional data, which can then be processed by metadata-aware utilities.
- Auto boxing/un boxing: automatic conversions between primitive types (such as int) and primitive wrapper classes (such as integer).
- Enumerations: the enum keyword creates a typesafe, ordered list of values (such as day.monday, day.tuesday, etc.). Previously this could only be achieved by non-typesafe constant integers or manually constructed classes (typesafe enum pattern).
- Swing: new skinnable look and feel, called synth.
- Var args: the last parameter of a method can now be declared using a type name followed by three dots (e.g. Void drawtext(string... Lines)). In the calling code any number of parameters of that type can be used and they are then placed in an array to be passed to the method, or alternatively the calling code can pass an array of that type.
- Enhanced for each loop: the for loop syntax is extended with special syntax for iterating over each member of either an array or any iterable, such as the standard collection classesfix the previously broken semantics of the java memory model, which defines how threads interact through memory.
- Automatic stub generation for rmi objects.
- Static imports concurrency utilities in package java.util.concurrent.
- Scanner class for parsing data from various input streams and buffers.
- Assertions
- StringBuilder class (in java.lang package)
- Annotations

Java 6
Features added: 
- Support for older win9x versions dropped.
- Scripting lang support: Generic API for integration with scripting languages, & built-in mozilla javascript rhino integration
- Dramatic performance improvements for the core platform, and swing.
- Improved web service support through JAX-WS JDBC 4.0 support
- Java compiler API: an API allowing a java program to select and invoke a java compiler programmatically.
- Upgrade of JAXB to version 2.0: including integration of a stax parser.
- Support for pluggable annotations
- Many GUI improvements, such as integration of swingworker in the API, table sorting and filtering, and true swing double-buffering (eliminating the gray-area effect).

Java 6 update 10
A major enhancement in terms of end-user usability.
- Java Deployment Toolkit, a set of javascript functions to ease the deployment of applets and java web start applications.
- Java Kernel, a small installer including only the most commonly used jre classes. Enhanced updater.
- Enhanced versioning and pack200 support: server-side support is no longer required.
- Java quick starter, to improve cold start-up time.
- Improved performance of java2D graphics primitives on windows, using direct3D and hardware acceleration.
- A new Swing look and feel called NIMBUS and based on synth.
- Next-generation java plug-in: applets now run in a separate process and support many features of web start applications.

Java 6 update 12
This release includes the highly anticipated 64-bit java plug-in (for 64-bit browsers only), windows server 2008 support, and performance improvements of java and JAVAFX applications

Java 6
Features added:
- Support for older win9x versions dropped.
- Scripting lang support: Generic API for integration with scripting languages, & built-in mozilla javascript rhino integration
- Dramatic performance improvements for the core platform, and swing.
- Improved web service support through JAX-WS JDBC 4.0 support
- Java compiler API: an API allowing a java program to select and invoke a java compiler programmatically.
- Upgrade of JAXB to version 2.0: including integration of a stax parser.
- Support for pluggable annotations
- Many GUI improvements, such as integration of swingworker in the API, table sorting and filtering, and true swing double-buffering (eliminating the gray-area effect).

Java 7
Features Added:
- Upgrade class-loader architecture: A method that frees the underlying resources, such as open files, held by a URLClassLoader
- Concurrency and collections updates: A lightweight fork/join framework, flexible and reusable synchronization barriers, transfer queues, concurrent linked double-ended queues, and thread-local pseudo-random number generators.
- Internationalization Upgrade: Upgrade on Unicode 6.0, Locale enhancement and Separate user locale and user-interface locale.
- More new I/O APIs for the Java platform (NIO.2), NIO.2 filesystem provider for zip/jar archives, SCTP, SDP, TLS 1.2 support.
- Security & Cryptography implemented Elliptic-curve cryptography (ECC).
- Upgrade to JDBC 4.1 and Rowset 1.1.
- XRender pipeline for Java 2D, Create new platform APIs for 6u10 graphics features, Nimbus look-and-feel for Swing, Swing JLayer component, Gervill sound synthesizer.
- Upgrade the components of the XML stack to the most recent stable versions: JAXP 1.4, JAXB 2.2a, and JAX-WS 2.2.
- Enhanced MBeans." Support for dynamically-typed languages (InvokeDynamic): Extensions to the JVM, the Java language, and the Java SE API to support the implementation of dynamically-typed languages at performance levels near to that of the Java language itself
- Strict class-file checking: Class files of version 51 (SE 7) or later must be verified with the typechecking verifier; the VM must not fail over to the old inferencing verifier.
- Small language enhancements (Project Coin): A set of small language changes intended to simplify common, day-to-day programming tasks: Strings in switch statements, try-with-resources statements, improved type inference for generic instance creation ("diamond"), simplified varargs method invocation, better integral literals, and improved exception handling (multi-catch).

Java8
Code name is Spider. Features Added:
- JSR 335, JEP 126: Language-level support for lambda expressions.
- JSR 223, JEP 174: Project Nashorn, a JavaScript runtime which allows developers to embed JavaScript code within applications.
- JSR 308, JEP 104: Annotation on Java Types.
- Unsigned Integer Arithmetic.
- JSR 337, JEP 120: Repeating annotations.
- JSR 310, JEP 150: Date and Time API.
- JEP 178: Statically-linked JNI libraries.
- JEP 153: Launch JavaFX applications (direct launching of JavaFX application JARs).
- JEP 122: Remove the permanent generation.
- Java 8 is not supported on Windows XP. But as of JDK 8 update 5, it still can run under Windows XP after forced installation by directly unzipping from the installation executable.

-------------------------------------------------------------
Article By: 
A.Srilakshmi
Assistant Professor

CSE Department
Sphoorthy Engineering College


Sphoorthy Engineering College

Pointers in C

C language has become popular because of pointers. Pionters are introduced first in C.

Pointer is a special type of variable which stores the address of the variable of similar data type.

Whereas the normal variable will store only values. Every pointer will occupy equal amount of memory(2 or 4 bytes), because it stores only the address and address is always a numeric value.

The memory a program uses  is divided into four different areas:

i. The code area, where the compiled program sits in memory.
ii. The global  area , where global variables are stored.
iii. The heap, where dynamically allocated variables are allocated from.
iv. The stack, where parameters and local variables are allocated from.

Pointers can be used with a normal variable , arrays , functions structures. 

Using pointers we can achieve 

i. Dynamic memory allocation
ii. Call be reference.

Using pointers we can make a function to return more than one value.

Pointer plays a very important role in creating trees and graphs , where we use self-referential structuresFor developing those applications.

----------------------------------------------------------------
Article By:
Kaja Masthan
Assistant Professor
CSE Department
Sphoorthy Engineering College

Sphoorthy Engineering College




Morphing in Computer Graphics

Transformation of object shapes from one form to another morphing
Morphing methods can be applied to any motion or transition involving a change in shape
Given two key frames for an object transformation. Adjust the object specification in one of the frame so that the number of polygon edge is the same for the two frames.

This pre-processing step is illustrated in below figure.

A straight –line segment in key frame K is transformed into two line segments in key frame K+1.

As key frame K+1 has an extra vertex, add a vertex between vertices 1 and 2 in key frame K to balance the number of vertices in the two key frames.

Use linear interpolation to generate the in-betweens, transits the added vertex in the key frame K into   vertex 3 along the straight line as shown in the below figure.
The triangle linearly expanding into quadrilateral


Suppose to equalize the edge count, and parameters Lk and LK+1  denote the number of line segments in two consecutive frames. 

Then define

LMAX = max (Lk, LK+1)

LMIN = min (Lk, LK+1)

The preprocessing is accomplished by 

1. Dividing  Ne edge of key frame min into Ns+1  sections
2. Dividing the remaining lines of key framemin into  Ns sections

Example

 If  Lk = 15 and LK+1 = 11

Divide 4 lines of keyframek+1 into 2 sections each. The remaining lines of are left intact.

If vertex count is equalized, use parameters VK and VK+1 to denote the number of vertices in the two consecutive frames.

Here

Vmax = max (VK , VK+1)       Vmin = min (VK , VK+1)  
And     Nls = (Vmax – 1) mod (Vmin -1)
            Np = int (Vmax – 1)/ (Vmin -1)

Preprocessing using vertex count is performed by 

1. Adding  Np  points to Nls  line sections of keyframemin
2. Adding Np - 1  points to the remaining edges of keyframemin

For the triangle to quadrilateral example, VK = 3 and VK+1  = 4

Both Nls and Np are 1, so add one point to one edge of key frame, no points would be added to the remaining lines of keyframek+1

Simulating Accelerations

If vertex positions at key frames are given, then fit the positions with linear or nonlinear paths.


Figure below illustrates a non linear fit of key frame positions

This determines the trajectories for the in-betweens. To simulate accelerations, adjust the time spacing for in-betweens.

For constant speed, use equal – interval time spacing for the in-betweens.

Suppose if n in-betweens are needed for key frames at times t1and t2, the time interval between key frames is then divided into n+1 sub intervals, yielding an in-between spacing of
                                              ∆t = t2 – t1
                                                        N+1
Calculate the time for any in-betweens as
                              
                       tBj = t1+ j∆t , j=1,2,3,--------n

And determine the values for coordinate positions, color, and other physical parameters.

The start- up and slow- down portions of an animation path is modeled with sp line (or) trigonometric functions.

Parabolic and Cubic time functions have been applied to acceleration modeling.

Trigonometric functions are more commonly used in animation package.

To model increasing speed, the time spacing between frames is increased, so that greater changes in position occur as the object move faster.

The increasing interval size is obtained with the function 1- COSθ, 0< θ<π/2

For n in-betweens the time for jth in-between is calculated as 

              tBj   = t1 + ∆t[1 – cos(jπ/2(n+1)], j=1,2,------n


Example

Figure below illustrates a plot of trigonometric acceleration function and the in-betweens spacing for n = 5.


Model  the decreasing speed with sinθ in the range of  . The time position of an in-between is defiened as 
tBj = t1+ ∆t sin j π/2(n+1) , j=1,2,3,--------n

The plot ok the function and the decreasing size of the time intervals is shown in below figure


Motion contain both speed-ups and speed-downs 

To model a combination of increasing – decreasing speed by first increasing the in-between time spacing, then decrease this spacing.

The function accomplished for this time changes is

½(1 – COSθ )     0<θ<π/2

The time for jth in-between is calculated os 

     tBj  = t1 + ∆t { 1 – COS[j π/(n+1)]/2}  j=1,2,3,4-------------n

Processing the in-between is simplified by initially modeling “skeleton” objects.

This allows interactive adjustment of motion sequences.

After the animation sequence is completely defined objects can be fully rendered.

Motion Specifications

There are several ways in which the motion of objects can be specified in an animation system

Direct Motion Specification

The straight forward method o defining a motion sequence is direct specification of motion parameters.
The rotation angles and translation vectors are given explicitly
Then the geometric transformation matrices are applied to transform coordinate positions.
Use an approximating equation to specify certain kinds of motions.
Approximate the path o a bouncing ball, for instance, with a damped , rectified , sine curve

A  -  initially amplitude
W – Angular frequency
Θ – is the phase angle
K – damping constant

These methods can be used for simple user program animation sequences.

Goal – Directed Systems

The systems are referred to as goal directed because they determine specific motion parameters which are given of the animation.

Example

Specify an object to “walk” or to “run” to a particular destination (or) state the object to “pick up” some other specified object.
The input directives are then interrupted in terms of component motions that will accomplish the selected task 
Human motions, for instance, can be defined as an hierarchical structure of sub motions for the torso , limbs and so forth.

Kinematics and Dynamics

Animation sequence can be constructed using kinematic (or) dynamic descriptions.
With a kinematic description , the animation can be specified by giving motion parameters with out reference to the forces that cause the motion.
Kinematic specification of motion can also be given by simply describing the motion path. This is often done using sp line curves.
An alternative approach is to use inverse kinematics 
This method is often used for complex objects by giving positions and orientations of an end node of object, such as hand (or) foot.
The system then determine the motion parameters of other nodes to accomplish the desired motion
Dynamic descriptors, require the specification of the forces that produce the velocities and accelerations
Descriptors of object behaviour under the influence of forces are generally referred as physically based modelling.
Applications of physically based modelling include complex rigid – body systems and such non rigid systems as cloth and plastic materials.

---------------------------------------------------------------------------
Article By:
S.Guru Jyothi
Asst.Prof.
CSE Department
Sphoorthy Engineering College

Sphoorthy Engineering College


TYPES OF SCANNER GENERATOR TOOLS

Lex : lex was developed in 1970 at bell laboratories by mike lesk and eric Schmidt. It was made available as part of the Unix operating system and its variants. It generates the c code for the scanner from the given lexical specification .lex is also a part of the portable operating system interface standards.

Flex : it is also known as fast lexical generator and is similar to lex. It was written in the c language by Vern Paxson in 1987. The C++ version of flex is flex++.it is available in UNIX  and UNIX-variant  operating systems.

JLEX: it is written for scanning java program. Elliot Berk at Princeton university developed this tool, and it is now mainted by C. Scott Ananian. JLex can handle Unicode.

Regal : It is a scanner software that helps in realizing the finite state machine from the given regular  expressions. For each transitions in the finite state machine, actions such as sending the token to the parser or displaying an error message can be associated with it. Its output code can be made compatible with C, C++, Objective-C,D, Go, Java or Ruby code. Ragel was developed by Adrian Thurston in 2000 and was released under GNU.

Java CC( Java Compiler Compiler) : JavaCC is a lexical analyser tool and is available os open source. It is similar to lex. Sri ram Sankar and Sreeni Viswanadha developed Java CC in 1996, and it is now owned by Sun Microsystems. It falls under the Berkeley software Distribution(BSD) license. Java CC generates both scanner and parser program on interpreting the specification file.

Quex: This is also similar to lex. It generates C and C++ codes for scanning. Some of the features of these tools are(a) the scanner produced by this tool is more similar to a hand-written code than the table-based code and (b) it supports Unicode characters. It was developed by Ing. Frank-Rense Schafer in 2001 and is licensed under GNU Library General Public License (LGPL). More details can be found at http://quex.sourceforge.net/.

--------------------------------------------------------------------
Article By:
A. Sunitha
Associate Professor
CSE Department
Sphoorthy Engineering College


Sphoorthy Engineering College



UNIFIED MODELING LANGUAGE

The main purpose of learning this language is to design diagrams which also represent to design phase of Waterfall Model.

In this language we mainly learn about the construction of 9 diagrams. Among 9 diagrams 4 are static and 5 are dynamic.

The static diagrams are 

1) Class Diagram
2) Object Diagram
3) Component Diagram and 
4) Deployment Diagram.

The dynamic diagrams are 

1) Use Case Diagram
2) Sequence Diagram
3) Collaboration Diagram 
4) Activity Diagram,
5) State Chart Diagram

The class Diagram and Object Diagram represent the structure of the entire system. so  they can also be called as Structure Modeling Diagrams.

The Component Diagram and Deployment Diagram represent the architecture of the entire system. So they can also be represented as Architectural Modeling Diagrams.

The Sequence Diagram represent the “Time Ordering of Messages” and Collaboration Diagram represent the “Entire Organizational flow of Messages”. So they can also be represented as Interaction Diagrams.

 The Use Case Diagram represents the entire behavior of the system and Activity Diagram represent the control flow of the system. So the can also be represented as the Behavior Modeling Diagrams.
The State Chart Diagram represent different types of states and how to connect these states.

Among all Diagrams the main and important Diagrams which have to be used for designing any system are

1) Class Diagram
2) Use Case Diagram
3) Sequence Diagram
4) Collaboration Diagram 
5) Activity Diagram.

---------------------------------------------------------------------------
Article By:

S.Guru Jyothi
Asst. Prof.
CSE Department

Sphoorthy Engineering College


Sphoorthy Engineering College