Final answer:
Digital signatures provide authenticity, integrity, and non-repudiation by using the sender's private key, while message authentication codes ensure integrity and authentication using a shared secret key. Both prevent Oscar from modifying messages without detection, but only digital signatures can prove who the sender was.
Step-by-step explanation:
In the context of securing communications between Alice and Bob against an observer like Oscar, digital signatures (DS) and message authentication codes (MAC) provide different security services. (i) Digital signatures are used to verify the authenticity and integrity of a message, as well as the identity of the sender. Because the signature is created using the sender's private key, which is not known to Oscar, he cannot forge a signature to trick Bob into believing a modified message came from Alice. However, Oscar can still read the messages if they aren't encrypted.
(ii) Message authentication codes also ensure the integrity of a message and authenticate that it came from the alleged sender. This is accomplished by using a secret key shared between Alice and Bob to generate a MAC value. While Oscar cannot modify a message without changing the MAC (which he cannot do without the key), MACs do not offer non-repudiation because any holder of the secret key could have generated the MAC.