Topics To Learn
Topics To Learn
Topics to learn:
Network security: Electronic Mail Security:
Integrates these into a general-purpose algorithm that is processor-independent and easy to use.
Package and documentation, including source code, are freely available on-line.
NOTATIONS:
EP = public-key encryption
DP = public-key decryption
EC = symmetric encryption
DC = symmetric decryption
H = hash function
} = concatenation
Authentication
Confidentiality
Compression
Email compatibility
AUTHENTICATION
Sender signs the hash using his private key and prepends the result to the
message.
Receiver uses the sender’s public key to verify the signature and recover the
hash code.
Receiver generates a new hash code for M and compares it with the decrypted
hash code.
CONFIDENTIALITY
K is encrypted using the recipient’s public key, and prepended to the message.
COMPRESSION
when using PGP will have binary data to send (encrypted message etc.)
hence PGP must encode raw binary data into printable ASCII characters
(a) Generic transmission diagram (from A) (b) Generic reception diagram (to B)
S/MIME
• Secure/Multipurpose Internet Mail Extensions
• S/MIME will emerge as the industry standard for commercial and organizational use,
while PGP remains for personal e-mail security for many users.
E-mail History
o MIME version
o content type
o Content-ID
o Content-description
The objective is to provide reliable delivery across the largest range of environments.
• S/MIME Functions
• enveloped data
• clear-signed data
• Recipients without S/MIME capability can view the message but cannot
verify the signature.
• Encrypted data may be signed and signed data or clear signed data may
be encrypted.
1. ENVELOPED DATA
2. For each recipient, encrypt the session key with the recipient’s public RSA key.
3. For each recipient, prepare a block known as RecipientInfo that contains an identifier of
the recipient’s public-key certificate, an identifier of the algorithm used to encrypt the
session key, and the encrypted session key.
Content-Type:application/pkcs7-mime;smime-type=envelopeddata;
name=smime.p7m
Content-Transfer-Encoding: base64
• To recover the encrypted message, the recipient first strips off the base64
encoding.Then the recipient’s private key is used to recover the session key.Finally, the
message content is decrypted with the session key.
2. SIGNED DATA
Content-Type:application/pkcs7-mime;smime-type=signeddata;
name=smime.p7m
Content-Transfer-Encoding: base64
3. CLEAR SIGNING
• Clear signing is achieved using the multipart content type with a signed subtype
• The first part can be any MIME type but must be prepared so that it will not be altered
during transfer from source to destination.
• The second part has a MIME content type of application and a subtype of pkcs7-
signature
Content-Type: multipart/signed;
protocol="application/pkcs7-signature";
micalg=sha1; boundary=boundary42
—boundary42
Content-Type: text/plain
—boundary42
Content-Transfer-Encoding: base64
• The protocol parameter indicates that this is a two-part clear-signed entity. The micalg
parameter indicates the type of message digest used. The receiver can verify the
signature by taking the message digest of the first part and comparing this to the
message digest recovered from the signature in the second part.
4. REGISTRATION REQUEST
5. CERTIFICATES-ONLY MESSAGE
• The steps involved are the same as those for creating a signedData message, except
that there is no message content and the signerInfo field is empty.
1. Key generation: the user of some related administrative utility must be able of
generating separate Diffie-Hellman and DSS key pairs and should be capable of
generating RSA key pairs
3. Certificate storage and retrieval: A user requires access to a local list of certificates
in order to verify incoming signature and to encrypt outgoing messages
IP SECURITY
• In CERTs(Computer emergency response team) 2001 annual report it listed 52,000
security incidents
IP spoofing
attackers listen for userids and passwords and then just walk into target
systems
• users have some security concerns that cut across protocol layers.
• By implementing security at the IP level, an organization can ensure secure networking
not only for applications that have security mechanisms but also for the many security-
ignorant applications.
• provides
• authentication
• confidentiality
• key management
APPLICATIONS OF IPSec
• Provides the capability to secure communications across a LANs, across public &
private WANs, & across the Internet
An IP security Scenario
IPSec in a firewall is resistant to bypass if all traffic from the outside must use IP and the
firewall is the only means of entrance from the Internet into the organization.
IPSec is below the transport layer (TCP, UDP) and so is transparent to applications.
There is no need to change software on a user or server system when IPsec is
implemented in the firewall or router
can provide security for individual users. This is useful for offsite workers and for setting
up a secure virtual subnetwork within an organization for sensitive applications.
It also plays a vital role in the routing architecture required for internetworking.
insure redirect messages come from the router to which initial packet was sent
IP SECURITY ARCHITECTURE
The IPSec specification consists of numerous documents
2. Authentication Header (AH): Covers the packet format and general issues
related to the use of the AH for packet authentication.
3. Encapsulating Security Payload (ESP): Covers the packet format and general
issues related to the use of the ESP for packet encryption and optionally
authentication.
• Security Parameters Index (SPI): A bit string assigned to this SA and having local
significance only. The SPI is carried in AH and ESP headers to enable the receiving system to
select the SA under which a received packet will be processed.
• IP Destination Address: This is the address of the destination endpoint of the SA,which may
be an end-user system or a network system such as a firewall or router.
• Security Protocol Identifier: This field from the outer IP header indicates whether the
association is an AH or ESP security association. Hence, in any IP packet, the security
association is uniquely identified by the Destination Address in the IPv4 or IPv6 header and the
SPI in the enclosed extension header (AH or ESP).
Sequence Number Counter: A 32-bit value used to generate the Sequence Number
field in AH or ESP required for all implementations).
Lifetime of this Security Association: A time interval or byte count after which an SA
must be replaced with a new SA (and new SPI) or terminated, plus an indication of
which of these actions should occur (required for all implementations).
Path MTU: Any observed path maximum transmission unit (maximum size of a packet
that can be transmitted without fragmentation) and aging variables (required for all
implementations).
Next Layer Protocol: The IP protocol header (IPv4,IPv6,or IPv6 Extension) includes a
field (Protocol for IPv4, Next Header for IPv6 or IPv6 Extension) that designates the
protocol operating over IP.
Name: A user identifier from the operating system. This is not a field in the IP or upper-
layer headers but is available if IPsec is running on the same operating system as the
user.
Local and Remote Ports: These may be individual TCP or UDP port values, an
enumerated list of ports,or a wildcard port.
IPSec SERVICES
Access control
Connectionless integrity
Confidentiality (encryption)
Transport Mode
Tunnel Mode
Next Header(8 bits): Identifies the type of header immediately following this header.
Authentication Data(variable): A variable length field that contains the MAC for this
packet.
For transport mode AH using IPv4, the AH is inserted after the original IP header and before the
IP payload (e.g., a TCP segment); Authentication covers the entire packet, excluding mutable
fields in the IPv4 header that are set to zero for MAC calculation.
In the context of IPv6, AH is viewed as an end-to-end payload; that is, it is not examined or
processed by intermediate routers. Therefore, the AH appears after the IPv6 base header and
the hop-by-hop, routing, and fragment extension headers.
• For tunnel mode AH, the entire original IP packet is authenticated, and the AH is
inserted between the original IP header and a new outer IP header (Figure 1.6c). The
inner IP header carries the ultimate source and destination addresses, while an outer IP
header may contain different IP addresses (e.g., addresses of firewalls or other security
gateways).
• The outer IP header (and in the case of IPv6, the outer IP extension headers) is
protected except for mutable and unpredictable fields.
• Sequence Number (32 bits): A monotonically increasing counter value; this provides
an anti-replay function
• Pad Length (8 bits): the number of pad bytes immediately preceding this field
• Next Header (8 bits): identifies the type of data in the payload data field
• Integrity check value (variable): a variable-length field that contains the Integrity
Check Value computed over the ESP packet
• ESP can encrypt payload data, padding, pad length, and next header fields
TRANSPORT MODE
• Transport mode ESP is used to encrypt and optionally authenticate the data carried by
IP
• Using IPv4,the ESP header is inserted into the IP packet immediately prior to the
transport-layer header (e.g., TCP, UDP, ICMP), and an ESP trailer (Padding, Pad
Length, and Next Header fields) is placed after the IP packet.
TUNNEL MODE
• Tunnel mode ESP is used to encrypt an entire IP packet (Figure 19.8c). For this mode,
the ESP header is prefixed to the packet and then the packet plus the ESP trailer is
encrypted.This method can be used to counter traffic analysis.
• combined by
• transport adjacency
• iterated tunneling
• ESP with authentication, bundled inner ESP & outer AH, bundled inner transport
& outer ESP
a. AH in transport mode
b.ESP in transport mode
• The IPSec Architecture document lists four examples of combinations of SAs that must
be supported by compliant IPSec hosts or security gateways.
• The lower part of each case in the figure represents the physical connectivity of the
elements; the upper part represents logical connectivity via one or more nested SAs.
Each SA can be either AH or ESP. For host-to-host SAs, the mode may be either
transport or tunnel; otherwise it must be tunnel mode.
Case 1 security is provided between end systems that implement IPSec, who share suitable
keys, using AH tunnel, ESP transport, ESP + AH transport, any of above inside AH/ESP tunnel;
to support authentication, encryption, authentication before encryption, and authentication after
encryption.
Case 2 security is provided only between gateways (routers, firewalls,etc.) and no hosts
implement IPSec, a simple VPN using a single AH or ESP tunnel SA
Case 3 builds on Case 2 by adding end-to-end security .The same combinations discussed for
cases 1 and 2 are allowed here.
Case 4 provides support for a remote host that uses the Internet to reach an organization’s
firewall and then to gain access to some server or workstation behind the firewall. Only tunnel
mode is required between the remote host and the firewall..
• automated system for on demand creation of keys for SA’s in large systems
• Oakley
• ISAKMP
• defines procedures and packet formats to establish, negotiate, modify, & delete
SAs
• IKEv2 no longer uses Oakley & ISAKMP terms, but basic functionality is same
• Length (32 bits): of total message (header plus all payloads) in octets.
All ISAKMP payloads begin with the same generic payload .The Next Payload field has a value
of 0 if this is the last payload in the message; otherwise its value is the type of the next payload.
The Payload Length field indicates the length in octets of this payload, including the generic
payload header. The critical bit is zero if the sender wants the recipient to skip this payload if it
does not understand the payload type code in the Next Payload field of the previous payload. It
is set to one if the sender wants the recipient to reject this entire message if it does not
understand the payload type.
• may contain multiple proposals, with multiple protocols & multiple transforms