Saturday, March 3, 2012

Fault, Error and Failure

Failure = delivered service is no longer complies with specification (agreed description of the system expected function and service)

Error = part of the system state that is liable to lead to subsequent failure

Fault = adjudged or hypothesized cause of an error

Failures are detected by observers or users of system.  Failures are dependent upon the definition of agreed-upon correct operation of the system.  If there is no specification of what a system should do, there could not be a failure.  The same failure can be resulted from different errors.

Error is the incorrect system behanvior from which a faulure may occur.  Error can be categorized into 2 types.  Error that manifest as value error might be incorrect discrete values or incorrect system state.  Timing error can include total non-performance or race condition.  Errors can be detected before they become failures.  Error is a manifestion of fault.  Error is the way that we can look into the system to discover if fault is present. 

Fault is the defect that in system that can cause error.  Neither the software or observer are aware of the presence of fault until an error occurs.  Latent fault is fault that is lying dormant and has not cause any error.  A latent fault becomes an active fault when the circumstances arise.

Monday, January 23, 2012

C pointer

Pointers are created by the indirect operator (*). The syntax is type *variable For example, int *p is a pointer to an integer If A is the memory location of pointer p and B is the memory location of the integer p points to, *p = 123 => store the value in location B P = 123 => store the value in location A. In other words, change p to point to another memory location The & operator returns the address of the variable. For example, p = &n makes p points to n

Tuesday, January 10, 2012

Radius

Dial up networks usually have a local modem pool to provide cheap access. However, the ISP does not work to keep a copy of user database in each point of presence. The user is the supplicant, the POP is the authenticator and the central database is the authorizer. The protocol used between the POP and the database is called RADIUS (Remote Access Dial-In User Service)

PPP

Point-to-point protocol converts the unstructured modem link into a packet-based environment suitable for transporting IP packets. PPP has 2 authentication methods. PAP sends the user name and password in clear. CHAP uses a challenge response mechanism.

WEP keys

WEP keys have the following characteristics:

(1) fixed length - usually 40 bits or 104 bits. (for the latter case, vendor touted that the solution is 128bits because the protocol will add a 24bit Initialization Vector to form the full key)
(2) Static - no changes except by reconfiguration
(3) Shared - AP and station have the same key(s)
(4) Symmetric - same key used to encrypt and decrypt data

There are 2 approaches to use WEP keys - Default Keys and Key Mapping Keys.

Default Keys
All station and the APs uses a single set of keys. The standard specifies that there should be 4 default jeys for each devices. Only one default key is needed for security to work. The additional keys are used to ease key change progressively in an environment with many devices. When 2 default keys are defined, all transmissions from AP are encrypted using a single key selected, called the active key. However, received frames (from station) can be decrypted using either of the 2 keys when appropriate. The AP can decrypt data from station that have changed to the new key or those that are yet to be changed.

2 set of default keys further allow the AP and station uses different key set for transmitting. This is called directional key use. The key used by the transmitter is indicated in the KeyID bits in the encrypted frame so the receiver know which key (0 to 4) is used.

Key Mapping Keys
Each station has its own jey value. Not all vendor support this because of the complexity for key configuration and maintenance. Use of different key for each station complicates broadcast. In this case, all multicast traffic is encrypted using a default key that is shared by all stations. Only unicast traffic are sent using the key mapping key.

The challenge for AP is that it has to keep track of muliple key. Another difficuty is to ensure all AP has the same copy of jey table.

AP can operated with default jeys and key mappn gjeys simultaneously. When the AP sends or receives a frame, it looks in the key table to see whether there is a matching MAC entry for the station. It there is, it uses the key mapping key. Otherwise, it use the default key (that's why it called).

802.11 Radio

There are 2 frequency bands for sending IEEE 802.11 datat - 2.4GHz and 5 GHz. The part of the radio that turns biuts into analog is called the modem (or baseband section). The second part is very high frequency electronics to drive the antenna, usually called the radio frequenct (RF) section.

Improvements in modem techniques have resulted in successive version of IEEE 802.11 offerings. The initial 1997 standard provided 2Mbps in the 2.4GHz band. 802.11a increased to 54Mbps in 5GHz due to better modem and medium. 802.11b increased the speed to 11Mbps in 2.4GHz band. 802.11g further increased speeds again in 2.4GHz by more sophisticated modem technique.

Stream Cipher and Block Cipher

Stream cipher takes a sequence of bytes and produce a stream of ciphertext. A block cipher handles a single block of data at a time. Stream cipher is like a sausage machine while block cipher is like a bakery. A distinction between the 2 cphers is that the internal state of a stream cipher is continuously updated as data is processed. by contract, the state of a block cipher is reset for each block prior to processing.