Questions tagged [encryption]

Encryption is the process of transforming plaintext using a cipher into ciphertext to make it unreadable to anyone except those possessing the key. Decryption is the process of transforming that ciphertext back into plaintext, using the key.

Filter by
Sorted by
Tagged with
19 votes
4 answers
3k views

Are encryption algorithms with fixed-point free permutations inherently flawed?

Flaw in Enigma One of the Enigma machine's flaw was the derangement (fixed-point free permutation) of the produced ciphertext, or simply put: No plaintext-letter can be enciphered to itself. See this ...
AleksanderCH's user avatar
  • 6,445
19 votes
2 answers
5k views

How is encryption broken today?

There are often articles in the news that state that a certain country or hacker has been able to decrypt/hack highly protected systems: Some examples are the Lockheed Martin RQ-170 Sentinel that was ...
Quasar's user avatar
  • 301
19 votes
5 answers
14k views

Why does the recommended key size between symmetric and asymmetric encryption differ greatly?

In various articles it is mentioned that for secure communications, the recommended key sizes are 128-bit key size for symmetric encryption (which makes it $2^{128}$ possible keys?) and 2048-bit key ...
Bailala's user avatar
  • 191
19 votes
4 answers
15k views

Encryption/ciphers/codes in Chinese

I am quite curious as to how you can perform simple encryption for the Chinese language. Saw a similar question related to encryption/Chinese here: About cryptography in a character language, however ...
pyko's user avatar
  • 293
19 votes
2 answers
5k views

What is "witness encryption"?

I recently skimmed over tho papers on time-lock encryption: “Time-release Protocol from Bitcoin and Witness Encryption for SAT” by Liu, Garcia, and Ryan “How to Build Time-Lock Encryption” by Jager ...
SEJPM's user avatar
  • 46k
18 votes
5 answers
11k views

Is it easy to crack a hashed phone number?

I want to SHA256 hash phone numbers in order to hide them. Is this a good idea? Are there any other ways I could make this safe?
Jack Resone's user avatar
18 votes
6 answers
21k views

What is the importance of Modular arithmetic in cryptography?

Why do we use modular arithmetic so often in Cryptography?
user5507's user avatar
  • 1,913
18 votes
6 answers
6k views

Why do key fobs/garage doors openers use rolling codes instead of PGP or SSL encryption?

Wouldn't they be more secure if they used the same encryption technology computers use for remote access?
Bernard Igiri's user avatar
18 votes
2 answers
20k views

Is there an encryption algorithm, which is a magnitude faster than AES (with weaker guarantees)?

There are current state-of-the-art encryption algorithms, which considered absolutely safe currently, like AES. Their speed is around the 100MB/sec ballpark on current PCs (note: this is the speed ...
geza's user avatar
  • 333
18 votes
2 answers
4k views

Can AES decryption be used as encryption?

Definition E: AES encryption D: AES decryption x: plain text y: encrypted text k: key In original AES cipher, encryption: y = E(x, k) decryption: x = D(y, k) Then I define the "reverse AES ...
user2669862's user avatar
18 votes
1 answer
17k views

How does encryption work in elliptic curve cryptography?

So I think I understand a good amount of the theory behind elliptic curve cryptography, however I am slightly unclear on how exactly a message in encrypted and then how is it decrypted. So my ...
Ali's user avatar
  • 481
18 votes
1 answer
30k views

Bit Flipping Attack on CBC Mode

To perform a bit flipping attack, the previous block is modified by using XOR. This results in an altered plaintext. However, now the ciphertext of the previous block is altered, hence it will result ...
CXB's user avatar
  • 321
18 votes
4 answers
19k views

Analog encryption algorithms

I have a basic understanding of how strong encryption works on digital data. Bits can be changed so that they appear completely random and map one-to-one back to the original set, given the correct ...
Luc's user avatar
  • 1,508
18 votes
2 answers
15k views

Storing Credentials for a Third Party

(Originally posted to SOF, but I got no answers) I am designing a small application for use inside my company. My application needs to connect to a third party website on behalf of my application ...
Ralph's user avatar
  • 375
17 votes
5 answers
46k views

Creating your own encryption and decryption algorithm

I'm very uneducated when it comes to cryptography. I have tried to find an answer to my question, but what I've read doesn't quite cover what I'm asking. I have thought up my own encryption algorithm ...
user1575550's user avatar
17 votes
5 answers
3k views

Is a PRG more costly than AES or any other encryption standard?

I know that there are many encryption standards that take a key and sometimes an IV to produce a cipher-text (the most prominent one is AES). These standards usually involve many rounds of addition ...
Ninja Bug's user avatar
  • 319
17 votes
5 answers
6k views

Why is RSA encryption key based on modulo $\varphi(n)$ rather than modulo $n$?

While calculating RSA encryption key we take modulo $\varphi(n)$ rather than modulo $n$. I can’t understand why it’s done this way.
user5507's user avatar
  • 1,913
17 votes
2 answers
31k views

Can you explain “weak keys” for DES?

A weak key for DES is a key $K$ such that $DES_{k_1}(DES_{k_2}(x))=x$ for all $x$. I don't get why are the 4 keys $k_1||k_2$: $1^{112}$, $0^{112}$, $0^{56}||1^{56}$, $1^{56}||0^{56}$ considered as ...
Bush's user avatar
  • 2,130
17 votes
2 answers
31k views

Using ECB as RSA encryption mode when encrypted messages are unique?

As I understand, ECB should not be used as encryption mode unless you are encrypting single blocks of data which are always unique and only are encrypted once. I have a collection of ids represented ...
user3685322's user avatar
17 votes
1 answer
19k views

Advantages using Diffie-Hellman or ElGamal

For what kind of usage should we prefer using Diffie-Hellman in order to exchange keys instead of ElGamal, and most important why should we use one or the other? I do not see a clear difference ...
Hastal's user avatar
  • 171
17 votes
4 answers
3k views

Can double-encrypting be easier to break then either algorithm on its own?

As was pointed out in Martin Bonner's comment I cannot prove this, but it seems intuitively impossible. An encryption function is supposed to obscure the plaintext to the point where no information ...
Shelvacu's user avatar
  • 574
17 votes
3 answers
2k views

At what point can you you implement crypto algorithms?

First off, this feels like it should be a common question, so I'm sorry if I've missed an older thread. Note that in my question, I'm talking about "implementing AES" rather than "designing AES2" or ...
Leonhart231's user avatar
17 votes
5 answers
1k views

Could one construct a cipher that is secure for friendly parties to use but insecure for hostile parties?

Consider the situation of a nation state (Blue) at war with another nation state (Red). Blue wants to deploy a secure cipher that blue currently can not break, but they are considered that Red could ...
Ethan Heilman's user avatar
17 votes
1 answer
4k views

Difference between “ECDH with cofactor key” and “ECDH without cofactor key”?

I need to use “ECDH with a cofactor key” for generating symmetric key. I have a fair idea on how ECDH works, but I don’t understand the cofactor part. What is the difference between ”ECDH with a co-...
Kiran's user avatar
  • 301
17 votes
1 answer
3k views

Dancing confusion with Daniel J. Bernstein's stream ciphers

I know of Salsa20 which won the ESTREAM competition. This is dated of 25 Dec 2007. There is also the ChaCha20 stream cipher (cr.yp.to/chacha.html). This claims to increase the amount of diffusion ...
x9c8v7's user avatar
  • 173
17 votes
2 answers
70k views

Twofish vs. Serpent vs. AES (or a combo)

I've seen some posts and info online, but they are from 2009, 2010, 2011 or 2012, which is 3-6 years ago, which is a very long time. So I'm looking for an up-to-date answer about which of these is the ...
Jack's user avatar
  • 273
16 votes
6 answers
5k views

Is the decompression of compressed and encrypted data without decryption also theoretically impossible?

We have two communication points in an information system, call them A(lice) and B(ackup). B has to store encrypted data received from A. The storage of B is encrypted, but not compressed1. B should ...
peterh's user avatar
  • 390
16 votes
7 answers
5k views

Which is the simplest cryptographic algorithm which is close to commercial-level security?

An algorithm is simpler than another if It is easier to explain to a noob with basic high-school math knowledge. It is easier to securely self-implement by an intermediate programmer (Yes I know one ...
An Ant's user avatar
  • 271
16 votes
6 answers
5k views

Is AES easier to crack when the input is small?

Say you just want to encrypt a number. For example, say the number could be any double. A double in C# and Java is 8 bytes. If you were to encrypt a double using ...
user875234's user avatar
16 votes
3 answers
7k views

What's wrong with XOR encryption with hash and an iterated salt

Suppose you'd use the following algorithm to encrypt a message Let $k$ be the key to encrypt with Let $m$ be the message to encrypt Split $m$ into groups of 512 bytes Given a hash function with a ...
SomeNorwegianGuy's user avatar
16 votes
5 answers
5k views

Is there an intuitive explanation as to why only the private key can decrypt a message encrypted with the public key?

I have just learned about using PGP/GPG for email encryption and one thing bugs me: How is it possible that a message encrypted with somebody's public key can be decrypted only with that person's ...
king_julien's user avatar
16 votes
1 answer
6k views

Relation between Key-exchange and Public-Key encryption schemes

Recently we have seen a lot of papers on Post-quantum key-establishment (key encapsulation mechanism or Key-exchange), largely due to the standardization call of NIST for PQ-protocols. However, most ...
Rick's user avatar
  • 1,265
16 votes
1 answer
2k views

Replacing the Rijndael S-Box?

The Rijndael S-Box design generates a permutation cycle of type $2+27+59+81+87$. What effect would replacing that permutation with a cycle of type $256$ have on the security of AES?
bzc's user avatar
  • 525
16 votes
0 answers
2k views

Has Telegram security been significantly improved with MTProto 2.0?

Telegram messenger's original encryption scheme, MTProto 1.0, has been shunned by most cryptographers for a number of reasons, like being vulnerable to IND-CCA attack; being unorthodox in general, ...
Dark Lotus's user avatar
15 votes
8 answers
7k views

Can I say "I have encrypted something" if I hash something?

As I understand it, a hashing algorithm is some kind of encryption, just a specific kind of it. So is it wrong to say "I encrypted this value." if I "only" hash it? I understand that it gives the ...
Johannes Rabauer's user avatar
15 votes
3 answers
5k views

Does composing multiple substitution ciphers improve security?

Will using two substitution ciphers one after the another be more secure than using single substitution cipher?
Shridhar R Kulkarni's user avatar
15 votes
1 answer
7k views

Calculate all possible keys for AES 128 encryption to exploit hardware encryption

Some background: I am using the MicroChip ATAES132a for hardware encryption/decryption. The ATAES132a is very configurable and can be misconfigured in such a way that the encryption/decryption will be ...
PhillyNJ's user avatar
  • 264
15 votes
5 answers
29k views

Is it better to encrypt before compression or vice versa?

Is it better to encrypt a plain text file before compression, or vice versa?
fola's user avatar
  • 151
15 votes
4 answers
14k views

Best choice out of these six TLS cipher suites

I have a small embedded platform that supports 6 TLS ciphers. Is there a good/better/best one to chose? I was looking around on the web for some kind of rating system or list of ciphers that have ...
user554242's user avatar
15 votes
3 answers
2k views

Is the CBC weakness in XML Encryption a new discovery? Are other applications vulnerable?

The RUB in Germany reports that XML encryption is broken. This is essentially the W3C standard for protecting XML documents from prying eyes. Does this mean that an attacker can only see a single ...
makerofthings7's user avatar
15 votes
2 answers
23k views

AES in ECB mode weakness

In a project that I'm currently working on, we are encrypting some data using AES with ECB mode in a database. Each piece of data being encrypted is very small, no more than 10 characters long. Very ...
jjsanchez's user avatar
  • 253
15 votes
2 answers
2k views

Is CBC really dead?

I developed a p2p-app in C# which sends and receives encrypted text messages (50kB). For encryption, my app uses 128-bit AES in CBC cipher mode. For each message it uses a new randomly-generated IV. ...
Mike's user avatar
  • 315
15 votes
2 answers
8k views

What is the correct way to implement PBKDF2 + AES CBC + HMAC?

I've been doing a lot of reading on the proper way to implement AES CBC mode with HMAC authentication. I've seen many explanations, however, I've had a hard time finding an actual real example (with ...
izzle's user avatar
  • 591
15 votes
2 answers
6k views

Leading 00 in RSA public/private key file

I found these following values ALWAYS have the leading 00 in public/private key, public key: modulus private key: modulus, p,q, d mod (p-1), d mod (q-1), coefficient e.g., modulus ...
Matt Elson's user avatar
15 votes
3 answers
14k views

If PGP and GPG both follow the OpenPGP standard, are they 100% compatible in all use cases?

If someone gives me their PGP key, can I use it with GPG, and vice versa, all the time (100% interchangeable)? Or are there times when they are not compatible, when only PGP can be used with a PGP key,...
trusktr's user avatar
  • 261
15 votes
6 answers
29k views

Difference between encrypting something and hashing something

What is the difference between encrypting something and hashing something? in what situations would I want one or the other?
Joel B's user avatar
  • 273
15 votes
1 answer
583 views

How to create a decentralized secret ballot among a small group of people?

A small (< 100) group wants to implement an election. For that, each participant must vote in one of N candidates. After everyone has voted, they must be able to determine a winner; yet, nobody ...
MaiaVictor's user avatar
  • 1,345
14 votes
10 answers
12k views

Are there any advantages in using proprietary encryption?

Proprietary software generally relies on the fact that in keeping the encryption algorithm private, it gets an extra layer of security implying "Security through Obscurity." Obviously this phrase has ...
ellefc's user avatar
  • 345
14 votes
7 answers
6k views

Could celestial objects be used in cryptography?

If it were possible to receive a string of numbers from a celestial object (by anyone on the Earth who knows which object to look at, and what time to look) could this be of any use in cryptography? ...
user1551817's user avatar
14 votes
2 answers
3k views

Why are finite groups used in cryptography?

Most of the cryptographic schemes I know are all based on group theory, e.g. they use finite groups. Can someone explain why is that the case? And why not base the schemes on elements and operations ...
dave's user avatar
  • 149

1 2
3
4 5
95