Hashing Functions Properties
Hashing Functions Properties
Hashing Functions Properties
Hashing functions take some data as input and produce an output (called hash digest)
of fixed length for that input data. This output should, however, satisfy some
conditions to be useful.
fixed length and the input size may vary, it is apparent that there are going
to be some output values that can be obtained for different input values.
Even though this is the case, the hash function should be such that for any
input value, each possible output value should be equally likely. That is to
say that every possible output has the same likelihood to be produced for
should all be of a fixed length. So, for example, a hashing function could
3. Collision resistance: Simply speaking, this means that there aren’t any or
rather it is not feasible to find two distinct inputs to the hash function that
https://medium.com/@zaid960928/cryptography-explaining-sha-512-ad896365a0c1
On a particular system, all passwords are 8 characters, there are 64 choices for each
character, and there is a password file containing the hashes of 2048 passwords. Trudy
has a dictionary of 225 passwords, and the probability that a randomly selected
password is in her dictionary is 1/5. Work is measured in terms of the number of hashes
computed.
(i). Suppose that Trudy wants to recover Alice's password. Using her dictionary, what is
the expected work for Trudy to crack Alice's password, assuming the passwords are not
salted?
(iii) What is the expected work for Trudy to crack any one password on the system,
(iv). Suppose Trudy has a password cracking program that can test 64 passwords per
second. How long, on average, will it take Trudy to crack Alice’s password assuming
i. Unsalted=2 -----------2M
24
No salt 2 /2 =2
47 11 36
iv 2 sec—2M
18
What is a Firewall?
A firewall is a security device that monitors network traffic. It protects the internal
network by filtering incoming and outgoing traffic based on a set of established
rules. Setting up a firewall is the simplest way of adding a security layer between a
system and malicious attacks.
Packet-Filtering Firewalls
When it comes to types of firewalls based on their method of operation, the most
basic type is the packet-filtering firewall. It serves as an inline security checkpoint
attached to a router or switch. As the name suggests, it monitors network traffic by
filtering incoming packets according to the information they carry.
As explained above, each data packet consists of a header and the data it transmits.
This type of firewall decides whether a packet is allowed or denied access based on
the header information. To do so, it inspects the protocol, source IP address,
destination IP, source port, and destination port. Depending on how the numbers
match the access control list (rules defining wanted/unwanted traffic), the packets
are passed on or dropped.
– No payload check.
– Fast and efficient for filtering
– Vulnerable to IP spoofing.
headers.
– Cannot filter application layer
– Don’t use up a lot of resources.
protocols.
– Low cost.
– No user authentication.
ADV DISADV
When starting a connection and requesting data, the stateful inspection builds a
database (state table) and stores the connection information. In the state table, it
notes the source IP, source port, destination IP, and destination port for each
connection. Using the stateful inspection method, it dynamically creates firewall
rules to allow anticipated traffic.
This type of firewall is used as additional security. It enforces more checks and is
safer compared to stateless filters. However, unlike stateless/packet filtering,
stateful firewalls inspect the actual data transmitted across multiple packets instead
of just the headers. Because of this, they also require more system resources.
– Not as cost-effective as they
–Keep track of the entire session. require more resources.
– Inspect headers and packet – No authentication support.
payloads. – Vulnerable to DDoS attacks.
– Offer more control. – May slow down performance
– Operate with fewer open ports. due to high resource
requirements.
Proxy Firewalls
A proxy firewall serves as an intermediate device between internal and external
systems communicating over the Internet. It protects a network by forwarding
requests from the original client and masking it as its own. Proxy means to serve
as a substitute and, accordingly, that is the role it plays. It substitutes for the client
that is sending the request.
When a client sends a request to access a web page, the message is intersected by
the proxy server. The proxy forwards the message to the web server, pretending to
be the client. Doing so hides the client’s identification and geolocation, protecting
it from any restrictions and potential attacks. The web server then responds and
gives the proxy the requested information, which is passed on to the client.
– Protect systems by preventing – May reduce performance.
contact with other networks. – Need additional configuration to
– Ensure user anonymity. ensure overall encryption.
– Unlock geolocational – Not compatible with all network
restrictions. protocols.
ACl Clist
1. An ACL specifies which users or system processes are granted access to objects, as
well as what operations are allowed on given objects
2. ACLs correspond to the columns of an access control matrix, and C-Lists
correspond to the rows of an access control matrix.
3. Suppose we wanted to revoke subject s's access rights r to a file f. If the
system used access control lists, one would revoke the access by going to f's
ACL and deleting s's rights r. If the system used capability lists, one would
revoke the access by going to s's capability list and remove the capability
that gives s the r rights over f.
With ACLs, it is trivial to remove all rights to a given object from all
subjects. With C-lists it is much more difficult. For example, suppose we
want to remove all users' rights to read a file f. We need traverse only one
ACL, but will need to traverse every process' C-List to see if that process
has read rights over f. Conversely, with C-Lists, it is easy to remove all
rights to all objects from a given subject. With ACLs, it is much harder. For
example, we want to remove a subject s's rights to all objects. We need
traverse only one C-List, but would need to traverse every file's ACL
4.- In a capabilities-based system, when Alice invokes the compiler, she can simply
give her C-list to the compiler. The compiler then consults Alice's C-list when checking
privileges before attempting to create the debug file. Since Alice does not have the
privilege to overwrite BILL.
- ACLs are preferable when users manage their own files and when protection is data
oriented. With ACLs, it's also easy to change rights to a particular resource.
- ACL is easier
5.Capabilities are always better to delegate when compared to ACLs, because of
following exempleries
4. ACL: run process using the name of the caller, or OS can explicitly support
delegation
5. Capabilities: allow delegation “ for free ”
6. ♦ When a subject holds a capability for an object, it knows it has access to that object
7. – In contrast, with ACLs it is impossible for a subject to obtain a list of all files it is
allowed to read
8. ♦ Capabilities allow finer-grained treatment of subjects
9. – E.g., at the process level rather than the user level
10. ♦ Capabilities allow easier delegation
11. – In ACLs, usually all-or-nothing (if allowed at all)
12. – With capabilities, can delegate a subset of the rights you have
13. ♦ Better at enforcing “ principle of least privilege ”
14. – Provide access to minimal resources, to the minimal set of subjects
The key generation, signing and verifying algorithms for DSS scheme are
described as follows. All the algorithms use the following global
parameters:
L = length of the key in bits, where the number of bits are a multiple of
64; L lies between 512 and 1024 bits
p = prime number such that 2 < p < 2
L-1 L
where,
The key generation, signing and verifying algorithms for ElGamal digital
signature scheme are described as follows:
Key generation: The sender generates his or her private and public keys
as follows:
(i) The sender chooses a large prime number p, such that the discrete log
problem is difficult in .
(ii) The sender then chooses his or her private key d, such that 1≤d < p−1,
and computes , where e1 is a primitive root . The public
key of A is (e1, e2, p), and the private key is d.
Signing: To create the signature, the sender chooses a random number k,
such that 0 < k < q, and then computes the value of S1 and S2 as follows:
Now, the receiver tests whether V1 ≡ V2. If the condition is satisfied, the
signature is accepted; else, it is rejected.