Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

6
votes
4answers
5k views

Is using the same IV in AES similar to not using an IV in the first place?

So if I understand how an IV works with AES, I'm supposed to generate a different IV for every message because using only a key, I will get the same encryption if the message was encrypted twice (...
-1
votes
0answers
30 views

Create a time capsule on wots

I was wondering if there's any option to create sort of a time capsule in a Word document, i.e. not encrypted by password rather than a date. Let's say I send the document today but the receiving side ...
2
votes
1answer
27 views

DES/AES invertibility

My professor has posted a couple of practice questions that so far I haven't been able to find the answer for and I was hoping you could help. DES would remain invertible—it would still be ...
0
votes
0answers
18 views

What is the common way to find the distance dual of linear block code?

I know the distance of dual of reed solomon codes is n-k+1 beacuase it is MDS code. Now us consider the following linear block code \begin{equation} C:\mathbb{F}^{k}\rightarrow \mathbb{F}^{n}\\ (c_0,...
6
votes
4answers
2k views

Is One Time Pad considered Chosen-Plaintext Attack Secure?

If we're considering Chosen-Plaintext Attack setting, then the adversary has access to the Encryption Oracle right, and we know that OTP is only considered secure if we use the key only once. How ...
2
votes
0answers
40 views

How to ensure integrity of encrypted data having hashes only?

Having: plaintext $P$ a hash function $H$, encryption $E$ with key $k$ $h_p = H(P)$ and $h_{E_P} = H(E_k(P))$ Is there an encryption scheme $E$ or hash algorithm $H$ that allows proving that $h_{...
4
votes
1answer
430 views

Do PGP keys with expiration date set expiration date in Encrypted messages too?

So I am little confused about a type of encryption I read about. You can encrypt your E-mails and pretty much all kind of information using PGP key pairs. However, I am confused if an encrypted ...
19
votes
2answers
7k views

Can someone explain the ECB Penguin?

I've seen the ECB Penguin used to demonstrate why ECB is not a recommended method of encryption, but I do not understand how this translates to text or passwords. Aren't the people who create these ...
0
votes
0answers
39 views

Prime Generation density and Miller Rabin Testing

I am working on an Cryptographic exercice but I'm not quite sure where to start. We suppose a prime generation consisting over a loop to take a random integer n and pass its number to a 5 round ...
6
votes
1answer
7k views

What is U2FsdGVkX1?

Using CryptoJS 3.1 I noticed that using 3Des, the encrypted message always start with U2FsdGVkX1 Why is the first part of the encryption always the same? What information does this hold and how ...
0
votes
1answer
35 views

If nG and 2nG are known how to find generator point G

If in a curve $y^2 = x^3+ 7 \mod p$ ( ecdsa-secp256k1) p=115792089237316195423570985008687907853269984665640564039457584007908834671663 G=...
3
votes
4answers
672 views

Non-malleable file encryption using AES XTS 256?

I'm looking to do file encryption of a bunch of individual files, some small, some quite large. The files will be write-once/read-many, so I could use CBC, however, since the read-access needs to ...
9
votes
2answers
2k views

GPG symmetric encryption and javascript

I have a use case where I need to encrypt some text in the browser using javascript. Only the encrypted text will be stored on the server. The user should then be able to take the encrypted result and ...
-4
votes
0answers
55 views

I believe this code is unbreakable [on hold]

It is not a one time pad. I can send messages to my partner in crime using only an 18 x 12 grid containing only the letters A,B,C,D,E,F - he can look at the grid I send him and using only 3 rules ...
1
vote
1answer
50 views

Algorithm for symmetric encryption (diffusion without confusion)?

I'm looking for a symmetric encryption algorithm with specific characteristic. Having a key $k$ a message $m$ returns a ciphertext $c$, where $E_{k}[m] \rightarrow c$ It should be hard to perform a ...
-4
votes
1answer
160 views

at rest encrypton question from someone who knows nothing

this forum is way above me and the members here are far, far smarter than I am, so this probaby isn't the place to ask such a simple question, but whatever. All I wanted to ask is for at rest ...
4
votes
2answers
109 views

Is it hypocritical to use AES-256 and RSA 2048 in the same application?

I see a common claim that AES-256 is the gold standard and is good future proofing, often in the same wind as "just use 2048-bit keys for RSA". Security documents seem to recommend both AES-256 and ...
1
vote
1answer
37 views

Repeated Vignère Cipher

I was looking into the Vignère Cipher when I thought of something. Would you improve the security of the cipher if you shifted each letter (from the text you want to encrypt) with each letter of the ...
0
votes
0answers
29 views

Chameleon hashes as encryption keys

I'm a newbie to cryptography and I have been wondering about the possibility of using Chameleon hashes as symmetric encryption keys. Here is my scenario and my thought process: Let us consider a ...
4
votes
1answer
435 views

Do data-dependent rotations have any advantage over fixed rotations?

There are many ARX ciphers, however most use fixed rotations. I know data-dependent compared to fixed rotations are: patented (expired) harder to implement constant time more expensive in hardware ...
5
votes
1answer
610 views

Decrypting Ciphertext with partial Key Fragment using LFSR and Berlekamp-Massey

Edit Does the state register (the LFSR) always have to remain with 16 bits (I'm assuming yes). If so, are we shifting the register right by one (lfsr>>1) ...
6
votes
1answer
1k views

CBC-Mode Infinite Garble Extension

A variation of the CBC mode is the Infinite Garble Extension. I can neither find a block diagram of it, nor the formulas for encryption and decryption. I would really like to learn more about it but ...
-2
votes
0answers
43 views

Classical definitions of encryption and masking

What would be the difference between encryption and masking, using the definitions around 30-50 years ago? Currently all articles link to RODO (GDPR requirements for data masking and anonymization) ...
-1
votes
0answers
24 views

Feistel cipher - how to calculate the round function [closed]

If i have for example on the right side: 1110 and as a round key: 1100. What is the output of F(1110,1100)?
4
votes
0answers
57 views

Key size, performance, and security tradeoffs for AES-GCM, CCM

AES can be used with 128, 192 or 256 bit keys and each one appears to have a performance vs security trade-off (What is the effect of the different AES key lengths?, What are the practical differences ...
1
vote
1answer
57 views

$m^b = z^b \pmod{n}$ - single solution $m = z$?

If i have the following equation: $$m^b = z^b \pmod{n}$$ Where all numbers are taken from the multiplicative group $\mathbb{Z}_n^*$. Suppose I know the values $z$ and $b$. Can I state that $z = m$, ...
1
vote
1answer
63 views

One-time pad encryption - how does the receiving side decrypt the message?

If a message is sent using one-time pad scheme, which generates random bits in order to, for example, XOR them with the message's bits - how does the receiving side generate the exact series of bits ? ...
2
votes
2answers
91 views

LUKS: decrypting with master-key rather than with passphrase

It's my understanding that LUKS encrypts data by using a randomly-generated master-key, which is then itself stored encrypted by my passphrase. When I want to access the data, I use my passphrase to ...
3
votes
4answers
675 views

Is the Vernam (One Time Pad) cipher useful? [duplicate]

By profession I’m a programmer. I don’t know a lot about how cryptographic algorithms are implemented, or even where I’d start, and I don’t know about cryptanalysis, but as I work in Blockchain ...
6
votes
0answers
60 views

Offline Group Key Agreement - Cross Device Syncing

I have a specific use case I am interested in. I have spent the better part of the night reading research papers. I am beginning to believe what I want is not possible so I wanted to confirm here. ...
322
votes
13answers
99k views

Should we MAC-then-encrypt or encrypt-then-MAC?

Most of the time, when some data must be encrypted, it must also be protected with a MAC, because encryption protects only against passive attackers. There are some nifty encryption modes which ...
0
votes
1answer
37 views

How can I verify certificate signature algorithm in TLS 1.3 using PSS?

I've read this post but I'm still unable to understand some things. I'm trying to verify that the signature algorithm used in the certificate matches the proposed list from the client. (As it's ...
3
votes
2answers
317 views

Encrypting between nodes that have RSA keys: Diffie-Hellman or random secret key?

I have two peers with RSA keys; they want to encrypt a non-trivially sized message between them, so I want a random AES symmetric secret key, which is encrypted with Bob's public RSA key, and sent ...
-1
votes
0answers
49 views

Prove that if a SES is statistically secure then it is computationally secure as well

Statistical security definition has a condition that the adversary is not computationally bounded which makes it stricter than Computational security but how would one mathematically prove it using ...
1
vote
1answer
75 views

Is it safe to send IV in plain text for every request?

Currently, I am creating a project with an IoT device. This is an offline device which shows a QR code which can be scanned by a mobile device, which sends this code to a server. The server handles ...
41
votes
4answers
101k views

Difference between stream cipher and block cipher

I read that A typical stream cipher encrypts plaintext one byte at a time, although a stream cipher may be designed to operate on one bit at a time or on units larger than a byte at a time. (...
2
votes
2answers
4k views

RSA PCKS1 v2.1 RSAES-OAEP algorithm

Using RSA public key (n,e) the encryption of a message is c= (m^e) mod n and the corresponding message is decrypted as ...
0
votes
0answers
22 views

Data masking / Data obfuscation for string int float and date , preserving order and exact matches

I've to mask data into some different value but to keep their property such as order an exact match (substring is yet impossible) What's the state of the art in data masking? I've some data on which ...
2
votes
1answer
92 views

Unbreakable Hill cipher

Why don't we use hill cipher of 100 × 100? or even bigger. That would be closely unbreakable. The number of keys possible 2 × 2 hill cipher is 157248. for 100 × 100 number is beyond limits.
0
votes
1answer
55 views

How do you get $d$ in textbook RSA

So people say to choose $d$ such that $e*d=1(mod((p-1)*(q-1)))$. However, $1\%$ anything always equals $1$. Maybe I am not understanding it correctly, but the only way to get $e \cdot d=1$ is just by ...
0
votes
0answers
37 views

Problem while decrypting Hill cipher

I have a plaintext "monday" and ciphertext "IKTIWM" and $m=2$. I want to find the key of the Hill cipher. I made a matrix $$ \begin{bmatrix} a_1 & a_2 \\ a_3 & a_4 \end{bmatrix}\begin{...
10
votes
3answers
2k views

Asymmetry between public key and private key: digital signatures use the private key for “encryption”?

I have a misunderstanding concerning public key cryptography...would be very helpful if you answer the questions... Digital signatures: You use your private key for "encryption" and they use your ...
1
vote
0answers
15 views

Private key which becomes invalid after specific timestamp

Sorry for my dumb question, as I'm not crypto guy. Is there any algorithm, which allows to encrypt some message with the public key, but the associated private key is only valid for specific period ...
5
votes
1answer
8k views

Time taken for a brute force attack on a key size of 64-bits

You can do $2^{30}$ encryptions per second and the key size is 64 bits. $2^{64}/2^{30}$ should give me the time taken for a brute force attack? What if you double the key size? How can I calculate ...
2
votes
0answers
37 views

Generating sets of unreadable/secure and unique random numbers

In the process of some research I have been doing I stumbled across the following 2 claims on the PokerStars website. We do record all of the hole cards in all real money hands. This is an ...
89
votes
2answers
72k views

What is the main difference between a key, an IV and a nonce?

What are the main differences between a nonce, a key and an IV? Without any doubt the key should be kept secret. But what about the nonce and the IV? What's the main difference between them and their ...
1
vote
1answer
60 views

While using onetime encryption is it possible that one can deduce the key of a message if the contents of the message are already known?

Let's say we have a randomly encrypted message and I pasted the contents of that message on a blog for some reason I do not share the key. Would you be able to figure out the key? This is the ...
0
votes
1answer
40 views

Vigenere Cipher Methods

Is there already a cipher which uses a method like vigenere yet the shifted encrypting alphabets are mixed? i.e. ASDFGHJKLZXCVBNMQWERTYUIOP BNMQWERTYUIOPASDFGHJKLZXCV CVBNMQWERTYUIOPASDFGHJKLZX etc....
2
votes
1answer
65 views

How to encrypt email address using FPE?

Could anyone guide me on how to implement FPE (Format Preserving Encryption) for Email address masking? For example: if my ID is Poornima1@gmail.com then it should ...
1
vote
1answer
50 views

flaw in perfect secrecy of shift cipher?

Why do we say shift cipher is perfectly secure when it is easy to break it (source)? Let's say I have a plaintext. "Australia is a big country"; I encrypt it using a shift of 2; That ciphertext can be ...