Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
0answers
50 views

How to break fully homomorphic encryption over integer algorithm with known cipher of same integer?

If I do encryption and decryption like this: Encryption: $\text{E}(m) = (r \times p_1+m) \bmod N$ Decryption: $\text{D}(\text{E}(m)) = ((r \times p_1 + m) \bmod N) \bmod p_1 = m$ where, $r$ = ...
2
votes
2answers
108 views

Encrypted hash vs hashed encryption

Problem Is there any combination of hash and encryption algorithms with show the following properties: File $\rightarrow$ Hash $\rightarrow$ Encrypt $==$ Hash $\leftarrow$ Encrypt $\leftarrow$ File ...
0
votes
1answer
32 views

How to multiply two Public Keys in Elliptic Curve in Go

I am working on a messaging client similar to Signal. I am stuck on implementing Tripartite Diffie-Hellman handshake in which three DH exchanges are combined to authenticate both parties and produce ...
2
votes
1answer
67 views

I don't want to store passwords, can I use them as an encryption key for another field?

I'm not a 'cryptographic' anything, so if this is a super-dumb question please let me know (politely). So here's the deal, say I don't want to store passwords because that opens me up to all sorts of ...
1
vote
2answers
49 views

With randomized encryption, ciphertexts must be slightly longer than plaintexts in order to allow for more than one possible ciphertext per plaintext

Can anyone give me a simple example of this? "For example, if there are $2^{64}$ possible cipher texts per plain text, cipher texts must be at least 64 bits longer than plain texts" This is ...
2
votes
2answers
33 views

Mathematical explaination of file encryption for multiple persons with multiple keys

Let's say I want to encrypt a document which only can be read by John, Mike, and Dave. This can easily done with PGP/GPG: Import John‘s, Mike‘s, and Dave's public key Encrypt the document using those ...
0
votes
0answers
12 views

I2P Tunnel Creation Build on Request Record Question en(de)cryption method

Not sure if anyone here can help, but if so, sure would appreciate the help. If we read the https://geti2p.net/spec/tunnel-creation documentation page on how I2P creates a tunnel, we can read on the ...
0
votes
1answer
103 views

RSA-OAEP Padding scheme

Honestly I'm really confused about padding in RSA scheme. I don't study computer science, and I'm a beginner learning cryptography (self-taught). Can anyone give me suggestions?
3
votes
1answer
90 views

What is this called: encrypt $X$ with key $E$, decrypt $X$ with key $D$?

I am a software developer interested in developing an application with cryptography. I can explain what I want to accomplish, but I do not know the technical terms for the cryptographic functions I am ...
1
vote
0answers
29 views

What is the difference between Google's API-Key, OAuth Client ID and AWS Secure Token Service

What is the difference between Google's API-Key, OAuth Client ID and AWS Secure Token Service? Are they are all just providing delegation tokens, except they are from different companies? Is there a ...
1
vote
1answer
63 views

Meaning of the $m$ power of a modular world

A cryptosystem is defined by a 5 tuple $(P,C,K,E,D)$=(plain text, cipher text, key, encryption function, decryption function) So, my question is with the definition given for permutation cipher, ...
1
vote
2answers
57 views

Does an encryption algorithm exist where encrypted data can be decrypted by multiple private keys?

Suppose I have Company1 with their own Public/Private Key Pairs and another Company2 with their public/private key pairs and yet ...
1
vote
0answers
45 views

How to create an ultra-secure connection between two clients with xor? [closed]

At work, I was asked to create ultra-secure connection over lan between two computers. It will be some kind of messager. I have a bunch of same random data in them(near 100mb). Also I can start a ...
4
votes
0answers
77 views

How sensitive is Tiny Encryption Algorithm (TEA) to the magic numbers?

If I needed to implement an encryption algorithm from memory, chances are I would try to implement: TEA https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm How sensitive is it to the magic ...
-1
votes
1answer
45 views

Random letter swap soloution

I am working on a way to decipher some text generated by a small piece of code (see below). This piece of code swaps letters in the sentence at random and was wondering if there where any techniques ...
1
vote
2answers
84 views

Using Diffie-Hellman secret key to encrypt/decrypt data?

My end goal is to encrypt data with AES-128, send it to other process and decrypt it there. While using DH key exchange protocol. I have used DH to generate a 256 bytes shared secret, but I can't use ...
0
votes
1answer
37 views

LWE: does using only a small subspace of the plaintext space influence the security of the encryption scheme?

Regarding LWE schemes where the encryption is performed this way: for $m \in \mathbb{Z}_t$, compute $c = LWE_{\mathbf{s}}^{t/q}(m) = \{ \mathbf{a}, \mathbf{a \cdot s} + m\cdot q/t + e\} \in \mathbb{Z}...
0
votes
0answers
59 views

Calculating the inverse for a Rijndael s-box [duplicate]

I want to calculate a Rijndael S-box but something went wrong. How can I calculate the inverse? In the following is my approach: given: $f(x)=x^8+x^4+x^3+x+1 \rightarrow$ binary: 100011011 0x12 = ...
0
votes
1answer
58 views

Does it matter if IV is used as the first block of data before the encryption and then some fixed value is used for the actual IV? [duplicate]

Usually the IV for the crypto operations is chosen randomly and is sent together with the encrypted data [at the first block]. For decryption, the IV is first extracted from data and set separately in ...
1
vote
0answers
39 views

How to figure out this encryption? [closed]

I can provide input to an application that encrypts plaintext via an unknown algorithm, which I would like to reverse. I can obtain plaintext:ciphertext pairs, and the length of the cipher depends on ...
2
votes
1answer
46 views

Does the AES-KW (Key Wrap Algorithm) perform authenticated encryption?

The RFC for AES-KW doesn't actually mention authentication, only integrity, where the unwrapping/decryption process should produce an identical IV of ...
0
votes
1answer
55 views

Simple One time Pad Probability

We have a one time pad where: We have 8 bits. probability that a bit=0 is p. The key is common for all 8 bits. It can have a value of 0 or 1 with equal probability. After applying the XOR operation ...
-2
votes
1answer
39 views

What information can be gleamed by using a OTP twice with the same message?

So... C0 = K0 ⊕ M and C1 = K1 ⊕ M where K0, K1 are different random numbers. What information can you discern about the K0, K1 and M, if any? Could you use K0,K1 again with another different message ...
2
votes
1answer
81 views

Is a 2 bit one time pad just as secure as a 128 bit one time pad?

Obviously, it would be easier to stumble across the answer, but you still couldn't be sure it's correct. So it's still theoretically secure?
2
votes
2answers
275 views

Any ideas to make an Electronic Voter Machine more secure? [closed]

EVMs are not secure they say. So how can we make it more secure tham the existing one using cryptography?
2
votes
0answers
70 views

Is AES resilient to chosen plaintext with access to related keys (key expansion primitives)?

I'm interested in knowing whether a cryptosystem is broken given access to a few primitives. $\DeclareMathOperator{\KEYEXP}{KEY\_EXP}$ $\DeclareMathOperator{\E}{E}$ Suppose that you have access to an ...
0
votes
1answer
59 views

How secure is Firestore / Google Cloud server-side encryption?

We use Firestore. On their Google help page they say it is AES encrypted. https://cloud.google.com/firestore/docs/server-side-encryption But this means in the moment a user is logging in, the data ...
0
votes
1answer
63 views

How to find a triple of keys that maps plaintext to given cipherext using EDE

What is a practical method for for finding a triple of keys that maps a given plaintext to a given ciphertext using EDE? I think this requires something similar to a man-in-the-middle attack...
1
vote
1answer
64 views

Find encryption algorithm knowing input, output and secret

Today on my PC I found some old backups; they contain also some pictures I encrypted years ago with a smartphone running Windows Mobile but I don't remember the application I used to cipher them. I'm ...
0
votes
1answer
122 views

Encryption: am I doing it right?

I'm trying to get a per-user encryption key scheme off the ground and need some validation from wiser crypto pros. Consider the following procedure: User provides registration information to include ...
3
votes
2answers
116 views

Determine if $f(x)+x_0+x_n$ is balanced

If $f(x)=x_0x_1\oplus x_1x_2\oplus\cdots\oplus x_{n-2}x_{n-1}\oplus x_{n-1}x_n\oplus L(x)$ is a balanced boolean function (which is a boolean function whose output yields as many 0s as 1s over its ...
0
votes
1answer
38 views

GCM optimisation using $M_0$ and $R$ tables - Calculation of $R$

I'm implementing GCM in C as a way to learn about it. In the paper titled as The Galois/Counter Mode of Operation (GCM) by McGrew and Viega on chapter 4.1, page 11, 12, they talk about the ...
0
votes
0answers
37 views

Errors in LLL cracking knapsack crypto

I am attempting to try some sample knapsack encryption problems and the attack on them using the LLL algorithm. I am using here and here as the guides. They both provide examples to walk through, ...
-1
votes
1answer
109 views

Why would it be risky to let Huawei build 5G networks? [closed]

I'm wondering why there is so much debate about letting Huawei build 5G networks in Europe and other countries. Shouldn't encryption which is used more and more on the web today make all communication ...
3
votes
2answers
814 views

Insecure private-key encryption

I am learning about crytography and the differences between the public and private keys encryption examples and I was wondering if it is possible to have a private key encryption scheme that is ...
0
votes
1answer
65 views

Big-O Encryption Algorithm

I am currently doing a research paper on the Blowfish encryption algorithm and one of the components that I need to include is time and space complexity. I have tried reading academic articles and ...
2
votes
3answers
284 views

What are some real world examples where one time pad encryption is used or can be used?

I understood that One-Time Pad (OTP) encryption ensures perfect secrecy. However, I couldn't find any real-world examples where the OTP is used. Also, which are some real-world examples where it won'...
16
votes
4answers
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 ...
1
vote
0answers
41 views

Time-based decryption service

i am thinking about building a public crypto service, yet at the same time, I am still quite new to crypto and therefore prone to snake-oil inventions I guess. My plan is to build a website which ...
3
votes
1answer
71 views

Definition of symmetric cipher and definition of asymmetric cipher

So I'm currently taking a cryptography class right now and my professor has told the class that she can't even define symmetric cipher for us without getting into asymmetric ciphers and the textbook ...
0
votes
2answers
149 views

Create a time capsule using a Word processor

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 ...
4
votes
1answer
491 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 ...
2
votes
0answers
55 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_{...
0
votes
0answers
41 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 ...
2
votes
1answer
62 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 ...
1
vote
1answer
53 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 ...
0
votes
1answer
46 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=...
1
vote
1answer
46 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
43 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
2answers
195 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 ...