A DEFINITION OF DATA ENCRYPTION
Data encryption translates data into another form, or code, so that only people with access to a secret key (formally called a decryption key) or password can read it. Encrypted data is commonly referred to as ciphertext, while unencrypted data is called plaintext. Currently, encryption is one of the most popular and effective data security methods used by organizations. Two main types of data encryption exist – asymmetric encryption, also known as public-key encryption, and symmetric encryption.
THE PRIMARY FUNCTION OF DATA ENCRYPTION
The purpose of data encryption is to protect digital data confidentiality as it is stored on computer systems and transmitted using the internet or other computer networks. The outdated data encryption standard (DES) has been replaced by modern encryption algorithms that play a critical role in the security of IT systems and communications.
These algorithms provide confidentiality and drive key security initiatives including authentication, integrity, and non-repudiation. Authentication allows for the verification of a message’s origin, and integrity provides proof that a message’s contents have not changed since it was sent. Additionally, non-repudiation ensures that a message sender cannot deny sending the message.
THE PROCESS OF DATA ENCRYPTION
Data, or plaintext, is encrypted with an encryption algorithm and an encryption key. The process results in ciphertext, which only can be viewed in its original form if it is decrypted with the correct key.
Symmetric-key ciphers use the same secret key for encrypting and decrypting a message or file. While symmetric-key encryption is much faster than asymmetric encryption, the sender must exchange the encryption key with the recipient before he can decrypt it. As companies find themselves needing to securely distribute and manage huge quantities of keys, most data encryption services have adapted and use an asymmetric algorithm to exchange the secret key after using a symmetric algorithm to encrypt data.
On the other hand, asymmetric cryptography, sometimes referred to as public-key cryptography, uses two different keys, one public and one private. The public key, as it is named, may be shared with everyone, but the private key must be protected. The Rivest-Sharmir-Adleman (RSA) algorithm is a cryptosystem for public-key encryption that is widely used to secure sensitive data, especially when it is sent over an insecure network like the internet. The RSA algorithm’s popularity comes from the fact that both the public and private keys can encrypt a message to assure the confidentiality, integrity, authenticity, and non-repudiability of electronic communications and data through the use of digital signatures.
CHALLENGES TO CONTEMPORARY ENCRYPTION
The most basic method of attack on encryption today is brute force, or trying random keys until the right one is found. Of course, the length of the key determines the possible number of keys and affects the plausibility of this type of attack. It is important to keep in mind that encryption strength is directly proportional to key size, but as the key size increases so do the number of resources required to perform the computation.
Alternative methods of breaking a cipher include side-channel attacks and cryptanalysis. Side-channel attacks go after the implementation of the cipher, rather than the actual cipher itself. These attacks tend to succeed if there is an error in system design or execution. Likewise, cryptanalysis means finding a weakness in the cipher and exploiting it. Cryptanalysis is more likely to occur when there is a flaw in the cipher itself.
I’m working on a small assignment
Requirements are as follows
I have a SQL server 2016 table in which i have (ID, APP_ID, App_Name , P_Name, Date_Processed, and Encrypted_Data_Row) columns
/****** Object: Table [dbo].[MasterInv] Script Date: 7/31/2020 4:31:15 PM ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [dbo].[MasterInv](
[ID] [int] NOT NULL,
[APP_ID] [int] NOT NULL,
[App_Name] [varchar](30) NOT NULL,
[P_Name] [varchar](30) NOT NULL,
[Date_Processed] [datetime] NULL,
[Encrypted_Data_Row] [varbinary](max) NULL,
PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
I get XML file from 15 unique applications and each application has its own PGP or public/private keys.
Requirement is we have to encrypt the xml using the application specific key and insert to Encrypted_Data_Row column. ID column is auto generated , AppID, App_Name, P_Name, Date_Processed should be taken from the XML and insert to the table unencrypted before encrypting the XML and insert to Encrypted_Data_Row column.
If required you can create lookup tables to store the keys.
we have SQL Server 2016 and .net framework 4.6 with VS 2015 environment.
I’m looking for a C# component to do this or a SQL Stored procedure or a function is also fine . I need program for both encryption and decryption.
I want the best solution which can scale up or down in future
I can provide 2 PGP keys for 2 applications respectively.
I need clear explanation
Please let me know so that i can share the keys with passphrase for testing or you can create your own keys.