Web Technology and Commerce Unit-5 by Arun Pratap Singh
Web Technology and Commerce Unit-5 by Arun Pratap Singh
Web Technology and Commerce Unit-5 by Arun Pratap Singh
e
m (mod N).
As noted earlier, this basic scheme is not very secure. To prevent attacks, one can first apply
a cryptographic hash function to the message m and then apply the RSA algorithm described
above to the result. This approach can be proven secure in the so-called random oracle model
.
Most early signature schemes were of a similar type: they involve the use of a trapdoor
permutation, such as the RSA function, or in the case of the Rabin signature scheme, computing
square modulo composite n. A trapdoor permutation family is a family of permutations, specified
by a parameter, that is easy to compute in the forward direction, but is difficult to compute in the
reverse direction without already knowing the private key. However, for every parameter there is
a "trapdoor" (private key) which when known, easily decrypts the message. Trapdoor
permutations can be viewed as public-key encryption systems, where the parameter is the public
PREPARED BY ARUN PRATAP SINGH 75
75
key and the trapdoor is the secret key, and where encrypting corresponds to computing the
forward direction of the permutation, while decrypting corresponds to the reverse direction.
Trapdoor permutations can also be viewed as digital signature schemes, where computing the
reverse direction with the secret key is thought of as signing, and computing the forward direction
is done to verify signatures. Because of this correspondence, digital signatures are often
described as based on public-key cryptosystems, where signing is equivalent to decryption and
verification is equivalent to encryption, but this is not the only way digital signatures are computed.
Used directly, this type of signature scheme is vulnerable to a key-only existential forgery attack.
To create a forgery, the attacker picks a random signature and uses the verification procedure
to determine the message m corresponding to that signature. In practice, however, this type of
signature is not used directly, but rather, the message to be signed is first hashed to produce a
short digest that is then signed. This forgery attack, then, only produces the hash function output
that corresponds to , but not a message that leads to that value, which does not lead to an
attack. In the random oracle model, this hash-then-sign form of signature is existentially
unforgeable, even against a chosen-plaintext attack.
There are several reasons to sign such a hash (or message digest) instead of the whole
document.
For efficiency: The signature will be much shorter and thus save time since hashing is
generally much faster than signing in practice.
For compatibility: Messages are typically bit strings, but some signature schemes operate
on other domains (such as, in the case of RSA, numbers modulo a composite number N). A
hash function can be used to convert an arbitrary input into the proper format.
For integrity: Without the hash function, the text "to be signed" may have to be split
(separated) in blocks small enough for the signature scheme to act on them directly. However,
the receiver of the signed blocks is not able to recognize if all the blocks are present and in
the appropriate order.
Applications of digital signatures
As organizations move away from paper documents with ink signatures or authenticity stamps,
digital signatures can provide added assurances of the evidence to provenance, identity, and
status of an electronic document as well as acknowledging informed consent and approval by a
signatory. The United States Government Printing Office (GPO) publishes electronic versions of
the budget, public and private laws, and congressional bills with digital signatures. Universities
including Penn State, University of Chicago, and Stanford are publishing electronic student
transcripts with digital signatures.
Below are some common reasons for applying a digital signature to communications:
PREPARED BY ARUN PRATAP SINGH 76
76
Authentication-
Although messages may often include information about the entity sending a message, that
information may not be accurate. Digital signatures can be used to authenticate the source of
messages. When ownership of a digital signature secret key is bound to a specific user, a valid
signature shows that the message was sent by that user. The importance of high confidence in
sender authenticity is especially obvious in a financial context. For example, suppose a bank's
branch office sends instructions to the central office requesting a change in the balance of an
account. If the central office is not convinced that such a message is truly sent from an authorized
source, acting on such a request could be a grave mistake.
Integrity-
In many scenarios, the sender and receiver of a message may have a need for confidence that
the message has not been altered during transmission. Although encryption hides the contents
of a message, it may be possible to change an encrypted message without understanding it.
(Some encryption algorithms, known as nonmalleable ones, prevent this, but others do not.)
However, if a message is digitally signed, any change in the message after signature invalidates
the signature. Furthermore, there is no efficient way to modify a message and its signature to
produce a new message with a valid signature, because this is still considered to be
computationally infeasible by most cryptographic hash functions (see collision resistance).
Non-repudiation-
Non-repudiation, or more specifically non-repudiation of origin, is an important aspect of digital
signatures. By this property, an entity that has signed some information cannot at a later time
deny having signed it. Similarly, access to the public key only does not enable a fraudulent party
to fake a valid signature.
Note that these authentication, non-repudiation etc. properties rely on the secret key not having
been revoked prior to its usage. Public revocation of a key-pair is a required ability, else leaked
secret keys would continue to implicate the claimed owner of the key-pair. Checking revocation
status requires an "online" check, e.g. checking a "Certificate Revocation List" or via the "Online
Certificate Status Protocol". Very roughly this is analogous to a vendor who receives credit-cards
first checking online with the credit-card issuer to find if a given card has been reported lost or
stolen. Of course, with stolen key pairs, the theft is often discovered only after the secret key's
use, e.g., to sign a bogus certificate for espionage purposes.
FIREWALLS :
A firewall is a system designed to prevent unauthorized access to or from a private network.
Firewalls can be implemented in both hardware and software, or a combination of both. Firewalls
PREPARED BY ARUN PRATAP SINGH 77
77
are frequently used to prevent unauthorized Internet users from accessing private networks
connected to the Internet, especially intranets. All messages entering or leaving the intranet pass
through the firewall, which examines each message and blocks those that do not meet the
specified security criteria.
Firewalls can be either hardware or software but the ideal firewall configuration will consist of
both. In addition to limiting access to your computer and network, a firewall is also useful for
allowing remote access to a private network through secure authentication certificates and logins.
Hardware firewalls can be purchased as a stand-alone product but are also typically found in
broadband routers, and should be considered an important part of your system and network set-
up. Most hardware firewalls will have a minimum of four network ports to connect other computers,
but for larger networks, business networking firewall solutions are available.
Software firewalls are installed on your computer (like any software) and you can customize it;
allowing you some control over its function and protection features. A software firewall will protect
your computer from outside attempts to control or gain access your computer.
An illustration of where a firewall would be located in a network.
PREPARED BY ARUN PRATAP SINGH 78
78
Classification of Firewall :
Characterized by protocol level it controls in
Packet filtering
Circuit gateways
Application gateways
Combination of above is dynamic packet filter
Firewalls Packet Filters
Firewalls - Application Level Gateway (or Proxy)
Firewalls - Circuit Level Gateway-
PREPARED BY ARUN PRATAP SINGH 79
79
Why use a firewall?
Protect a wide range of machines from general probes and many attacks.
Provides some protection for machines lacking in security.
First generation: packet filters
The first paper published on firewall technology was in 1988, when engineers from Digital
Equipment Corporation (DEC) developed filter systems known as packet filter firewalls. This
fairly basic system was the first generation of what is now a highly involved and technical internet
security feature. At AT&T Bell Labs, Bill Cheswick and Steve Bellovin were continuing their
research in packet filtering and developed a working model for their own company based on their
original first generation architecture.
Packet filters act by inspecting the "packets" which are transferred between computers on the
Internet. If a packet matches the packet filter's set of filtering rules, the packet filter will drop
(silently discard) the packet or reject it (discard it, and send "error responses" to the source).
This type of packet filtering pays no attention to whether a packet is part of an existing stream of
traffic (i.e. it stores no information on connection "state"). Instead, it filters each packet based only
on information contained in the packet itself (most commonly using a combination of the packet's
source and destination address, its protocol, and, for TCP andUDP traffic, the port number).
TCP and UDP protocols constitute most communication over the Internet, and because TCP and
UDP traffic by convention uses well known ports for particular types of traffic, a "stateless" packet
filter can distinguish between, and thus control, those types of traffic (such as web browsing,
remote printing, email transmission, file transfer), unless the machines on each side of the packet
filter are both using the same non-standard ports.
PREPARED BY ARUN PRATAP SINGH 80
80
Packet filtering firewalls work mainly on the first three layers of the OSI reference model, which
means most of the work is done between the network and physical layers, with a little bit of
peeking into the transport layer to figure out source and destination port numbers.When a packet
originates from the sender and filters through a firewall, the device checks for matches to any of
the packet filtering rules that are configured in the firewall and drops or rejects the packet
accordingly. When the packet passes through the firewall, it filters the packet on a protocol/port
number basis (GSS). For example, if a rule in the firewall exists to block telnet access, then the
firewall will block the TCP protocol for port number 23.
Second generation: "stateful" filters
From 1989-1990 three colleagues from AT&T Bell Laboratories, Dave Presetto, Janardan
Sharma, and Kshitij Nigam, developed the second generation of firewalls, calling themCircuit-
level gateways.
Second-generation firewalls perform the work of their first-generation predecessors but operate
up to layer 4 (transport layer) of the OSI model. This is achieved by retaining packets until enough
information is available to make a judgement about its state. Known as stateful packet inspection,
it records all connections passing through it and determines whether a packet is the start of a new
connection, a part of an existing connection, or not part of any connection. Though static rules
are still used, these rules can now contain connection state as one of their test criteria.
Certain denial-of-service attacks bombard the firewall with thousands of fake connection packets
in an attempt to overwhelm it by filling its connection state memory.
Third generation: application layer
Marcus Ranum, Wei Xu, and Peter Churchyard developed an Application Firewall known as
Firewall Toolkit (FWTK). In June 1994, Wei Xu extended the FWTK with the Kernel enhancement
of IP filter and socket transparent. This was known as the first transparent Application firewall,
released as a commercial product of Gauntlet firewall at TIS. Gauntlet firewall was rated one of
the number 1 firewalls during 1995-1998.
The key benefit of application layer filtering is that it can "understand" certain applications and
protocols (such as File Transfer Protocol (FTP), Domain Name System (DNS), orHypertext
Transfer Protocol (HTTP)). This is useful as it is able to detect if an unwanted protocol is
attempting to bypass the firewall on an allowed port, or detect if a protocol is being abused in any
harmful way. As of 2012, the so-called next-generation firewall (NGFW) is nothing more than the
"widen" or "deepen" inspection at application-stack. For example, the existing deep packet
inspection functionality of modern firewalls can be extended to include i) Intrusion prevention
PREPARED BY ARUN PRATAP SINGH 81
81
systems (IPS); ii) User identity integration (by binding user IDs to IP or MAC addresses for
"reputation"); and/or iii) Web Application Firewall (WAF). WAF attacks may be implemented in the
tool WAF Fingerprinting utilizing timing side channels (WAFFle).
Firewall Layer of Operation :
Network Layer
Application Layer
Network Layer :
Makes decision based on the source, destination addresses, and ports in individual IP
packets.
Based on routers
Has the ability to perform static and dynamic packet filtering and stateful inspection.
Static & Dynamic Filtering-
Static Packet Filtering looks at minimal information in the packets to allow or block traffic
between specific service ports
Offers little protection.
Dynamic Packet Filtering maintains a connection table in order to monitor requests and
replies.
Stateful Inspection
Compares certain key parts of the packet to a database of trusted information. Incoming
information is compared to outgoing information characteristics. Information is allowed
through only If comparison yields a reasonable match.
Application Layer :
They are generally, hosts running proxy servers which perform logging and auditing of
traffic through the network.
Logging and access control are done through software components.
Proxy Services
Application that mediates traffic between a protected network and the internet.
Able to understand the application protocol being utilized and implement protocol specific
security.
Application protocols include: FTP, HTTP, Telnet etc.