Spiga

8086 MICROPROCESSOR



The 8086 is a 16-bit,N-channel,HMOS microprocessor chip designed by Intel in 1978, which gave rise to the x86 architecture.The 8086 draws 360mA on 5V.Its frequency range is 4 - 10 MHz.


The 8086 was intended as a temporary substitute for the ambitious iAPX 432 project in an attempt to draw attention from other manufacturers (such as Motorola, Zilog, and National Semiconductor) less delayed 16 and 32-bit processors. Both the architecture and the physical chip were therefore developed very quickly, and were based on the earlier 8080 and 8085 designs with a similar register set. The chip had around 29,000 transistors (many for microcode) and would also function as a continuation of the 8085; although not directly source code compatible, it was designed so that assembly language for the 8085 could be automatically converted into (sub-optimal) 8086 assembly source, usually with little or no hand-editing. However, the 8086 design was expanded to support full 16-bit processing instead of the fairly basic 16-bit capabilities of the Intel 8080/8085.

8086 MEMORY

Its Memory is divided into two parts:a)even bank and,b)odd bank.Program, data and stack memories occupy the same memory space. The total addressable memory size is 1MB KB. As the most of the processor instructions use 16-bit pointers the processor can effectively address only 64 KB of memory. To access memory outside of 64 KB the CPU uses special segment registers to specify where the code, stack and data 64 KB segments are positioned within 1 MB of memory.

Physical memory address pointed by segment:offset pair is calculated as:
address = ( * 16) +

Program memory - program can be located anywhere in memory. Jump and call instructions can be used for short jumps within currently selected 64 KB code segment, as well as for far jumps anywhere within 1 MB of memory. All conditional jump instructions can be used to jump within approximately +127 - -127 bytes from current instruction.

Data memory - the processor can access data in any one out of 4 available segments, which limits the size of accessible memory to 256 KB (if all four segments point to different 64 KB blocks). Accessing data from the Data, Code, Stack or Extra segments can be usually done by prefixing instructions with the DS:, CS:, SS: or ES: (some registers and instructions by default may use the ES or SS segments instead of DS segment).

Stack memory can be placed anywhere in memory. The stack can be located at odd memory addresses, but it is not recommended for performance reasons (see "Data Memory" above).

Reserved locations:
0000h - 03FFh are reserved for interrupt vectors. Each interrupt vector is a 32-bit pointer in format segment:offset.
FFFF0h - FFFFFh - after RESET the processor always starts program execution at the FFFF0h address.

General Purpose Registers

Accumulator register consists of 2 8-bit registers AL and AH, which can be combined together and used as a 16-bit register AX. AL in this case contains the low-order byte of the word, and AH contains the high-order byte. Accumulator can be used for I/O operations and string manipulation.

Base register consists of 2 8-bit registers BL and BH, which can be combined together and used as a 16-bit register BX. BL in this case contains the low-order byte of the word, and BH contains the high-order byte. BX register usually contains a data pointer used for based, based indexed or register indirect addressing.

Count register consists of 2 8-bit registers CL and CH, which can be combined together and used as a 16-bit register CX. When combined, CL register contains the low-order byte of the word, and CH contains the high-order byte. Count register can be used as a counter in string manipulation and shift/rotate instructions.

Data register consists of 2 8-bit registers DL and DH, which can be combined together and used as a 16-bit register DX. When combined, DL register contains the low-order byte of the word, and DH contains the high-order byte. Data register can be used as a port number in I/O operations. In integer 32-bit multiply and divide instruction the DX register contains high-order word of the initial or resulting number.

The following registers are both general and index registers:
Stack Pointer (SP) is a 16-bit register pointing to program stack.
Base Pointer (BP) is a 16-bit register pointing to data in stack segment. BP register is usually used for based, based indexed or register indirect addressing.
Source Index (SI) is a 16-bit register. SI is used for indexed, based indexed and register indirect addressing, as well as a source data address in string manipulation instructions.
Destination Index (DI) is a 16-bit register. DI is used for indexed, based indexed and register indirect addressing, as well as a destination data address in string manipulation instructions.
Other registers:
Instruction Pointer (IP) is a 16-bit register.

Flags is a 16-bit register containing 9 1-bit flags:
Overflow Flag (OF) - set if the result is too large positive number, or is too small negative number to fit into destination operand.
Direction Flag (DF) - if set then string manipulation instructions will auto-decrement index registers. If cleared then the index registers will be auto-incremented.
Interrupt-enable Flag (IF) - setting this bit enables maskable interrupts.
Single-step Flag (TF) - if set then single-step interrupt will occur after the next instruction.
Sign Flag (SF) - set if the most significant bit of the result is set.
Zero Flag (ZF) - set if the result is zero.
Auxiliary carry Flag (AF) - set if there was a carry from or borrow to bits 0-3 in the AL register.
Parity Flag (PF) - set if parity (the number of "1" bits) in the low-order byte of the result is even.
Carry Flag (CF) - set if there was a carry from or borrow to the most significant bit during last result calculation.

SEGMENTS:


Code segment (CS) is a 16-bit register containing address of 64 KB segment with processor instructions. The processor uses CS segment for all accesses to instructions referenced by instruction pointer (IP) register. CS register cannot be changed directly. The CS register is automatically updated during far jump, far call and far return instructions.

Stack segment (SS) is a 16-bit register containing address of 64KB segment with program stack. By default, the processor assumes that all data referenced by the stack pointer (SP) and base pointer (BP) registers is located in the stack segment. SS register can be changed directly using POP instruction.

Data segment (DS) is a 16-bit register containing address of 64KB segment with program data. By default, the processor assumes that all data referenced by general registers (AX, BX, CX, DX) and index register (SI, DI) is located in the data segment. DS register can be changed directly using POP and LDS instructions.
Extra segment (ES) is a 16-bit register containing address of 64KB segment, usually with program data. By default, the processor assumes that the DI register references the ES segment in string manipulation instructions. ES register can be changed directly using POP and LES instructions.
It is possible to change default segments used by general and index registers by prefixing instructions with a CS, SS, DS or ES prefix.




Addressing Modes Of 8086:




Implied - the data value/data address is implicitly associated with the instruction.
Register - references the data in a register or in a register pair.


mov d,s


add bx,ax
Immediate - the data is provided in the instruction.


mov bh,32
Direct - the instruction operand specifies the memory address where data is located.


mov al,[0005]
Register indirect - instruction specifies a register containing an address, where data is located. This addressing mode works with SI, DI, BX and BP registers.


mov si,[0005]


mov al,[si]
Based - 8-bit or 16-bit instruction operand is added to the contents of a base register (BX or BP), the resulting value is a pointer to location where data resides.


mov al,[si][bx]
Indexed - 8-bit or 16-bit instruction operand is added to the contents of an index register (SI or DI), the resulting value is a pointer to location where data resides.
Based Indexed - the contents of a base register (BX or BP) is added to the contents of an index register (SI or DI), the resulting value is a pointer to location where data resides.
Based Indexed with displacement - 8-bit or 16-bit instruction operand is added to the contents of a base register (BX or BP) and index register (SI or DI), the resulting value is a pointer to location where data resides.

Instruction Set:

8086 instruction set consists of the following instructions:
Data moving instructions.
Arithmetic - add, subtract, increment, decrement, convert byte/word and compare.
Logic - AND, OR, exclusive OR, shift/rotate and test.
String manipulation - load, store, move, compare and scan for byte/word.
Control transfer - conditional, unconditional, call subroutine and return from subroutine.
Input/Output instructions.
Other - setting/clearing flag bits, stack operations, software interrupts, etc.

Interrupts:

The processor has the following interrupts:
INTR is a maskable hardware interrupt. The interrupt can be enabled/disabled using STI/CLI instructions or using more complicated method of updating the FLAGS register with the help of the POPF instruction. When an interrupt occurs, the processor stores FLAGS register into stack, disables further interrupts, fetches from the bus one byte representing interrupt type, and jumps to interrupt processing routine address of which is stored in location 4 * . Interrupt processing routine should return with the IRET instruction.
NMI is a non-maskable interrupt. Interrupt is processed in the same way as the INTR interrupt. Interrupt type of the NMI is 2, i.e. the address of the NMI processing routine is stored in location 0008h. This interrupt has higher priority then the maskable interrupt.
Software interrupts can be caused by:
INT instruction - breakpoint interrupt. This is a type 3 interrupt.
INT instruction - any one interrupt from available 256 interrupts.
INTO instruction - interrupt on overflow
Single-step interrupt - generated if the TF flag is set. This is a type 1 interrupt. When the CPU processes this interrupt it clears TF flag before calling the interrupt processing routine.
Processor exceptions: divide error (type 0), unused opcode (type 6) and escape opcode (type 7).
Software interrupt processing is the same as for the hardware interrupts.

AVG Internet Security Home Edition Released


Newark, Notts – May 1, 2007-The official business partner of GRISOFT, AVG UK & Ireland, makers of AVG Internet Security software, announced the immediate availability of AVG Internet Security Home Edition. This special promotion version of the flagship AVG Internet Security product is available to home users and provides complete protection against viruses, spyware, spam and unauthorised access to home computers for up to three PCs.

Users of other products in the AVG family can cross-upgrade to the new AVG IS Home Edition.


AVG Internet Security Home Edition is available online at http://www.avguk.com/ and to resellers, retailers and computer shops in the form of shrink-wrap retail box or as space saving DVD case.AVG Internet Security Home Edition has a recommended retail price (RRP) of £59.99 for a two-year licence.


About AVG UK & Irelandwww.avguk.com



GRISOFT is a leading provider of antivirus, firewall protection and security solutions for consumers and SMEs. It is one of the fastest growing companies in the industry with more than 50 million protected computers around the world.Established in 1991, GRISOFT employs some of the world’s leading experts in antivirus software, specifically in the areas of virus analysis and detection, software development, and antivirus support. GRISOFT award-winning products are distributed globally through resellers and the Internet as well as via AVG Anti-Virus Software Developer’s Kit (SDK) to interested partners.http://www.grisoft.com/

CRYPTOGRAPHY-II



MODERN CRYPTOGRAPHY

Hi Friends,in the last post we have discussed about the Traditional Cryptography.Now we'll discuss about the Modern Cryptography.

Before Discussing this let's know about "One-Time Pads".

One-Time Pads


In this One-Time Pads technique,first we choose random bit string as key.Then convert the plaintext into a bit string.Finally,compute the EXCLUSIVE OR of these two strings,bit by bit.The resulting ciphertext can't be broken,because every possible plaintext is an equally probable candidate.The ciphertext gives the cryptanalyst no information at all.


Modern Cryptography uses the same basic ideas as Traditional Cryptography,transposition and substitution,but its emphasis is different.Traditionally,cryptographers have used simple algorithms and relied on very long keys for their security.Nowadays,reverse is true:the object is to make the encryption algorithm so complex and involuted that even if the cryptanalyst acquires the encrypted data,he we'll not be able to make any sense of it.


Secret-Key Algorithms:


With secret key cryptography, a single key is used for both encryption and decryption. As shown in Figure, the sender uses the key (or some set of rules) to encrypt the plaintext and sends the ciphertext to the receiver. The receiver applies the same key (or ruleset) to decrypt the message and recover the plaintext. Because a single key is used for both functions, secret key cryptography is also called symmetric encryption.With this form of cryptography, it is obvious that the key must be known to both the sender and the receiver; that, in fact, is the secret. The biggest difficulty with this approach, of course, is the distribution of the key.Secret key cryptography schemes are generally categorized as being either stream ciphers or block ciphers. Stream ciphers operate on a single bit (byte or computer word) at a time and implement some form of feedback mechanism so that the key is constantly changing. A block cipher is so-called because the scheme encrypts one block of data at a time using the same key on each block. In general, the same plaintext block will always encrypt to the same ciphertext when using the same key in a block cipher whereas the same plaintext will encrypt to different ciphertext in a stream cipher.

Secret key cryptography algorithms that are in use today include:

Data Encryption Standard (DES): The most common SKC scheme used today, DES was designed by IBM in the 1970s and adopted by the National Bureau of Standards (NBS) [now the National Institute for Standards and Technology (NIST)] in 1977 for commercial and unclassified government applications. DES is a block-cipher employing a 56-bit key that operates on 64-bit blocks. DES has a complex set of rules and transformations that were designed specifically to yield fast hardware implementations and slow software implementations, although this latter point is becoming less significant today since the speed of computer processors is several orders of magnitude faster today than twenty years ago.


Advanced Encryption Standard (AES): In 1997, NIST initiated a very public, 4-1/2 year process to develop a new secure cryptosystem for U.S. government applications. The result, the Advanced Encryption Standard, became the official successor to DES in December 2001. AES uses an SKC scheme called Rijndael, a block cipher designed by Belgian cryptographers Joan Daemen and Vincent Rijmen. The algorithm can use a variable block length and key length; the latest specification allowed any combination of keys lengths of 128, 192, or 256 bits and blocks of length 128, 192, or 256 bits.


International Data Encryption Algorithm (IDEA): Secret-key cryptosystem written by Xuejia Lai and James Massey, in 1992 and patented by Ascom; a 64-bit SKC block cipher using a 128-bit key. Also available internationally.The basic structure resembles of DES in that 64-bit plaintext input blocks are mangled in a sequence of parametarized iterations to produce 64-bit ciphertext output blocks.


Secure and Fast Encryption Routine (SAFER): Secret-key crypto scheme designed for implementation in software. Versions have been defined for 40-, 64-, and 128-bit keys.


Blowfish: A symmetric 64-bit block cipher invented by Bruce Schneier; optimized for 32-bit processors with large data caches, it is significantly faster than DES on a Pentium/PowerPC-class machine. Key lengths can vary from 32 to 448 bits in length. Blowfish, available freely and intended as a substitute for DES or IDEA, is in use in over 80 products.

Public-Key Cryptography

Public-key cryptography has been said to be the most significant new development in cryptography in the last 300-400 years. Modern PKC was first described publicly by Stanford University professor Martin Hellman and graduate student Whitfield Diffie in 1976. Their paper described a two-key crypto system in which two parties could engage in a secure communication over a non-secure communications channel without having to share a secret key.PKC depends upon the existence of so-called one-way functions, or mathematical functions that are easy to computer whereas their inverse function is relatively difficult to compute.Generic PKC employs two keys that are mathematically related although knowledge of one key does not allow someone to easily determine the other key. One key is used to encrypt the plaintext and the other key is used to decrypt the ciphertext. The important point here is that it does not matter which key is applied first, but that both keys are required for the process to work (Figure 1B). Because a pair of keys are required, this approach is also called asymmetric cryptography.In PKC, one of the keys is designated the public key and may be advertised as widely as the owner wants. The other key is designated the private key and is never revealed to another party. It is straight forward to send messages under this scheme.

Public-key cryptography algorithms that are in use today for key exchange or digital signatures include:

RSA: The first, and still most common, PKC implementation, named for the three MIT mathematicians who developed it — Ronald Rivest, Adi Shamir, and Leonard Adleman. RSA today is used in hundreds of software products and can be used for key exchange, digital signatures, or encryption of small blocks of data. RSA uses a variable size encryption block and a variable size key. The key-pair is derived from a very large number, n, that is the product of two prime numbers chosen according to special rules; these primes may be 100 or more digits in length each, yielding an n with roughly twice as many digits as the prime factors. The public key information includes n and a derivative of one of the factors of n; an attacker cannot determine the prime factors of n (and, therefore, the private key) from this information alone and that is what makes the RSA algorithm so secure. (Some descriptions of PKC erroneously state that RSA's safety is due to the difficulty in factoring large prime numbers. In fact, large prime numbers, like small prime numbers, only have two factors!) The ability for computers to factor large numbers, and therefore attack schemes such as RSA, is rapidly improving and systems today can find the prime factors of numbers with more than 200 digits. Nevertheless, if a large number is created from two prime factors that are roughly the same size, there is no known factorization algorithm that will solve the problem in a reasonable amount of time; a 2005 test to factor a 200-digit number took 1.5 years and over 50 years of compute time (see the Wikipedia article on integer factorization.) Regardless, one presumed protection of RSA is that users can easily increase the key size to always stay ahead of the computer processing curve. As an aside, the patent for RSA expired in September 2000 which does not appear to have affected RSA's popularity one way or the other.

Hash Functions

Hash functions, also called message digests and one-way encryption, are algorithms that, in some sense, use no key (Figure 1C). Instead, a fixed-length hash value is computed based upon the plaintext that makes it impossible for either the contents or length of the plaintext to be recovered. Hash algorithms are typically used to provide a digital fingerprint of a file's contents, often used to ensure that the file has not been altered by an intruder or virus. Hash functions are also commonly employed by many operating systems to encrypt passwords. Hash functions, then, provide a measure of the integrity of a file.

NETWORK SECURITY:CRYPTOGRAPHY-I


Traditional Cryptography:

Cryptography is the study of message secrecy.Cryptology term has been derived from Greek κρυπτός kryptós "hidden," and the verb γράφω gráfo "write".
Cryptography referred almost exclusively only to encryption, the process of converting ordinary information (plaintext) into unintelligible gibberish (ie, ciphertext). Decryption is the reverse, moving from unintelligible ciphertext to plaintext. A cipher (or cypher) is a pair of algorithms which perform this encryption and the reversing decryption. The detailed operation of a cipher is controlled both by the algorithm and, in each instance, by a key. This is a secret parameter (known only to the communicants) for a specific message exchange context. Keys are important as ciphers without variable keys are trivially breakable, and so rather less than useful for most purposes. Historically, ciphers were often used directly for encryption or decryption, without additional procedures such as authentication or integrity checks.

THE PURPOSE OF CRYPTOGRAPHY:

Cryptography is the science of writing in secret code and is an ancient art; the first documented use of cryptography in writing dates back to circa 1900 B.C. when an Egyptian scribe used non-standard hieroglyphs in an inscription. Some experts argue that cryptography appeared spontaneously sometime after writing was invented, with applications ranging from diplomatic missives to war-time battle plans. It is no surprise, then, that new forms of cryptography came soon after the widespread development of computer communications. In data and telecommunications, cryptography is necessary when communicating over any untrusted medium, which includes just about any network, particularly the Internet.

TRADITIONAL CRYPTOGRAPHY:

In earlier days,Cryptography was done by two process:1)Substitution Ciphers,and 2)Transposition Ciphers.

Substitution Ciphers: In this technique of cryptography,each letter or group of letters is replaced by another letter or group of letters to disguise it.
Example:
plain text: abcdefghijklmz
cipher text:qwertyuiopasd (set of letters of keyboard.)

Transposition Ciphers: Substitution ciphers preserve the order of the plaintext symbols but disguise them.Transposition ciphers,in contrast,reorder the letters but don't disguise them

Principles Of Cryptography:
The first principle is that all encrypted messages must contain some redundancy,that is,information not needed to understand message,ie some extra bytes are reserved ,except from the data byte memory storage.
The second Cryptographic principle is that some measures must be taken to prevent active intruders from playing back old messages.
How to crack the simple matrix transposition ciphers:

1)Count how many letters are in the ciphertext (for this example, assume the ciphertext is 99 letters long)
2)Make all of the matrices that would fit such a length (e.g. 2x50, 3x33, 4x25, 5x20, 6x17, 7x15, 8x13, 9x11, 10x10). Use TWO of each size.
3)For each size matrix, write out the ciphertext across the rows on one copy. On the other copy, write out the ciphertext down the columns.
4)At each stage, see if you can find anything legible, reading perpendicular to how you put the ciphertext in.

A harder version of the matrix transposition cipher is the column-scrambled matrix transposition cipher. Just like the ones above, you find a matrix of suitable dimensions and write your text in row-by-row. If there are blank cells left, fill them in with a dummy character (sometimes an 'X'). However, before writing down the ciphertext from the columns, you first scramble the columns. This generates a new matrix of the same size. Now read off the text down the columns, as before. This is a harder cipher, but there is a systematic way to crack it.


Now try to break this:


YRANHOVEHOOOTRIOOORYMCBKOITOEROAUEAIDUURENRDGEFOORINSEUSTU
SHBKSESLYAGEEEAORDENTSAMEGYARTCSHDBKMCSTDREEAGHI


Answer will be published in next posting......

Breach In Security


HAS the Mac finally been hacked?

A computer security conference held in Vancouver, recently, uncovered a flaw that saw a hacker gain control of a MacBook Pro.

The security hole was discovered by New York security researcher Dino Dai Zovi, participating in a hacking challenge at the CanSecWest Applied Security Conference. $US10,000 and a MacBook Pro cash were up for grabs for anyone who could take over the MacBook Pro via a wireless connection.
Participants failed to hack the Mac on the first day, when it had no applications running. So organisers relaxed the rules and allowed them to attempt to exploit any security flaws they could find in Apple's Safari web browser.
Nine hours later one hacker succeeded, by emailing a link to a malicious website that enabled him to gain access to the MacBook Pro's administrator account and hence control the Mac.

While it was initially reported as a Mac flaw, it turned out to be a bug in Apple's QuickTime software that affects any web browser, Mac or Windows, that has Java enabled. The simple solution is to disable Java on one's browser, but a more permanent QuickTime patch from Apple should be forthcoming.
The hack created headlines because of the Mac's unblemished security record and Apple's boasts of Mac OS X having no viruses.

But while finding a flaw is one thing, exploiting it is another. The QuickTime vulnerability was just the latest in a line of "proofs of concept" of how a Mac might be taken over, not an actual real-world case. It was limited to a particular Mac in a particular situation, and there was no danger of Mac virus spreading across the internet.
Mac OS X remains virtually impregnable because, by default, applications cannot be installed without authentication by the user.
The CanSecWest challenge followed the "Month of Apple Bugs" earlier this year that aimed to showcase a Mac flaw every day for a month, and several proof-of-concept trojan horses that have relied more on users' gullibility than actual Mac security weaknesses.
There also was an alleged MacBook wireless hack that turned out to be a vulnerability in a third-party wi-fi card.

So while Mac users are yet to face a serious security threat while surfing the internet, they should not be complacent.
In addition to its regular operating system updates, Apple routinely releases security patches for all aspects of the system software, which you can download at www.apple.com/support/downloads, or via your Software Update utility.