Sunday, April 04, 2010

DNS Server Questions

1)List the types of DNS servers?
Ans: Standard primary, standard secondary, active directory integrated zone, root server, caching only, and forwarders, master.

2)what is ttl?
Ans: time to live

3)What is PTR?
Ans: Used to map IP address to their host names. These records only used in reverse lookup zone.

4)what is the primary purpose of DNS?
Ans: For host resolution.

5) what is start of authority?
Ans: It contains serial no. , this indicates the modification done to the zone.

6)what is Dynamic DNS?
Ans: Dynamically update the service records

7)what is the maximum character size of DNS?
Ans:63

9)what is zone or zone file?
Ans: A zone is a Database for either a DNS domain or for a DNS domain and one or more of it’s Sub domains. This storage database is special text file called zone or zone file.

11)why multiple DNS services are created for the same zone?
Ans: load balancing, fault tolerance.

12)what is caching only server?
Ans: Caching only servers does not stores only zones.it resolves host names
To IP address for client computers and stores the resulting mapping information in it’s cache. this DNS server provides the cached information to the client computer with contacting other DNS servers to resolve the query.
It is the temporary storage of zone information.

13)what is zone transfer?
Ans: The process of copying zone to a standard DNS server is called zone transfer.

14)what is master DNS server?
Ans: As the DNS contains the master copy of the zone information is called Master DNS.


15)what is forwarders?
Ans: The queries of one server will be forwarded to other DNS act as forwarder by internal name resolution.

17)which protocol is supported by DNS server?
Ans: Dynamic Updated protocol.

18)what are four service records?
Ans: _msdcs,_sites,_tcp,_udp

19) what are six service records in win 2003?
Ans: -msdcs: (Microsoft Domain controller service)
It contains the information which domain controller is hosting the zone.
Site: In which site the zone has been configured.
Tcp& Udp: These are two protocols that are responsible for communicating with active directory.
Domain DNS Zones & Forest DNS Zones:
In which domain & Forest, DNS has be configured the information.

19)what is Resource record?
Ans: The entries are in zone is called Resource record. The entry may be host name IP address mapping entry.

20)what is the primary thing you have to do on a DNS server before it starts resolution of host name?

21)when will you configure root DNS server?
Ans: : A root server should be used only when a network is not connected to the internet or when a network is connected to the internet or when a network is connected to the internet by using a proxy server
22)what is forward lookup zone?
Ans:Resolves hostnames to ip address.

23)what is reverse look up zone?
Ans: Resolves ip address to hostnames.

24)what is standard primary zone?
Ans: Standard primary DNS server stores DNS entries(IP address to host mapping and other DNS resource records ) in zone file that is maintained on the server. The primary server maintains the master copy of zone file. When changes need to be the zone they should be made only standard primary server.

25)what is standard secondary zone?
Ans: Standard secondary DNS server stores copies of zones from the standard primary.


26) what is root server?
Ans:Root server contains a copy of a zone for the root domain – either the root domain for the internet, or the root domain for a company private, internal network. the purpose of the root server is to enable other DNS servers on a network to access the second level domains on the internet.
Note: A root server should be used only when a network is not connected to the internet or when a network is connected to the internet or when a network is connected to the internet by using a proxy server

27)what is round robin?
Ans: Round robin is used when multiple servers (such as web servers) have identical configurations and identical host names ,but different IP addresses.

28) can you configure root server to use a forwarder?
Ans: NO.

29)what are Root hints?
Ans:Root hints are server names and ip address combination that point to the root servers located either on the internet or on your organization private network.
Root hint tab contains list of DNS Servers can contract to resolve client DNS queries.
Maintains all the information of 13 root servers.

32)what is Active Directory integrated zone?
Ans: Active directory integrated DNS server just like standard primary except DNS entries stored in active directory data store rather than in a zone file. Active directory supports multi master replication when changes need to be made to the zone. They can be on any active directory –integrated DNS server that containg the zone.

33)what is simple query?
Ans: A simple query is a query that DNS server can resolve without contacting any other DNS servers.

34) what is recursive query?
Ans: a recursive is a query that can’t resolve it self it must be contract one or more additional DNS servers to resolve the query.

35) what is scavenging?
Ans: Scavenging is the process of searching for and Deletes stele resource records in a zone
PTR: Pointer resource record
SRV: Service locator resource record



36)What is SRV?
Ans: Used to map specific service (tcp/ip) to list of servers that provide that service.

37) What is CNAME?
Ans: Alias resource record .used to map an additional host name to the actual name of the host.

38) What is stub zone in 2003?
Ans: stub zone contains the information of Name Server & start of authority. It gives the information in which system, in which server, in which domain DNS has been configured
The properties of DNS in Advanced Tab
(Disable Recursion or disable forwarder)
By default this option is unchecked telling that recursive property
is present.
BIND Secondaries:
The zone transfers between the primary & secondary (replication between primary and secondary) BIND is responsible.
Fail on load if bad zone data:
This option is unchecked telling that even if the zone contains some errors it will be loaded if it is checked the zone will not be loaded.
Enable Round Robin:
If the same zone is present in the same subnet the query will be passed on round robin passion until it gets resolved.
Enable Net Mask ordering:
This option is utilized for DNS Server maintained on multihome pc ( A pc Having multiple nic cards ) and solving the queries of diff clients subnets
Secure cache against pollution :
It secures the cache information by not storing the information of unauthorized DNS servers.











DNS TROUBLESHOOTING


50)How to check AD DNS Registration
Ans:You should have four folders with the following names under DNS forward lookup zones are present when DNS is correctly registering the Active Directory DNS records. These folders are labeled:
_msdcs
_sites
_tcp
_udp


51)A Records appear and disappear randomly
Cause: Your DNS zone is configured to query WINS.

52)Can't logon or join the domain
Ans:If DNS is not set up on the Domain controller correctly, domain-wide issues can occur such as replication between domain controllers. If DNS is not set up on the client correctly, the client may experience many networking and internet issues. Unable log on to the domain or join the domain from a workstation or server, and can't access the Internet indicate that you may have DNS settings issues.

53)Can't open an external website using the same network domain name?
Ans:Create a DNS record for pointing to the www with the public IP.


54)What are Common DNS settings mistakes
1.The domain controller is not pointing to itself for DNS resolution on all network interfaces. Especially, when you have multihomed server, the WAN connection may be assign 127.0.0.1 as DNS ip.
2. The "." zone exists under forward lookup zones in DNS.
3. The clients on LAN do not point the DNS to internal DNS server.

55)Can't find server name for ....: No response from server - DNS Request Timed Out?
Ans: Symptom: When running nslookup, you may receive this message: Can't find server name for ....: No response from server
Cause: the DNS server's reverse lookup zones do not contain a PTR record for the DNS server's IP address. Refer to case 0204BL

56)Can't Find Server Name for Address 127.0.0.1 when running nslookup?
Ans:Cause: You don't have a DNS server specified in your TCP/IP Properties. If you have no DNS server configured on your client, Nslookup will. default to the local loopback address.

57)DNS issue with IP Filtering
Ans:Symptoms: you have a windows 2000 server running IIS for public access with 10 public IPs. The router is broken. We would like to enable IP filtering to block all ports except the port 80 for the web, 25 and 110 for the mail. After enabling IP Filtering, the server can't access any web sites, can't ping yahoo.com and nslookup gets time out.
Cause: IP Filtering block the ports fro DNS.

58)"DNS name does not exist."?
Ans:Cause: 1. Incorrect DNS.
2. The netlogon service tries to register the RR before the DNS service is up.

59)DNS on multi homed server?
Ans:It is not recommended to install DNS on a multihomed server. If you do, you should restrict the DNS server to listen only on a selected address.

60)DNS request time out - ip name lookup failed?
Ans:When troubleshooting Outlook 550 5.7.1 relaying denied - ip name lookup failed by using nslookup to resolve host name,

61)you may receive "DNS request time out...*** Request to mail.chicagotech.net time-out.?
Ans:Possible causes: 1. Incorrect DNS settings.
2. Incorrect TCP/IP settings on the DC.
3. Missing PRT on Reverse Lookup Zones.

62)DNS server can't access the Internet?
Ans:Symptoms: You have a domain controller with DNS. The server can ping router and any public IPs. However, the server can't open any web sites.
Resolution: Check the server DNS settings, especially make sure the server points to the internal DNS instead of the ISP DNS or 127.0.0.1.

63)How to register the DNS RR?
Ans:1. Go to DNS Manager to add it manually.
2. Use netlogon, ipconfig and nbtstat command.

64)How to troubleshoot DNS problems?
Ans:To correct DNS settings and troubleshoot DNS problems, you can 1) run nslookup from a command line is the default dns server the one you expect.
2) use ipconfig /all on client to make sure the client point to correct DNS server and the the DC server points to only itself for DNS by its actual tcp/ip address, and make sure no any ISP DNS listed in tcp/ip properties of any W2K/XP.
3) When the machine loads it should register itself with the DNS. If not, use ipconfig /regiesterdns command.
4) Check Event Viewer to see whether the event logs contain any error information. On both the client and the server, check the System log for failures during the logon process. Also, check the Directory Service logs on the server and the DNS logs on the DNS server.
5) Use the nltest /dsgetdc: domainname command to verify that a domain controller can be located for a specific domain. The NLTest tool is installed with the Windows XP support tools.
6) If you suspect that a particular domain controller has problems, turn on the Netlogon debug logging. Use the NLTest utility by typing nltest /dbflag:0x2000ffff at a command prompt. The information is logged in the Debug folder in the Netlogon.log file. 7) Use DC Diagnosis tool, dcdiag /v to diagnose any errors. If you still have not isolated the problem, use Network Monitor to monitor network traffic between the client and the domain controller.

65)How can I verify a computer DNS entries are correctly registered in DNS?
A: You can use the NSLookup tool to verify that DNS entries are correctly registered in DNS. For example, to verify record registration, use the following commands: nslookup computername.domain.com.

66)How to add DNS and WINS into your Cisco VPN server?
Ans:If your VPN client cannot find servers or cannot ping computer name, you may need to add DNS and WINS into your VPN server. For example, to add DNS and WINS on a Cisco Firewall PIX, add vpdn group 1 client configuration DNS server name and vpdn group 1 client configuration wins wins server name..

67)How to clear bad information in Active Directory-integrated DNS
Ans:You may need to clear bad information in Active Directory-integrated if DNS is damaged or if the DNS contains incorrect registration information. To do that, 1) Change the DNS settings to Standard Primary Zone.
2) Delete the DNS zones.
3) Use ipconfig /flushdns command.
4) Recreate the DNS zones.
5) Restart Net Logon service
6)Use ipconfig /registerdns
68)How to ensure that DNS is registering the Active Directory DNS records?
Ans:To ensure that DNS is registering the Active Directory DNS records, to go DNS Management console>Server name>Forward Lookup Zones>Properties, make sure Allow Dynamic Updates is set to Yes and _msdcs, _sites, _tcp and _udp are correctly registering the Active Directory DNS records. If these folders do not exist, DNS is not registering the Active Directory DNS records. These records are critical to Active Directory functionality and must appear within the DNS zone. You should repair the Active Directory DNS record registration.

69): How does the internal DNS resolve names Internet without the ISP's DNS server?
Ans: As long as the "." zone does not exist under forward lookup zones in DNS, the DNS service uses the root hint servers. The root hint servers are well-known servers on the Internet that help all DNS servers resolve name queries.

70)How to reinstall the dynamic DNS in a Windows 2000 Active Directory?
Ans:Under the following situations you may want to reinstall the DDNS in a Windows 2000 Active Directory:
Some weird DNS errors have occurred and clearing DNS information has been unsuccessful.
Services that depend upon DNS, such as, the File Replication service (FRS) and/or Active Directory are failing.
The secondary DNS server doesn't support dynamic updates.
To reinstall the dynamic DNS in a Windows 2000 Active Directory,
1. Clear the DNS information.
2. Clear the Caching Reslover.
3. Point all DNS servers to the first DNS server under TCP/IP properties.
4. Re-add the zones and configure them to be Active Directory integrated.
5. Register your A resource record for DNS as well as your start of authority (SOA).

71)How to repair the DNS record registration
Ans:To repair the Active Directory DNS record registration:
Check for the existence of a Root Zone entry. View the Forward Lookup zones in the DNS Management console. There should be an entry for the domain. Other zone entries may exist. There should not be a dot (".") zone. If the dot (".") zone exists, delete the dot (".") zone. The dot (".") zone identifies the DNS server as a root server. Typically, an Active Directory domain that needs external (Internet) access should not be configured as a root DNS server.
The server probably needs to reregister its IP configuration (by using Ipconfig) after you delete the dot ("."). The Netlogon service may also need to be restarted. Further details about this step are listed later in this article.
Manually repopulate the Active Directory DNS entries. You can use the Windows 2000 Netdiag tool to repopulate the Active Directory DNS entries. Netdiag is included with the Windows 2000 Support tools. At a command prompt, type netdiag /fix.
To install the Windows 2000 Support tools:
Insert the Windows 2000 CD-ROM.
Browse to Support\Tools.
Run Setup.exe in this folder.
Select a typical installation. The default installation path is Systemdrive:\Program Files\Support Tools.
After you run the Netdiag utility, refresh the view in the DNS Management console. The Active Directory DNS records should then be listed.
NOTE: The server may need to reregister its IP configuration (by using Ipconfig) after you run Netdiag. The Netlogon service may also need to be restarted.
If the Active Directory DNS records do not appear, you may need to manually re-create the DNS zone.
After you run the Netdiag utility, refresh the view in the DNS Management console. The Active Directory DNS records should then be listed. Manually re-create the DNS zone:
Still need help, contact consultant Your feedback and contributions to this web site

72)How to configure DNS Forwarders
Ans:To ensure network functionality outside of the Active Directory domain (such as browser requests for Internet addresses), configure the DNS server to forward DNS requests to the appropriate Internet service provider (ISP) or corporate DNS servers. To configure forwarders on the DNS server:
Start the DNS Management console.
Right-click the name of the server, and then click Properties.
Click the Forwarders tab.
Click to select the Enable Forwarders check box.
NOTE: If the Enable Forwarders check box is unavailable, the DNS server is attempting to host a root zone (usually identified by a zone named only with a period, or dot ("."). You must delete this zone to enable the DNS server to forward DNS requests. In a configuration in which the DNS server does not rely on an ISP DNS server or a corporate DNS server, you can use a root zone entry.
Type the appropriate IP addresses for the DNS servers that will accept forwarded requests from this DNS server. The list reads from the top down in order; if there is a preferred DNS server, place it at the top of the list.
Click OK to accept the changes.

73)DC's FQDN Does Not Match Domain Name?
Ans: Symptoms: After you promote or install a domain controller, the DNS suffix of your computer name may not match the domain name. Or the FQDN does not match the domain name because a NT 4.0 upgrade automatically clears the Change primary DNS suffix when domain membership changes check box. It is not possible to rename the computer on the Network Identification tab. Also, you may receive NETLOGON events in the System Log with ID:5781 or other error messages that indicate a failure to dynamically register DNS records.
Resolutions: 1. After you upgrade to Microsoft Windows 2000, but before you run dcpromo and obtain the Active Directory Installation Wizard, add the following values to the following registry key:
Value name: SyncDomainWithMembership
Value type: REG_DWORD
Value: 1
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\

2. If you have already promoted to a domain controller, use the Active Directory Installation Wizard to demote to a member server. Click to select the Change primary DNS suffix when domain membership changes check box, and then run dcpromo to promote back to a domain controller.
3. Modify HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ and changed domain=mydomain.com, NV Domain=mydomain.com, SyncDomainWithMembership= 1 (here mydomain.com is yhe donaim name).


74)Primary or Active Directory Integrated DNS
Ans:With Active Directory Integrated DNS, this permits all servers to accept updates. Instead of adding standard secondary DNS servers, you can convert the server from a primary DNS server to an Active Directory Integrated Primary server and configure another domain controller to be a DNS server. With Active Directory Integrated DNS servers, all the servers are primary servers, so when a zone change is made at one server, it is replicated to the others, eliminating the need for a zone transfer.

75)2nd DNS Issues
1. When setup 2nd DNS, make sure you type correct Master DNS Server IP address.
2. Make sure primary DNS and 2nd DNS servers can ping each other and not firewall block them.
3. Make sure primary DNS and 2nd DNS servers point to each other as primary and themselves as secondary.

76)Some A Records don't appear in DNS
Cause: 1. incorrect TCP/IP settings.
2. Register this connection's address in DNS is unchecked.

77)The DSA operation is unable to proceed because of a DNS lookup failure.
Symptoms: 1. When trying to DCPROMO, ,you receive: "The operation failed because: The directory service failed to replicate off changes made locally. The DSA operation is unable to proceed because of a DNS lookup failure."
2. The Event Viewer may list Event ID: 1265 - The DSA operation is unable to proceed because of a DNS lookup failure.
3. DCDiag test display this message: "The DSA operation is unable to proceed because of a DNS lookup failure".
Causes: 1. Incorrect TCP/IP configuration.
2. Incorrect DNS configuration
3. Bad information in DNS Manager.

78)“The procedure entry point DsIsManagedDnW could be located in the dynamic link library NTDSAPI.dll”
Ans: Symptom: when trying to run DCDiag and getting the following error, "the procedure entry point DsIsManagedDnW could be located in the dynamic link library NTDSAPI.dll".
Resolutions: 1. Remove the dcdiag.exe from Controller Panel and install it from w2k/xp DC.
2. The "entry point not found" is typical of a service pack mismatch and the dcdiag.exe is out of sync with the service pack level of your system. To fix, go to the service pack x folder, and find "adminpack.msi" Right click it and select install.

79)Troubleshooting the Domain Locator Process
1) Check Event Viewer on both the client and the DNS server for any errors.
Verify that the IP configuration is correct for your network by using ipconfig /all.
Ping both the DNS IP address and the DNS server name to verify network connectivity and name resolution. .
Use nslookup servername.domain.com command to verify that DNS entries are correctly registered in DNS.
If nslookup command does not succeed, use one of the following methods to reregister records with DNS: a) force host record registration by using ipconfig /register dns; b) force domain controller service registration by stopping/restarting the Netlogon service.
If you still have the same issue, use Network Monitor to monitor network traffic between the client and the domain controller.

80)Which DNS does a VPN client use
1. Assuming both LAN connection and VPN connection have the different DNS because they are assigned by different DHCPs, the active DNS goes with the default gateway.
2. You can pick up which DNS you want to use manually.

81)Which ports are used for DNS
Ans:UDP and TCP port 53. However, the internal DNS clients may not hear answers even though the query has been sent out on 53,until you open the UDP port above 1023.

82)Why I can't perform external name resolution to the root hint servers on the Internet?
A: make sure "." zone does not exist under forward lookup zones in DNS. If you do not delete this setting, you may not be able to perform external name resolution to the root hint servers on the Internet.


83) Why do I have to point my domain controller to itself for DNS?
A: The Netlogon service on the domain controller registers a number of records in DNS that enable other domain controllers and computers to find Active Directory-related information. If the domain controller is pointing to the ISP's DNS server, Netlogon does not register the correct records for Active Directory, and errors are generated in Event Viewer. The preferred DNS setting for the domain controller is itself; no other DNS servers should be listed. The only exception to this rule is with additional domain controllers. Additional domain controllers in the domain must point to the first domain controller (which runs DNS) that was installed in the domain and then to themselves as secondary.

84): Everyone can access our web site on the Internet. But no one can
access the web site internally. Instead, we are point to our Intranet.
A: If you network domain name is the same of your web site name, you should point the web to the web public IP. To do this, open DNS manager and create a host. for example www.chicagotech.net=public ip.

85) *** Can't find server name for address w.x.y.z: Timed out
Cause: the DNS server cannot be reached or the service is not running on that computer.
2. *** Can't find server name for address 127.0.0.1: Timed out
Cause: no servers have been defined in the DNS Service Search Order list
3. *** Can't find server name for address w.x.y.z: Non-existent domain
Cause: there is no PTR record for the name server's IP address.
4.*** ns.domain.com can't find child.domain.com.: Non-existent domain
5. *** Can't list domain child.domain.com.: Non-existent domain
Cause: No separate db file for the domain, thus querying that domain or running a zone transfer on it will produce the above errors.

86)What does netdiag /fix do
A:Netdiag /fix switch is very useful tool to correct issues with DNS and domain controller tests. 1. DNS Test: If the computer is a domain controller, Netdiag verifies all the DNS entries in the Netlogon.dns file to determine if they are correct and updates the appropriate entries if there is a problem. 2. Domain Controller Test: If the domain GUID cached in a local computer on your primary domain is different than the domain GUID saved in a domain controller, Netdiag tries to update the domain GUID on the local computer.

Monday, March 29, 2010

Network Security Cryptography



Network Security  Cryptography


This paper tries to present an insight into cryptography, the ways of implementing it, its uses and implications. Cryptography, the art and science of secret codes has been existent right from the advent of human civilization; it has been used to transmit messages safely and secretively across groups of people so that their adversaries did not get to know their secrets. As civilizations progressed more and more complex forms of cryptography came into being, they were now not only symbolic representations in an unrecognizable form but complex mathematical transforms carried out on the messages. In the present day world cryptography plays a major role in safe transmission of data across the Internet, and other means of communications.
In this paper we have dealt with examples of how different crypto algorithms are implemented, and have tried to cite some of the most used crypto algorithms, like DES- the data encryption standard, RSA, IDEA, RC#4, etc. We have also dealt with some of the applications of these algorithms like link encryption, pretty good privacy, public key cryptography, PEM etc. We have also cited some methods of code-breaking or cryptanalysis like the mathematical attack, the brute force attack and the power analysis.
Cryptography
If you want something to stay a secret, don't tell anyone, don't write it down. If you do have to send it to someone else, hide it in another message so that only the right person will understand. Many creative methods of hiding messages have been invented over the centuries. Cryptography can be defined as the art and science of secret codes. It is a collection of techniques that transform data in ways that are difficult to mimic or reverse by some one who does not know the secret. These techniques involve marking transforming and reformatting the messages to protect them from disclosure, change or both. Cryptography in the computer age basically involves the translation of the original message into a new and unintelligible one by a mathematical algorithm using a specific "key". People mean different things when they talk about cryptography. Children play with toy ciphers and secret languages. However, these have little to do with real security and strong encryption. Strong encryption is the kind of encryption that can be used to protect information of real value against organized criminals, multinational corporations, and major governments. Strong encryption used to be only military business; however, in the information society it has become one of the central tools for aintaining privacy and confidentiality.
Why do we need cryptography?
The art of long distance communication has been mastered by civilizations many centuries ago. The transmission of secret political or confidential information was a problem ever since. To solve this
problem to some extent, secret codes were developed by groups of people who had to carry out such kind of secretive communications. These codes were designed to transform words into code words using some basic guide lines known only to their members. Now messages could be sent or received with a reduced danger of hacking or forgery as the code breaker would have to struggle really hard to break the code.
As time progressed and radio, microwave and internet communication developed, more complex and safer codes started to evolve. The traditional use of cryptography was to make messages unreadable to the enemy during wartime. However the introduction of the computing age changed this perspective dramatically. Through the use of computers, a whole new use for information hiding was evolved. Around the early 1970's the private sector began to feel the need for cryptographic methods to protect their data. This could include 'sensitive information' (corporate secrets), password files or personal records.
Needfor Cryptography
Some day to day examples
Encryption technology is used nowadays in almost any of the digital communication systems. For example, the most common one is the satellite T.V or the cable T.V. All the signals are available in the air, but the programs can be viewed only by those subscribers who have made the payment. This is done by a simple password security system. The subscriber gets an authenticated password on payment and can use it only for the time he has paid up after which it gets lapsed. Another common application of the encryption technique is the ATM card. Here also the transaction is done only on the acceptance of a secure and authenticated password. The mobile phones and for that matter even the internet connections are based on small scale cryptographic techniques.
Crypto algorithm
The crypto algorithm specifies the mathematical transformation that is performed on data to encrypt or decrypt it. A crypto algorithm is a procedure that takes the plain text data and transforms it in to cipher text in a reversible way. A good algorithm produces cipher text that yields very few clues about either the key or the plain text that produced it. Some algorithm are for stream ciphers which encrypt a digital data stream bit by bit .The best known algorithm are for the block ciphers which transform data in fixed sized blocks one at a time.
• Stream ciphers
Stream cipher algorithm is designed to accept a crypto key and a stream of plain text to produce a stream of cipher text.
• Block cipher
Block ciphers are designed to take data blocks of a specific size, put them with a key of a particular size and yield a block of cipher text of a certain size. Block ciphers are
analyzed and tested for their ability to encrypt data blocks of their given block size. A reasonable cipher should generate a cipher text that has as few noticeable properties as possible. A statistical analysis of cipher text generated by the block cipher algorithm should find that individual data bits as well as patterns of bits appear completely random. Non random patterns are the first thing for which a code breaker looks as they usually provide the entering wedge needed to crack a code.
Cipher modes
The term cipher mode refers to a set of techniques used to apply to a block cipher to a data stream. Several modes have been developed to disguise repeated plaintext blocks and improve security of the block cipher. Each mode defines a method of combining the plaintext , crypto key, and encrypted cipher text in a special way to generate the stream of cipher text actually transmitted to the recipient In theory there could be countless different ways of combining and feeding back the inputs and outputs of a cipher. In practice, four basic modes are used.
• Electronic Code Book (ECB)
It is the simplest of all the modes .The cipher is simply applied to the plaintext block by block it is the most efficient mode. It can be speedup by using parallel hardware and unlike other modes, does not require an extra data word for seeding a feed back loop. However a block of padding may be needed to guarantee that full blocks are provided for encryption and decryption. ECB has security problems in the sense that repeated plain text blocks yield repeated cipher text blocks.
• Cipher Block Chaining (CBC)
This mode hides patterns in the plaintext block by systematically combining each plaintext block with a cipher text block before actually encrypting it the two blocks are combined bit by bit using the
exclusive or operation. In order to guarantee that there is always some random looking cipher text to apply to the actual plaintext the process is started with a block of random bits called the initialization vector. Two messages will never yield the same cipher text even if the plain texts are identical as long as the initialization vector is different. In most applications the initialization vector is added at the beginning of message in plain text. A shortcoming of CBC is that encrypted messages may be as many as two blocks longer than the same message in ECB mode. One of the blocks is added to transmit the initialization vector to the recipient. Proper decryption depends on the initialization vector to start the feedback process. The other block is added as padding so that a full block is always encrypted or decrypted.
• CFB - Cipher Feedback mode
CFB is similar to CBC in that, it feeds the cipher text block back to the block cipher. However it is different because the block cipher doesn’t directly encrypt the plain text. Instead it is used to generate a constantly varying key that encrypts the plain text with a vernam cipher. In other words blocks of cipher text are exclusive or’ed with successive blocks of data generated by the block cipher to generate the cipher text. This mode is also called the cipher text auto key (CTAK).The advantage with this method is that it is not limited to the cipher block size. This mode can be adapted to work with smaller blocks down to bits. Like CBC however it needs an initialization vector to be sent for decryption.
• OFB - Output Feedback
It is similar to CFB but it is simpler. It uses the block cipher all by itself to generate the vernam keys. The key stream doesn’t depend on the data stream at all. Here the block cipher has nothing to do with processing the message .It is only used to generate the keys. This mode is also called auto key mode. The advantage is that like CFB length of the plain text need not have to fit into block boundaries, also each block requires the initialization vector and doesn’t depend on the data stream, so the decryption key stream can be prepared and kept at the receivers end with the knowledge of the key and the initialization vector.
Crypto Algorithms
1. DES
This is a widely used algorithm. It was developed by IBM (previously Lucifer) and was adopted as an official Federal Information Processing Standard (FIPS PUB 46) in 1976.This algorithm uses a 64 bit key (including 8 parity bits +56 key bits), converting 64 bit blocks of plaintext in to 64 bit blocks of code (block cipher method).This is done by putting the original text through a series of permutations and substitutions. The results are then merged with the original plain text using an XOR operation. This encryption sequence is repeated 16 times using a different arrangement of the key bits each time.
2. One time pads
A one-time pad is a very simple yet completely unbreakable symmetric cipher. That is it uses the same key for encryption as for decryption. As with all symmetric ciphers, the sender must transmit the key to the recipient via some secure channel, otherwise the recipient won't be able to decrypt the cipher ext. The key for a one-time pad cipher is a string of random bits, usually generated by a cryptographically strong pseudo-random number generator (CSPRNG).With a one-time pad, there are as many bits in the key as in the plaintext. This is the primary drawback of a one-time pad, but it is also the source of its perfect security. It is essential that no portion of the key should ever be used for another encryption (therefore the name "one-time pad"), otherwise cryptanalysis can break the cipher. The algorithm is very simple for example an ex-or operation between the plain text and the key, the same ex-or operation would also give back the plain text.
Ciphertext = plaintext (+) key
Plaintext = ciphertext (+) key
However the security of the one time pad is dependant upon the randomness of the generated key. The code is supposed to be safe even from brute force attack, running the text through all possible keys, because equal number of probably correct plaintext messages would be generated.
3. Triple DES
Triple encoding makes DES encoded text even more secure. It is equivalent to having a 112 bit key length. However, triple DES is significantly slower than commercial alternatives with similar key lengths.
4. Rivest Cipher #4
Rc4 is a symmetrical stream cipher developed by Ron Rivest. It has a key whose size can be varied according to the level of security required, generally it can be used with a 128 bit key length. This algorithm is fairly immune to differential crypt analysis but since it is used with short key lengths it is vulnerable to brute force cracking.
5. Idea
Idea is an algorithm which appeared in 1990. It was developed at the Swiss federal institute of technology. Its security is based not on hiding the algorithm but on keeping a secret key. Its key is 128 bit long key which makes it more attractive than DES, and it can be used with the usual block ciphers. This algorithm is publicly available and easy to implement. It is suitable for e-commerce, it can be exported and used world wide. Of late none of the cryptanalysis techniques have worked against IDEA. A brute force attack (with its 128 bit key length) would take trying 1 billion keys/sec for over a billion yrs would still not find the key.
6. Skip Jack
It is a block encryption algorithm developed by NSA (National security agency –USA). It encrypts 64 bit blocks using an 80 bit key. The usual block ciphers can be used to implement it to encrypt streams of data. It is provided in prepackaged encryption chipsets and in the Fortezza crypto card, a pc card containing a crypto processor and storage for keying material. The disadvantage of skipjack is that it is very less publicly known {reportedly to keep NSA’s design techniques secret}.It is fairly resistant to differential cryptanalysis and other short cut attacks. NSA’s skipjack is being promoted to protect military communications in the Defense Messaging System (DMS) which reflects a measure of confidence that skipjack is secure.
7. RSA public key algorithm
The best known and most popular embodiment of the public key idea is the RSA also named after its inventors Ronald Rivest, Adi Shamir and Leonard Adleman. The high level of security the RSA algorithm offers derives from the difficulty of decomposing large integers in to prime factors. Two primes which when multiplied by one another give the original number. Prime factoring of very large numbers is an important field in the number theory .One of the drawbacks with RSA algorithm compared with symmetrical methods is that encrypting and decrypting messages takes much more computing power .The fastest RSA chip now in existence can only manage a through put of 600 k bits when using 512 b it primes. Comparable DES hardware implementations are anything from 1000 to 10000 times faster. At present Des software implementation can encrypt around 100 times faster than the RSA algorithm. Crypt analysis can be done by factorizing the key in to two primes, estimates for factoring a 512 bit key show that computer system running at a million operations a sec (1 MIPS) and using current algorithms would take 420000 years to find the prime factors involved.
8. AES
The AES is a new algorithm that has now replaced DES as the new standard in the NIST. The Advanced Encryption Standard (AES) provides a better combination of safety and speed than DES. Using 128-bit secret keys, AES offers higher security against brute-force attack than the old 56-bit
DES keys, and AES can use larger 192-bit and 256-bit keys, if necessary. AES is a block cipher, and encrypts data in fixed-size blocks, but each AES cycle encrypts 128 bits-twice the size of DES blocks. While DES was designed for hardware, AES runs efficiently in a broad range of environments, from programmable gate arrays, to smart cards, to desktop computer software and browsers. In 2000, NIST selected Rijndael, an encryption algorithm developed by two Belgian cryptographers, as the new AES. There are a few products that already use the Rijndael algorithm, notably Unix's NetBSD open-source version. Rijndael has also appeared as an option in several desktop file-encryption programs. The AES is expected to be the FIPS (Federal information processing standards) quite soon.
Internet cryptography techniques (Applications of the crypto algorithms)
• Point-to-point link encryption
• IP link encryption
• A virtual private network(VPN) constructed with IP security protocol routers
• A VPN constructed with IPSEC firewalls
• Public key algorithm with Pretty Good Privacy(PGP)
• E-mail with privacy enhanced mail (PEM)
• Water marking.
• Point-to-point link encryption
This produces a fully isolated connection between a pair of computers by applying crypto to the data link. It yields the highest security by being the most restrictive in physical and electronic access. It is not necessarily an internet solution since it doesn’t need to use TCP/IP software. It is the simplest design, but the most expensive to implement and extend.
• IP link encryption
This produces a highly secure extensible TCP/IP network by applying crypto to the data link and by restricting physical access to hosts on the network. This architecture blocks communication with untrusted hosts and sites. Sites use point to point interconnections and apply encryption to all traffic on those interconnections.
• VPN construction with IP security
This is a virtual private newt that uses the internet to carry traffic between trusted sites. Crypto is applied at the internet layer using IPSEC. This approach uses encrypting routers and doesn’t provide the sites with access to untrusted internet sites.
• VPN construction with IPSEC firewalls
This is a different approach to the VPN that uses encrypting firewalls instead of encrypting routers. Crypto is still applied at the internet layer using IPSEC (IP security protocol).The firewalls encrypt all traffic between trusted sites and also provide control access to untrusted hosts. Strong firewall access control is necessary to reduce the risk of attacks on the crypto mechanisms as well as attacks on hosts within the trusted sites.
Digital signature
Digital signatures can be used to check the authenticity of the author of the message using the above mentioned technique. In 1991the national institute of standards and technology (NIST) decided on a standard for digital signatures, DSS (digital signature standard). DSS proposes an algorithm for digital signatures (DSA, digital signatures algorithm) although this is not based on the RSA but on the public key implementation of the “discrete logarithm problem” (what value must the exponent x assume to satisfy y= g ^x mod p where p is a prime. While the problem underlying this method is just as hard to solve as RSA’s prime factor decomposition, many people have claimed that DSA’s security is not perfect. After massive criticism its length was finally increased from 512 to 1024 bits. DSS is expected to become an official standard for US Govt. bureaus in not too distant future.
• PEM
PEM is the standard for encrypting messages on the internet’s mail service. It uses both RSA public key method and the symmetrical DES method to send a file in encrypted form, it is first encrypted using a randomly generated DES key generated using a DES algorithm. The DES key itself is then encoded with the recipient’s public key on the RSA system and sent along with the DES encoded file. The advantage of this is that only a small part of the message, the DES key has to be encoded using the time consuming RSA algorithm. The contents of the message itself are encrypted much faster using the DES algorithm alone.
• Message Digests
There is one more important encryption technique worth mentioning and that is the one way function. It is basically a non reversible quick encryption. In other words encrypting is easy but decrypting is not. While encryption could take a few seconds, decryption could take 100s or 1000s or millions of years even for the most powerful computers. These are used basically to test the integrity of a document or file by generating a digital fingerprint using special hash functions on the document. Assume that you have a document to send someone or store for the future and you need a way to prove at sometime that the document has been altered. You run a one way function which produces a fixed length value called a hash (also called a message digest). The hash is a unique signature of a document that you can keep and send with the document. The recipient can run the same one way function to produce a hash that should match the one you sent with the document. If the hashes don’t match the document has been altered or corrupted.
• Water marking
A watermark is that which is actually imperceptibly added to the cover-signal in order to convey the hidden data. It is used to protect the copy rights of the author on the internet. A water mark is a hidden file consisting of either a picture or data that gets copied with the document when ever it is downloaded from the web, and because of this the article cannot be unauthorizedly copied or distributed.
Latest crypto techniques
The policy about regulating technology ends up being obsolete by technological innovations. Trying to regulate confidentiality by regulating encryption closes one door and leaves two open steganography and winnowing.
• Steganography
An encrypted message looks garbage like, and alert people that there is something to hide. But what if the message is totally innocuous looking? This is an old trick that started centuries ago with writing in ink that is invisible until the paper has been heated. The microdot, a piece of film containing a very highly reduced image of the secret message and embedded in the punctuation marks of a normal document, was invented during World War II.. For example if you used the least significant bit of each pixel in a bitmap image to encode a message the impact on the appearance of the image would not be noticeable. This is known as steganography, or covered writing. A 480 pixel wide by 100 pixel high image - smaller than many WWW home page banners, could theoretically contain a message of more than 5,000 characters. The encoding is quite easy with a computer - and no complicated mathematics at
all. And of course the same principles apply to audio and video files as well. The image can be used simply as a carrier, with the message being first encrypted.
• Winnowing and Chaffing
Just as the name suggests the above technique believes in adding chaff (garbage data) to the wheat (message) before sending the message and then winnowing or removing the chaff from the wheat at the receiver. Since winnowing does not use encryption it is not affected by the regulations on crypto products. The message is first broken into packets and then each packet is mac’ed using a mac program such as (HMAC-SHA1). This is very similar to running the program through a hash function. Then chaff is added (chaffing) to the packets of mac’ed data before it is sent. At the receiving end only those packets are accepted that produce the same mac (showing that no changes have been made) and then the chaff is removed, this is called winnowing.
Cryptanalysis
There are many kinds of cryptanalytic techniques:
1) Differential cryptanalysis.
2) Linear cryptanalysis.
3) Brute force cracking
4) Power analysis
5) Timing analysis, etc.
Cryptographers have traditionally analyzed the security of ciphers by modeling crypto algorithms as ideal mathematical objects. A modern cipher is conventionally a black box that accepts plaintext inputs and provides cipher text outputs. Inside this box, the algorithm maps the inputs to the outputs using a predefined function that depends on the value of a secret key. The black box is described mathematically and formal analysis is used to examine the systems security. In a modern cipher an algorithms security rests solely on the concealment of the secret key. Thus attack strategies often reduce to methods that can expose the value of the secret key. Unfortunately hardware implementations of the algorithm can leak information about the secret key, which the adversaries can use.
Mathematical attacks
Techniques such as differential and linear cryptanalysis introduced in early 1990s are representative of traditional mathematical attacks. Differential and linear cryptanalysis attacks work by exploiting statistical properties of crypto algorithms to uncover potential weaknesses. These attacks are not dependent on a particular implementation of the algorithm but on the algorithm itself, therefore they can be broadly applied. Traditional attacks however require the acquisition and manipulation of large amounts of data. Attacks that exploit weaknesses in a particular implementation are an attractive alternative and are often more likely to succeed in practice.
Implementation attacks
The realities of a physical implementation can be extremely difficult to control and often result in unintended leakage of side channel information like power dissipation, timing information, faulty outputs etc. The leaked information is often correlated to the secret key, thus enemies monitoring the information may be able to learn the secret key and breach the security of the crypto system. Algorithms such as DES, RSA which are now being implemented in smart cards also are under a considerable threat. Smart cards are often used to store crypto keys and execute crypto algorithms. Data on the card is also stored using cryptographic techniques.
Power consumption is one of the potential side channel information; generally supplied by an external source it can be directly observed. All calculations performed by the smartcard operate on logical 0s or 1s. Current technological constraints result in differential power consumptions when manipulating a logic one or a logic zero, based on a spectral analysis of the power curve or based on the timing between the one and the zero the secret code can be cracked by the adversaries.
Countermeasures
Many countermeasures are being worked out to prevent implementation attacks such as power analysis or timing analysis. These attacks are normally based on the assumption that the operations being attacked are occurring at fixed intervals of time. If the operations are randomly shifted in time then statistical analyisis of side channel information becomes very difficult. Another side of the coin is that the hardware implementations must be carefully designed so that they do not leak any side channel information. Hard ware design methodologies are often difficult to design, analyse and test, hence software methods of introducing delay or data masking are the only easy methods to overcome this problem.
Conclusion
The internet has brought with it an unparalleled rate of new technology adoption. The commercially established, the industry and the armed forces would need an assortment of cryptographic products and other mechanisms to provide privacy, authentication, message integrity and trust to achieve their missions. These mechanisms demand procedures, policies and law. However, cryptography is not an end unto itself but the enabler of safe business and communication. Good cryptography and policies are therefore as essential for the future of internet based communications as the applications that utilize them.