Questions tagged [encryption]

Encryption is the process of transforming information (called plaintext) into an unreadable form (called ciphertext) using an encryption algorithm using a secondary parameter (called an encryption key). Only those who possess the decryption key can easily reverse the process and recover the original plaintext. Conceptual questions about encryption may get better answers on crypto.stackexchange.com.

In cryptography, encryption is the process of transforming information (called plaintext) into an unreadable form (called ciphertext) using an encryption algorithm combined with a parameter called an encryption key. Reversing the process, that is transforming the ciphertext into plaintext, is called decryption. Only those who possess the decryption key can reverse the process and recover the original plaintext.

There are 2 types of encryption methods generally:

  • symmetric
  • asymmetric

In symmetric encryption the encryption and decryption keys are the one and the same; this single key is sometimes called the shared secret key. Rijndael(AES), TwoFish, and Cha-Cha are examples of symmetric encryption algorithms.

In asymmetric encryption, also known as public key encryption, the encryption and decryption keys are different. The encryption key is called the public key and the decryption key is called the private key. RSA, Diffie-Hellman (DH), El-Gamal (ElG), and elliptic curve variants of DH and ElG are examples of public key encryption algorithms.

The term "encryption" should be reserved for transformations intended to be reversed or "decrypted". In particular, cryptographic transformations intended to be one way, such as cryptographic hash algorithms (e.g. SHA1, SHA2, SHA3) and password hashing algorithms (e.g. bcrypt, scrypt) should not be referred to as "encryption".

Encryption has long been used by militaries and governments to facilitate secret communication. Encryption is now commonly used in protecting information within many kinds of civilian systems. It can be used to protect data "at rest", such as files on computers and storage devices (e.g. USB flash drives). In recent years there have been numerous reports of confidential data such as customers' personal records being exposed through loss or theft of laptops or backup drives. Encrypting such files at rest helps protect them should physical security measures fail. Digital rights management systems which prevent unauthorized use or reproduction of copyrighted material and protect software against reverse engineering (see also copy protection) are another somewhat different example of using encryption on data at rest.

Encryption is also used to protect data in transit, for example data being transferred via networks (e.g. the Internet, e-commerce), mobile telephones, wireless microphones, wireless intercom systems, Bluetooth devices and bank automatic teller machines. There have been numerous reports of data in transit being intercepted in recent years. Encrypting data in transit also helps to secure it as it is often difficult to physically secure all access to networks.

Encryption, by itself, can protect the confidentiality of messages, but other techniques are still needed to protect the integrity and authenticity of a message; for example, verification of a message authentication code (MAC) or a digital signature. Standards and cryptographic software and hardware to perform encryption are widely available, but successfully using encryption to ensure security may be a challenging problem. A single slip-up in system design or execution can allow successful attacks. Sometimes an adversary can obtain unencrypted information without directly undoing the encryption. See, e.g., traffic analysis, TEMPEST, or Trojan horse.

One of the earliest public key encryption applications was called Pretty Good Privacy (PGP). It was written in 1991 by Phil Zimmermann and was purchased by Network Associates (now PGP Corporation) in 1997.

Source: Wikipedia.

See also:


Note: conceptual questions about encryption might get more attention and better answers from the Crypto stack exchange.

36876 questions
8
votes
4 answers

How to make encrypted sqlite3 database with nodejs in windows platform

I want to make a small electron app that uses sqlite3 as database. I have installed sqlite3. npm install sqlite3 and rebuild it using node-gyp for using it with electron so far so good. Now I want to encrypt the database how to do that particularly…
manas
  • 6,119
  • 10
  • 45
  • 56
8
votes
3 answers

Limit Laravel 5 Encryption length

I have a Laravel5 web application of Business directory. When I Encrypting a value like $cryptval = Crypt::encrypt(1); result = …
Jishad P
  • 703
  • 2
  • 9
  • 24
8
votes
3 answers

Change cipher in Laravel encryption

Previously, Laravel uses MCRYPT_RIJNDAEL_128 cipher for encryption (in <5.0). Now it's AES-256-CBC (>=5.1). Mcrypt seems to be abandonware and we should not use it. I have an app written for Laravel <5.1 and migrated to Laravel 5.1. Can I change the…
rap-2-h
  • 30,204
  • 37
  • 167
  • 263
8
votes
1 answer

Could not find uri with key dfs.encryption.key.provider.uri to create a keyProvider in HDFS encryption for CDH 5.4

CDH Version: CDH5.4.5 Issue: When HDFS Encryption is enabled using KMS available in Hadoop CDH 5.4 , getting error while putting file into encryption zone. Steps: Steps for Encryption of Hadoop as follows: Creating a key [SUCCESS] [tester@master…
Jack Sparrow
  • 81
  • 1
  • 1
  • 4
8
votes
1 answer

Securely Storing Keys in Android Keystore

I am making an android application that communicates with a server. I'm using token based authentication on my server, and to pass information to the client from the server, I am using asymmetric encryption. This is how the process goes Generated…
demigod
  • 91
  • 1
  • 2
8
votes
1 answer

DataProtectionScope.CurrentUser encryption does not seem to work across machines

I'm trying to encrypt and decrypt some text file data using .NET's ProtectedData.Protect method. I'd like to be able to encrypt the text (and save it to a file) on one machine and decrypt the text on a different machine. The machines are both in the…
Carolyn
  • 81
  • 1
  • 2
8
votes
2 answers

Finding corresponding encrypted file on encfs

Hopefully a very simple question. I have a read-only mount, and a encfs FUSE mount reads over that to decrypt the files. How do I know which encrypted file each decrypted file relates to? For example: I want to delete a file, however won't be able…
Marcus Hughes
  • 5,123
  • 1
  • 25
  • 39
8
votes
3 answers

Encrypt in python - decrypt in Javascript

I have need to simply encrypt some text in python and being able to decrypt in JavaScrypt. So far I have in python: from Crypto import Random from Crypto.Cipher import AES import base64 BLOCK_SIZE = 16 key = "1234567890123456" # want to be 16…
bensiu
  • 24,660
  • 56
  • 77
  • 117
8
votes
12 answers

How do I create a web application where I do not have access to the data?

Premise: The requirements for an upcoming project include the fact that no one except for authorized users have access to certain data. This is usually fine, but this circumstance is not usual. The requirements state that there be no way for even…
EndangeredMassa
  • 17,208
  • 8
  • 55
  • 79
8
votes
1 answer

Java to JS and JS to Java encryption using cryptojs

I got on this post a couple of weeks ago and worked perfectly: Compatible AES algorithm for Java and Javascript Now, I need to do the reverse operation, but once in java, I am getting this exception: javax.crypto.BadPaddingException: Given final…
P. Lalonde
  • 694
  • 1
  • 7
  • 17
8
votes
4 answers

How? Encrypt and Decrypt user membership passwords in ASP.NET

We are creating a new site using ASP.NET membership provider for user registration and log in. Our old system encrypted user passwords so that we could recover them if we needed to. I am having a great deal of trouble figuring out if it is possible…
smdrager
  • 7,327
  • 6
  • 39
  • 49
8
votes
1 answer

Golang AES StreamReader encryption - Example omits any authentication of the encrypted data

Finally I am posting my first question on StackOverflow. I'm using this site for years now and I always found great answers to all my questions :) I am implementing a file encryption background daemon which is based on the official Golang cipher…
M4ng0Squ4sh
  • 83
  • 1
  • 5
8
votes
1 answer

AES 256 on the client side (JS) and in the server (PHP)

I'm trying to encrypt and decrypt data on the server side and the client using the same type of operation, which is AES-256. On the server I use PHP and client I use CryptoJS so far I could only encrypt and decrypt the client on the server, see the…
thebestclass
  • 169
  • 1
  • 3
  • 9
8
votes
3 answers

Does https encrypt the whole URL?

I googled a lot and many answers are Yes. For example: Is GET data also encrypted in HTTPS? But the senior security engineer in our company told me the URL would not be encrypted. Image that, if the URL was encrypted, how does the DNS server find…
53iScott
  • 827
  • 1
  • 13
  • 18
8
votes
2 answers

Fix Chrome notification about obsolete encryption in IIS8.5 and SQL Server 2012

I am trying to configure IIS 8.5 on Windows 2012 R2 so that I do not get the notification from Chrome that the website is using obsolete cryptography. The image below is from Mac OS X , but I get a similar message in Windows 8.1 where the encryption…
John Davidson
  • 637
  • 5
  • 11