3 min read•Last Updated on June 18, 2024
Avanish Gupta
Milo Chang
Avanish Gupta
Milo Chang
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.
ArrayList is a dynamic data structure that allows you to store and manipulate collections of objects. Unlike arrays, ArrayLists can grow or shrink dynamically as needed.
Term 1 of 5
ArrayList is a dynamic data structure that allows you to store and manipulate collections of objects. Unlike arrays, ArrayLists can grow or shrink dynamically as needed.
Term 1 of 5
ArrayList is a dynamic data structure that allows you to store and manipulate collections of objects. Unlike arrays, ArrayLists can grow or shrink dynamically as needed.
Term 1 of 5
Cryptography refers to techniques used for secure communication in the presence of adversaries. It involves encoding information in such a way that only authorized parties can understand it.
Encryption: The process of converting plain text into cipher text using algorithms and keys.
Decryption: The reverse process of encryption, converting cipher text back into plain text using specific keys.
Hashing: A technique that converts data into a fixed-size string of characters, making it difficult to reverse-engineer the original data.
Encapsulation refers to the bundling of data and methods within a class, where the data is hidden from external access. It ensures that an object's internal state remains consistent by controlling how it can be accessed or modified.
Object-oriented programming (OOP): OOP promotes encapsulation as one of its fundamental principles. It allows for modular design by grouping related data and behaviors together within classes.
Access modifiers: Access modifiers control the visibility and accessibility of members (variables or methods) in a class. They determine whether other parts of the program can access or modify those members directly.
Information hiding: Information hiding is closely related to encapsulation and involves restricting direct access to internal details of an object. By hiding information, we protect it from being accidentally modified or misused outside its intended scope.
Hash functions are mathematical algorithms that take an input (or message) and produce a fixed-size string of characters, which is typically a hash value or hash code. The output is unique to the input, meaning even a small change in the input will result in a significantly different hash value.
Collision: When two different inputs produce the same hash value. It's like having two different recipes that somehow end up tasting exactly the same.
Rainbow Table: A precomputed table used to reverse-engineer hashed values back to their original inputs. It's like having a cheat sheet with all possible combinations for unlocking a secret code.
Salting: Adding random data to an input before hashing it to make it more secure. It's like adding extra spices to your recipe to make it unique and harder for others to replicate.
Ciphers are algorithms used for encryption and decryption of messages or data. They transform plaintext (original message) into ciphertext (encrypted message) using specific rules or keys, making it difficult for unauthorized individuals to understand or access sensitive information.
Symmetric Key Encryption: A type of encryption where both sender and receiver use the same key for both encryption and decryption processes. It's like having one master key that can lock and unlock doors.
Asymmetric Key Encryption (Public Key Cryptography): A type of encryption that uses two different keys, one for encryption and another for decryption. It's like having a lock with two separate keys, where one key can only lock the door, and the other key can only unlock it.
Block Cipher: A cipher that encrypts data in fixed-size blocks (e.g., 64 or 128 bits) rather than individual characters. It's like dividing your message into small chunks before encrypting them individually to enhance security.