Data structures, such as ArrayLists, are commonly used to store and organize data in databases, both on personal computers and on the internet. This data can include sensitive information, such as names, social security numbers, and bank account details, and it is important to ensure that it is properly safeguarded.
While computer use and the creation of programs can offer numerous benefits and enhance personal security through the use of tools and technologies that protect against online threats, they can also pose risks to personal security if not used responsibly.
Cybercriminals and hackers can take advantage of the widespread use of personal data in digital technologies to access and misuse it, resulting in identity theft, financial fraud, and other forms of harm.
To safeguard personal privacy and protect sensitive data, programmers have a responsibility to design systems that prevent unauthorized access or misuse. There are various ways to achieve this, such as implementing strong security measures like encryption and authentication, and using techniques like cryptography and encapsulation to keep data secure.
By following best practices and taking these measures, programmers can help to protect personal privacy and ensure that sensitive data is used responsibly.
Encapsulation is where we block data from being used by outside clients. To do this, we keep data private inside the classes that we write, as covered in Unit 5.
Encapsulation helps to protect data by keeping it hidden from the outside world and only allowing access to it through a well-defined interface. This interface, in the form of methods or functions, provides a way for other parts of the program to access and manipulate the data, but only in a controlled and defined way.
By encapsulating data and providing a clear interface for accessing it, encapsulation helps to protect the data from unauthorized access or misuse. It also helps to prevent the data from being corrupted or modified in unintended ways, as the interface defines the only way in which the data can be accessed and modified.
Cryptography is the act of securing our data and there are two ways: hash functions and ciphers.
Hash functions encrypt data using complex mathematical functions and are non-reversible. Because of its nonreversabilty, hash functions are not used to transmit information, but are instead used for integrity, to show that the data we are being sent is genuine.
Whether it is the right data or not is left to ciphers. Ciphers allow us to encrypt our data so that it can't be read or understood by outside sources, but they can be reversed. To reverse the cipher, we need to have access to the key. The key is either common to both the sender and receiver of the data or unique to each person.
Using the key or keys, the message can successfully be decoded efficiently. The data can still be intercepted by a third-party. However, without the key, it would be difficult or impossible for someone who does not have access to the key to decrypt the message.
This is because decrypting the data without the key would require trying many different combinations of keys, a process known as "brute forcing," which would be time-consuming and complex. As a result, it is generally not worth trying to decrypt data without a key.