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.

3
votes
2answers
104 views

Lightweight block ciphers that support decryption with minimal overhead?

Lightweight block ciphers are mostly expressed for encryption routine and efforts are made to keep it as light as possible mostly in terms of gates count and power usage although some try to keep ...
10
votes
4answers
3k views

If Kerckhoff's Principle holds, why do we need a cipher at all?

I understand Kerckhoff's principle, in a very practical sense, that the best attack that can be performed on a given cryptographic algorithm should be only as practical, if not less practical, than an ...
2
votes
2answers
94 views

Safely erasing encrypted data

My secret message is encrypted in a byte buffer with AES-128 in CBC mode. The first 16 bytes are the IV and the message follows contiguously. If I want to securely delete this message is it enough ...
5
votes
1answer
607 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) ...
5
votes
1answer
274 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 ...
1
vote
0answers
51 views

ECDSA Message Recovery from Two Encrypted Messages with Signatures and Public Key

I am currently working on a problem where I have two encrypted messages, their corresponding signatures, and the public key. Furthermore, the value of $r$ is the same in the two signatures. I am ...
0
votes
1answer
61 views

Are there any practical use cases for performing homomorphic operations on encrypted Strings?

Does anybody know which practical use cases there are to operate on encrypted strings? Even niche problems that can be solved using homomorphic encryption on strings are interesting to me, but not ...
3
votes
1answer
80 views

What is the most secure way to check that a given masterkey is valid?

For the purposes of learning, I'm writing a small utility that allows encrypting a list of passwords using a single master key (using AES-256 and PBKDF2) Before encrypting or decrypting any password ...
2
votes
1answer
101 views

Is an IV useless for encrypting database IDs?

In my scenario I need to build a pseudo-anonimization service: a machine that given a plainID return a chiperID and vice-versa. <...
5
votes
1answer
527 views

Why doesn't the GCM spec use a more efficient multiplication algorithm?

NIST SP 800-38D § 6.3 Multiplication Operation on Blocks describes a multiplication algorithm that, in my testing, appears to be a good amount slower then algorithm 2.40 (arbitrary reduction ...
0
votes
1answer
44 views

RSA - are we able to encrypt into any possible ciphertext in $Z_n$ given a specific key?

Given a public key $(e,n)$, if we are free to choose the plaintext does that mean we are able to generate any possible ciphertext in $Z_n$ ? Because if we were given $e$ we can say that the ...
0
votes
1answer
64 views

RSA - source and image - all are possible?

Given a key $e = 3$ (the public exponent for RSA) and a group of numbers, say $Z_n^*$ (the multiplicative group of $n = pq$, where $p$ and $q$ are primes as requested by RSA). I can find the ...
1
vote
1answer
234 views

Would this mode of operation be safer?

Here the key stream is used as keys for the second level of block cipher encryption. I guess this is not vulnerable to: padding oracle attack because it is basically counter mode stream cipher ...
0
votes
1answer
111 views

What restrictions exist for publishing on strong encryption in USA?

In the past, there were export and other restrictions on publishing information, source code or otherwise making new strong cryptographic items available without prior government approvals. There are ...
2
votes
3answers
58 views

Is there a counter mode of encryption where the key is being changed for every block of data?

I thought like encrypting an IV concatenated with a CTR but instead of XOR-ing this output with the plaintext this output should be used as a temporary key for another encryption block that actually ...
1
vote
2answers
147 views

Choosing a Random Number Generator algorithm to encrypt a message

What are the best cryptographically secure pseudo-random number generator algorithms, and what are their strengths/weaknesses? I can't seem to come up with a list of them (or maybe I do, but they ...
1
vote
1answer
44 views

Combining secret/public keys

Suppose that we have three authorities which each of them generate one secret/public key for Alice. It means that Alice has three secret keys and three related public keys. Suppose that Alice combines ...
2
votes
1answer
75 views

Attacks on one-time pad, given a property of keys

An adversary $A$, eavesdrops $n$ cipher-texts, $c_{1}, c_{2} ..., c{_n}$. It also knows a value $v$ and a function $f$ such that $$f(k_{1}, k_{2}, ..., k_{n}) = v$$ where, $k_{i}$ is used to encrypt $...
-2
votes
1answer
115 views

RSA exercise with known $n$ and $e$

Bob decides to use $n = 697 \rightarrow 17 × 41$ and $e = 33$ as his public key for an RSA cryptosystem. Show that the decryption exponent is $97$. Find the encrypted form of the message $17$.
0
votes
1answer
94 views

Computational Complexity of SHA-3 (SHAKE128)

Please, I got the question "what is the computational complexity of SHA-3 (SHAKE128)"? What does that mean and how can I calculate that?? *I am using SHA-3 (SHAKE128) in my mechanism to hash fix ...
2
votes
1answer
47 views

El Gamal Signatures, Need help explanining a step, Where does the “775” come from? Image included

I understand all of the previous steps, but I don't understand what is happening to "S2" in that the number "775" showed up. Where does the 775 come from? I can't seem to get it, and I've tried ...
2
votes
1answer
118 views

Explaining Chaotic Cryptography

I will venture myself into studying chaotic cryptography. However, I find it hard to explain what chaotic cryptography entails to those that have some knowledge of cryptography. Neither can I explain ...
0
votes
1answer
83 views

Hash Collision Probabilities

Please give help! how can I calculate the probability of collision? I need a mathematical equation for my studying. Assume, I am using SHA256 to hash 100-bits. Thus: SHA256 {100} = 256-bits (hash ...
0
votes
1answer
50 views

The goal, the method, and the interface of the signcrypt primitive.

Some time ago, I proposed making the site more educational by teaching correct cryptographic programming. The proposal had had somewhat good reception, but was met with cold ice as there had been ...
1
vote
1answer
48 views

What does universal look like? What is the complexity(size/depth) of universal circuit

I was reading a paper about attribute based encryption. The authors showed that ciphertext-policy ABE can be constructed from key-policy ABE using universal circuit. But the universal circuit should ...
0
votes
1answer
71 views

Format of hybrid crypto envelope structure?

From posts including the accepted answer to How to encrypt file with RSA and AES that anyone with RSA key can decrypt them? hybrid crypto (AKA envelope encryption) a GPG-encrypted file has an ...
-1
votes
1answer
41 views

RSA limiting down the possible values for $n,q$, and $d$? given only $e$ and $p$ [duplicate]

Suppose someone forgot the value of $n$ and you only knew the values for $e$ and $p$. How could one go about limiting down the possible values for $n,q$, and $d$? I'm thinking to try and solve $\gcd(...
1
vote
1answer
55 views

Decrypting a vigenere cipher with a reused one-time pad

I understand that when a plaintext is encrypted with a key of the same length, it is referred to as a one-time pad. Now when this key is reused to encrypt another plaintext, there is potential for ...
0
votes
1answer
46 views

Send content to owner of gpg public key, nested content symmetric encryption

If I want to encrypt a text content file using a symmetric algorithm like AES, is there a standard format gpg will expect, where it can detect a symmetric key (encrypted with recipient gpg public key ...
3
votes
1answer
175 views

Performing a dictionary attack on RSA/ECB with no padding

I have the exponent $e=2^{16}+1$ and modulus $n$ (154 digit number) of an RSA public key along with the ciphertext (64 bytes) encrypted using the same key with RSA/ECB and no padding. I am required ...
2
votes
3answers
66 views

For elliptic-curve cryptography, does a 256-bit key imply that $x$ and $y$ are each 256-bits or 128-bits?

In the wikipedia article, the claim is made that "256-bit elliptic curve public key should provide comparable security to a 3072-bit RSA public key". Since, in ECC, the public-key consists of a point $...
0
votes
1answer
62 views

Is it a cryptographic risk to share the same encrypted data over and over again?

Regular scenario Let's say I have secret files which I will encrypt. The resulting container will be shared and might be intercepted. Not good, but that's okay - that's why I encrypted the data in ...
-1
votes
1answer
100 views

Is it common we extended Key size to 512 bit in AES Algorithm? [duplicate]

is it common , we increase key size to 512 Bit in AES Algorithm?
3
votes
1answer
309 views

Security of AES after key expansion 4-MB with ECB and CBC

My question is, how does the security depend or change if I encrypt with AES-128 in total 4-MB of Data? With Electronic Code Book Mode and Cipher Block Chaining Mode ? Does an adversary still ...
2
votes
1answer
55 views

is there a way to specify the encrypted message length when using private and public keys?

is there a way to specify the encrypted message length when using private and public keys? mainly I want the encrypted message to be 32 bytes? as I'm currently using RSA but that results in a length ...
2
votes
2answers
21 views

Mutual keys protection/wrapping

Is there a known risk in having two keys wrapping each other? Let's say, an adversary has access to both AESkey1(key2) and AESkey2(key1). Does it make it much easier for him to recover the keys?
3
votes
1answer
101 views

In a TLS 1.3 connection, how do the client and server choose a mutual cipher suite?

According to KeyCDN, TLSv1.3 connections are established in a single round trip: While TLS 1.2 requires two round-trips to complete the TLS handshake, 1.3 gets the job done in just one trip If ...
1
vote
1answer
67 views

Is the scheme $(r, Mac_k(r) \oplus m)$ CPA-secure?

I honestly admit this question is taken from a h.w assignment: Prove or refute: the following encryption scheme is CPA-secure: Let $(\text{Gen}, \text{Mac}, \text{Vrfy})$ be a secure MAC with tags ...
0
votes
1answer
67 views

Why does the Node crypto library do Diffie Hellman this way?

I was sifting through the Node Crytpo library and I came across their Diffie Hellman utility class. Their class implements a generateKeys function that, in their ...
1
vote
1answer
67 views

Why do general encryption key generators also take the algorithm as input?

To my understanding the key generation logic only needs a source of randomness and the length of the key to be generated as input. However, we still provide the algorithm (names) like AES, DES, ...
2
votes
0answers
53 views

Is there a partially homomorphic cryptosystem without an inverse (addition without subtraction, multiplication without division)?

I am learning about partially homomorphic cryptography, and was interested to see if there was a system such that one operation was homomorphic, but its inverse was not. For example, if I have two ...
2
votes
3answers
685 views

Input limitations on the RC6 cipher

RSA has limitation in input size for encryption and decryption. Can RC6 be used for encryption and decryption of files larger than 5 MB? Is there any limitation for input size? Is RC6 safe for using ...
0
votes
2answers
69 views

Can someone explain to me the concept of hashing versus the concept of encryption? [duplicate]

I'm a bit confused over the difference between hashing and encryption. Could someone help explain this to me in simple and concise, yet comprehensive layman's terms? I'm not asking for any specifics ...
1
vote
2answers
67 views

How is n-bit security calculated with nested encryption?

What will the total $n$-bit security be if I encrypt a message with a 128-bit XOR cipher and then take that ciphertext and encrypt it with a 128-bit key. Is the total security level now 256? One ...
9
votes
3answers
2k views

Re-encrypting a message and proving that the message has not changed

Is there a method that allows for re-encryption of a message in a way that allows observers who only have access to the two cipher texts to prove that the plain text message is the same in each? More ...
2
votes
3answers
117 views

Can I use PGP key for RSA /AES encrpyption

My client provided PGP public key for data encryption. Can I use any OpenSSL [RSA or AES or any encryption] APIs to encrypt the data with this key? What are the different types of keys available for ...
2
votes
1answer
113 views

HKDF: ikm, salt and info values

As indicated at Key generation for AES-GCM-256 file encryption I'm currently working on a file encryption software. In the above thread it was suggested that, for performance reasons, I use a ...
1
vote
1answer
122 views

How to encrypt plain-text message using Diffie-Hellman algorithm

Let's say bob says Hi and Alice says Hello, With the knowledge of n and ...
-4
votes
1answer
94 views

A new member. first step towards cryptography. [closed]

I would like to learn about cryptography. How and where to start?
0
votes
1answer
44 views

ED25519 Child Key Derivation

Let's say I generate a keypair for a user with go's ed25519 package: pub, private := ed25519.GenerateKey(nil) And I want to generate additional child keys as ...