elated
with a vengeance
fumble
talk/speak out of turn
in seclusion
dizziness
drowsiness
Usage of "were to"
http://www.englishpage.com/conditional/wereto.html
Thursday, November 12, 2009
Monday, November 9, 2009
Linux/Unix Programming
Limits of handles etc:
http://www.moythreads.com/wordpress/2009/12/22/select-system-call-limitation/
Commands:
Touching all files in a directory including subdirectories :
find ./ -type f -exec touch "{}" \;
Viewing system name
uname
Setting environment variable:
export ENV_VAR=
Unsetting environment variable:
unset ENV_VAR
Viewing environment variables
env
Viewing processes running on the system
ps -a
http://www.moythreads.com/wordpress/2009/12/22/select-system-call-limitation/
Commands:
Touching all files in a directory including subdirectories :
find ./ -type f -exec touch "{}" \;
Viewing system name
uname
Setting environment variable:
export ENV_VAR=
Unsetting environment variable:
unset ENV_VAR
Viewing environment variables
env
Viewing processes running on the system
ps -a
Tuesday, November 3, 2009
Java
To view free audio / flash tutorials on Java see the following:
http://www.jeogrip.com
http://www.javavideotutes.com
Java for desktop/servers use is available in the form of Java SE. The JDK (Jave SE Development kit) can be downloaded from http://java.sun.com/javase/downloads/index.jsp.
Books:
The Sun Java Series contains good book on Java. For an introductory text covering Java SE 6 "The Java Tutorial 4th Edition" is good.
Key points :
1. Java doesn't support Multiple inheritance, which is supported by C++.
2. Java implements namespaces through packages.
3. interface defines the contract that the class implements, and is enforced by the compiler.
Notable differences b/w C++ and Java :
1. No support for Multiple Inheritance.
2. No support for Pointers.
3. No support for preprocessor directives.
4. Everything should belong to a class, even the main method.
5. New for statement syntax : for( int a = arrayOfInts) { //.... };
6. By default, reference are created to object and arrays. In C++, you need to explicity create a reference by using &. Primitive data types in Java don't use references.
7. Object need to be explicity free in C++, where automatic garbage collection is done in Java.
http://www.jeogrip.com
http://www.javavideotutes.com
Java for desktop/servers use is available in the form of Java SE. The JDK (Jave SE Development kit) can be downloaded from http://java.sun.com/javase/downloads/index.jsp.
Books:
The Sun Java Series contains good book on Java. For an introductory text covering Java SE 6 "The Java Tutorial 4th Edition" is good.
Key points :
1. Java doesn't support Multiple inheritance, which is supported by C++.
2. Java implements namespaces through packages.
3. interface defines the contract that the class implements, and is enforced by the compiler.
Notable differences b/w C++ and Java :
1. No support for Multiple Inheritance.
2. No support for Pointers.
3. No support for preprocessor directives.
4. Everything should belong to a class, even the main method.
5. New for statement syntax : for( int a = arrayOfInts) { //.... };
6. By default, reference are created to object and arrays. In C++, you need to explicity create a reference by using &. Primitive data types in Java don't use references.
7. Object need to be explicity free in C++, where automatic garbage collection is done in Java.
Thursday, October 22, 2009
C
C can be called as a vanilla language in today's scenario, lacking all object oriented programming features. There are many language elements in C which are unique to it (and the languages derived or based on it).
Ten important concepts that all C programmers should know:
1. Scope - Local, global, file
2. Conversion of integers into binary, hexadecimal and octal forms. Representation of these constants in C.
3. Usage of standard library functions for input,output,string handling, date-time,dynamic memory allocation, assert,abort,error etc.
4. Usage of Bitwise Operations - Setting a bit, Clearing a bit, Toggling (inverting) a bit, checking a bit.
5. What is the use of pointers to pointers?
6. Difference between structure and union.
7. Pointer Arithmetic. Difference between *ptr++, *++ptr, (*ptr)++, ++*ptr.
8. Pointer to functions.
9. Usage of const with normal variables, pointers, in function parameters.
10.
Ten important concepts that all C programmers should know:
1. Scope - Local, global, file
2. Conversion of integers into binary, hexadecimal and octal forms. Representation of these constants in C.
3. Usage of standard library functions for input,output,string handling, date-time,dynamic memory allocation, assert,abort,error etc.
4. Usage of Bitwise Operations - Setting a bit, Clearing a bit, Toggling (inverting) a bit, checking a bit.
5. What is the use of pointers to pointers?
6. Difference between structure and union.
7. Pointer Arithmetic. Difference between *ptr++, *++ptr, (*ptr)++, ++*ptr.
8. Pointer to functions.
9. Usage of const with normal variables, pointers, in function parameters.
10.
C++
C++, as the name indicates is the successor of C. It has many features which builds on the foundation provided by C:
Note that in C++ a class object is created like this:
Box box; //Creates a class object. This is unlike C# where it will just creates a reference.
Box *box = new Box(); //This is also valid for C++. C# doesn't provide pointers.
A class which defines any of these three member functions, should also define the rest of these:
Copy Constructor,
Copy Assignment Operator,
Destructor
These three are automatically created by the compiler if they are not defined in a class. See Rule of Three
Main concepts :
1. Overloaded functions : In C++, more than one function can have the same name. They are differentiated based upon type and no. of parameters passed. This helps in doing slightly different tasks with slightly different parameters. The same task can be also be done, with different parameters. Name mangling is used to deal with problem of same identifier for function names. Linkages are performed using keyword such as extern "C".
2. new and delete operators.
Usage : ptr = new int[4]; delete [] ptr;
3. Reference variables : These are unlike pointers aliases to actual variables. A reference variable is created like this:
int a;
int& b = a;
Note that reference variables are always initialized. They can be used to do pass by reference when calling functions. Pointers can be kept non-initialized but reference should be always initialized.
4. Encapsulation : It's the mechanism by which the interface and behavior of a user-define data type is tied to the implementation and representation. By using encapsulation in object oriented programming, the user defined data types can be viewed in the same way as intrinsic data type.
5. Function Templates : Using function templates the same function template can be used for several types of parameter and return values. It implements the parameterized data types concept.
6. Class : A Class encapsulates data and algorithm that operate on it to form a abstract user-defined data type. Concepts like operator overloading, conversion member functions, default constructors make C++ class same as intrinsic data types.
7.Abstract classes : These classes cannot be instantiased because they contain pure virtual functions.
8.Virtual Functions : Virtual functions are class member functions that can be overridden in derived classes. An abstract class contains atleast one pure virtual function. If the derive class doesn't override the pure virtual function(s), then it also becomes an abstract class. Virtual functions use dynamic binding, to resolve the calls at runtime.
9. Virtual destructors : When an base type containing object of derived type, is freed, the destructor of base class gets called. The destruction of derived class doesn't gets called if the destructor is not declared virtual.
10. Static Member functions and fields : When a field is declared static, inside a class, it can be use without creating an instance of that class. A static member function can be called without specifying any instance.
11. Friend class and friend functions: Friend classes have access to private data members of a class. Likewise friend functions have access to private fields of a class. These functions can be either member functions of other class or function not belonging to any class.
12. STL : STL stands for Standard Template Library which contains serveral classes that can be used for generic data structures implementation like linked lists (list) , map, multimap etc.
13. Copy Constuctore : A copy constructor get called when a new object of the class in which it's defined gets created, and a reference to an existing object of the same class is passed. A copy constructor is defined as follows:
Box::Box(const Box& box)
{
....
....
}
The copy constructor gets called in either of the following ways:
Box Box1;
Box box2 = box1;
Box box2(box1);
14. Conversion Functions : A Conversion function converts between any type and class type. It's defined as follows:
Member Conversion Function : Converts class objects to other types.
operator type(); //where type is the type to convert
For example : operator long();
Class Coversion function : Converts other types to class type.
A class constructor conversion function can be defined as follows:
Box::Box(long a)
View some video tutorials
http://www.deathmonkeyz.com/tutorials
Note that in C++ a class object is created like this:
Box box; //Creates a class object. This is unlike C# where it will just creates a reference.
Box *box = new Box(); //This is also valid for C++. C# doesn't provide pointers.
A class which defines any of these three member functions, should also define the rest of these:
Copy Constructor,
Copy Assignment Operator,
Destructor
These three are automatically created by the compiler if they are not defined in a class. See Rule of Three
Main concepts :
1. Overloaded functions : In C++, more than one function can have the same name. They are differentiated based upon type and no. of parameters passed. This helps in doing slightly different tasks with slightly different parameters. The same task can be also be done, with different parameters. Name mangling is used to deal with problem of same identifier for function names. Linkages are performed using keyword such as extern "C".
2. new and delete operators.
Usage : ptr = new int[4]; delete [] ptr;
3. Reference variables : These are unlike pointers aliases to actual variables. A reference variable is created like this:
int a;
int& b = a;
Note that reference variables are always initialized. They can be used to do pass by reference when calling functions. Pointers can be kept non-initialized but reference should be always initialized.
4. Encapsulation : It's the mechanism by which the interface and behavior of a user-define data type is tied to the implementation and representation. By using encapsulation in object oriented programming, the user defined data types can be viewed in the same way as intrinsic data type.
5. Function Templates : Using function templates the same function template can be used for several types of parameter and return values. It implements the parameterized data types concept.
6. Class : A Class encapsulates data and algorithm that operate on it to form a abstract user-defined data type. Concepts like operator overloading, conversion member functions, default constructors make C++ class same as intrinsic data types.
7.Abstract classes : These classes cannot be instantiased because they contain pure virtual functions.
8.Virtual Functions : Virtual functions are class member functions that can be overridden in derived classes. An abstract class contains atleast one pure virtual function. If the derive class doesn't override the pure virtual function(s), then it also becomes an abstract class. Virtual functions use dynamic binding, to resolve the calls at runtime.
9. Virtual destructors : When an base type containing object of derived type, is freed, the destructor of base class gets called. The destruction of derived class doesn't gets called if the destructor is not declared virtual.
10. Static Member functions and fields : When a field is declared static, inside a class, it can be use without creating an instance of that class. A static member function can be called without specifying any instance.
11. Friend class and friend functions: Friend classes have access to private data members of a class. Likewise friend functions have access to private fields of a class. These functions can be either member functions of other class or function not belonging to any class.
12. STL : STL stands for Standard Template Library which contains serveral classes that can be used for generic data structures implementation like linked lists (list) , map, multimap etc.
13. Copy Constuctore : A copy constructor get called when a new object of the class in which it's defined gets created, and a reference to an existing object of the same class is passed. A copy constructor is defined as follows:
Box::Box(const Box& box)
{
....
....
}
The copy constructor gets called in either of the following ways:
Box Box1;
Box box2 = box1;
Box box2(box1);
14. Conversion Functions : A Conversion function converts between any type and class type. It's defined as follows:
Member Conversion Function : Converts class objects to other types.
operator type(); //where type is the type to convert
For example : operator long();
Class Coversion function : Converts other types to class type.
A class constructor conversion function can be defined as follows:
Box::Box(long a)
View some video tutorials
http://www.deathmonkeyz.com/tutorials
Thursday, October 15, 2009
OpenSSL
OpenSSL is an open-source SSL and generic cryptographic toolkit. SSL v3.0 and TLS 1.0 are supported. The latest version can be downloaded from http://www.openssl.org/
OpenSSL Documentation / Tutorials:
http://tldp.org/HOWTO/SSL-Certificates-HOWTO/index.html
http://docs.sun.com/source/816-6156-10/contents.htm
http://docs.sun.com/source/816-6154-10/contents.htm
http://h71000.www7.hp.com/doc/83final/ba554_90007/ch04.html
http://sial.org/howto/openssl/
https://help.ubuntu.com/community/OpenSSL
For using OpenSSL in multithreaded applications see http://www.openssl.org/docs/crypto/threads.html
FIPS Support : OpenSSL provides FIPS OpenSSL v1.2 module which is FIPS 140-2 validated. It generates fipscanister.lib or fipscanister.o which can be used by latest OpenSSL distribution to build a FIPS capable OpenSSL.
FIPS mode can be enabled by calling FIPS_mode_set(1); A return value of 1 indicates successful enabling. When FIPS mode is set only FIPS approved security functions will get executed.
OpenSSL Documentation / Tutorials:
http://tldp.org/HOWTO/SSL-Certificates-HOWTO/index.html
http://docs.sun.com/source/816-6156-10/contents.htm
http://docs.sun.com/source/816-6154-10/contents.htm
http://h71000.www7.hp.com/doc/83final/ba554_90007/ch04.html
http://sial.org/howto/openssl/
https://help.ubuntu.com/community/OpenSSL
For using OpenSSL in multithreaded applications see http://www.openssl.org/docs/crypto/threads.html
FIPS Support : OpenSSL provides FIPS OpenSSL v1.2 module which is FIPS 140-2 validated. It generates fipscanister.lib or fipscanister.o which can be used by latest OpenSSL distribution to build a FIPS capable OpenSSL.
FIPS mode can be enabled by calling FIPS_mode_set(1); A return value of 1 indicates successful enabling. When FIPS mode is set only FIPS approved security functions will get executed.
Build FIPS shared libraries containing embedded signatures:
Use fipsld script in case of Linux/Unix and fipslink.pl for Windows. Remember to use gcc -Bsymbolic option when building shared library under Linux/Unix. The Target name for using fipsld script must end with dll or lib or the fipsld script has to be modified.
Information Security
Information Security deals with securing information / data at rest, in motion and in use.
PKCS#11
PKCS#11 standard defines a Cryptographic API which applications can use to access Crypgraphic services provided by a crypto module.
PKCS#11 isolates applications from underlying cryptographic hardware by providing a standard API.
The PKCS#11 standard can be downloaded from RSA site at
http://www.rsa.com/rsalabs/node.asp?id=2133
RSA publishes several other PKCS standards also.
PKCS#11 isolates applications from underlying cryptographic hardware by providing a standard API.
The PKCS#11 standard can be downloaded from RSA site at
http://www.rsa.com/rsalabs/node.asp?id=2133
RSA publishes several other PKCS standards also.
Subscribe to:
Comments (Atom)