# 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.

4,764 questions
Filter by
Sorted by
Tagged with
34 views

### Upgrade to BouncyCastle 1.76 causing "CMSException: exception unwrapping key: cannot initialise algorithm parameters"

Upgrade to BouncyCastle 1.76 causing "CMSException: exception unwrapping key: cannot initialise algorithm parameters: LunaIvParameters: Unsupported engineInit method" error in RSAES-OAEP ...
503 views

### Is ElGamal homomorphic encryption using additive groups works only for Discrete Log ElGamal? What about EC ElGamal?

It is known that in Discrete Log ElGamal encryption, the ciphertext $E$ is encrypted as: $a\ =\ g^k$, where $k$ - random scalar from $[0,\ p)$, $g$ - group generator $b\ =\ (Y^k*m)\mod\ p$, where $Y$ -...
• 77
77 views

### Implementing password recovery in my app

I have an Android App that stores encrypted data using a key derived from user entered password (PBKDF2). If any user forgets their password, they loose access to all their data. Hence, I am trying to ...
35 views

### Proof of Decryption in a Chinese Remainder Theorem-Based Encryption Scheme

I've been studying a cryptographic scheme that uses the Chinese Remainder Theorem (CRT) for decryption. Here's a brief overview of the encryption and decryption process: Setup: Alice chooses two ...
159 views

### Is it possible to abstract an ElGamal encryption for EC and Discrete Log by using a Group Law?

ElGamal encryption for Discrete Log is defined as: Bob side does: $Y\ =\ (g^x)\ mod\ P$, where $g$ - generator, $x$ - random value among the group elements and $P$ - prime number, typically ultra ...
• 77
52 views

### Is a salt necessary when using a key and an intialization vector during encryption?

I use OpenSSL to encrypt passwords. For that the parameters - $S$ salt, $K$ key, $IV$ initialization vector are used. Although the command produces the results, I am not sure if the salt is really ...
• 145
1 vote
48 views

### lattice RLWE encryption and decryption process

I am here trying to solve an issue that I face a lot during solving RLWE. The issue is that I am not able to retrieve the original message after the decryption process. I use the following encryption ...
• 31
170 views

### Cryptography elements requested for a plot in a story

experts. I am working on a story that involves a terabyte portable drive that has been encrypted by Person 1 and needs to be decrypted by Person 2 (Person 1 is deceased by that point). Person 1 and ...
989 views

### Encrypting a message by calculating the digits of a complicated irrational number

I have no background in cryptography at all so excuse my ignorance if this is a silly question. I was pondering ways in which I could encrypt a message and I came up with the following idea: Me and ...
• 159
33 views

### Zero-Knowledge Proof of a number being generated "randomly" (similar to a dice roll)

If party1 asks other parties to give a random number, for simplicity, say in a range from 1 to 6 (like in a dice). Is it possible for party1 to ensure that the number received is in a given range and ...
• 307
114 views

### Definition of non-interactive non-commiting encryption

I'm having trouble understanding the definition of non-interactive non-committing encryption (NINCE) from the paper Separating Random Oracle Proofs from Complexity Theoretic Proofs: The Non-committing ...
• 716
1 vote
17 views

### Mental Poker: Can the shuffle of the deck be done Publicaly by a single player at the start of the game

Ref: Mental Poker Revisited by Barnett and Smart. I am looking at mental poker problem. Generally, the shuffling process is done by a single player who starts the game and not by all players. But, in ...
• 307
1 vote
78 views

### Best way of using AES GCM with static key PBKDF2/HKDF

Refering to this thread : using different IV and SALT with AES-CBC but same KEY I am in a similar situation to the one exposed, namely that I need to use AES to encrypt data, however, I cannot ...
32 views

### Is the CFB mode of Encryption related-key secure

I am going through the paper https://www.iacr.org/archive/fse2013/84240283/84240283.pdf where the related key security of CBC mode of encryption is well analyzed. I am concerned about whether the CFB ...
10 views

### Google Chrome displays formulas in Latex wrongly on stackexchange, why? [migrated]

Some formulas in Latex are displayed as boxes like here: Link: Statistical closeness implies computational indistinguishability I don't have this problem with Firefox or Safari. I also tried to turn ...
• 1
41 views

### Parallel block cipher in CTR mode and variable number of threads: how to deal with internal state and permit decryption?

I'm implementing a parallel block cipher (Morus, to be precise) in CTR mode and I'd like to make it flexible with respect to the number of threads. It is not difficult per se, as I can partition the ...
• 101
1 vote
118 views

### Could this method allow two people using weak cryptography to bootstrap their way to unbreakable cryptography (e.g. otp)

Encryption schemes are usually explained to the general public in terms of "time required to break" where strong encryption like AES-256 should in theory take millions of years. Given that ...
90 views

### Why is the ciphertext output 32 bytes long when i encrypt a 16 bytes long plaintext by using AES-128-CBC

I am studying AES algorithm, as far as I know, encrypting a 16 bytes plaintext will result in a 16 bytes ciphertext. But I got a different result when trying to encrypt a 16 bytes plaintext using AES-...
1 vote
163 views

### Can the RSA public key be used for both encryption and decryption?

My understanding of RSA Cryptography is that the Public Key is used for data encryption and Private Key is used for data decryption. But on this website(https://www.devglan.com/online-tools/rsa-...
• 113
50 views

### Division ciphertext in SEAL BFV

I am building a Logistic Regression model over encrypted data. Based on my references. I need to scale like that to apply the approximate sigmoid function in the BFV scheme However, I don't know how ...
41 views

### How is the IV/Nonce determined in OFB mode? - SQLite Encryption Extension (SEE)

I am doing some research in different methods of encryption for SQLite databases. One of the databases I have is AES-256 OFB encrypted with SEE (https://sqlite.org/see/doc/release/www/readme.wiki). ...
70 views

### How to hide a sequence number in the messages that exposed to the public?

Here is the situation: Alice sends msg1, msg2 and msg3 to Bob. Such messages are not always delivered to Bob following the same order. Bob needs to use key1 to decrypt msg1, use key2 to decrypt msg2, ...
1 vote
38 views

### Mask-Shuffle in Mental Poker Revisited from Barnett and Smart

I am going through the paper "Mental Poker Revisited" by Barnett and Smart. I understood Section 5 in which the author explains Chaum-Pedersen (CP) protocol and how it is used in methods ...
• 307
119 views

• 75
62 views

### improved impossible differential crpytanalysis of 6-round rijndael

I'm studying the paper: "Improved Impossible Differential Cryptanalysis of Rijndael and Crypton". I've got two questions: Please explain the calculation performed for step 5? Step 4 ...
1 vote
32 views

### ECIES encryption time linearity with plaintext size using the same key lenght

Do you know if ECIES encryption time is linear with the plaintext size, using the same key length?
• 113
110 views

### Is using KDF more insecure that generating key directly? (AES 256 CBC)

I am writing a PHP application that requires files to encrypted using AES-256-CBC. I have two options: Option #1 Generate a totally random AES key => User Key Generate another totally random AES ...
1 vote
42 views

### Can proxy re-encrypted cyphertext be identical to encrypted text by the target?

I have the following basic set-up for my question, I am getting to learn about proxy re-encryption and so far what I have looked at in more detail is this re-encryption algorithm from IronCore Labs ...
37 views

### In the context of Hardware Security and Cryptography, how do I calculate the Algebraic Normal Form for sboxes [duplicate]

In our hardware security exercise, I am trying to calculate the ANF function manually (Sboxes) for the given table: And I came up with the result as: I thought I was calculating it correctly using ...
84 views

### Can a Substitution Cipher achieve Confusion and Diffusion

Can a substitution cipher achieve confusion and diffusion? By a substitution cipher I mean one where each character is replaced by another. By confusion my definition is that to solve the question, ...
• 75
121 views

### Is semantic security equvalent to IND-CPA?

Is semantic security equivalent to IND-CPA? If a PKE scheme like ElGamal is semantically secure, can we say it is IND-CPA? What's the relationship between semantic security and IND-CPA?
• 137
80 views

### Semantic security of ElGamal

On pages 9-11 of the paper Sequence of games, Shoup provides a detailed proof of the semantic security of a hashed EleGamal. However, he only claims security goals. I would like to know what the ...
• 137
45 views

### Is integrity guaranteed by sending plain text with public key encrypted JWT and hash?

I am currently developing an RPC system that does not require message encryption, but does need client authentication and verification of message integrity. I want the RPC server to minimize its state ...
64 views

### Keccak implementation confusion

I am implementing a Keccak core in VHDL and I am currently almost done yet I am still facing some problems and would appreciate your insight. First of all I wanna ask about the padding, I know that we ...
1 vote
57 views

### Can two different AES keys have the KCV by chance?

I am trying to check KCVs of a few keys. I am generating the KCV for the keys using the method mentioned here https://crypto.stackexchange.com/a/11873/115990 Question: Can KCVs of two different AES ...
• 113
70 views

### Lightweight length preserving encryption

I'm in need of an encryption algorithm that can be easily implemented in c, doesn't drastically increase the size of the encrypted data (the data to be encrypted will be approximately 200 bytes and ...
1 vote
131 views

### What is the purpose of making salted passwords public?

So I was reading through an article about how passwords are salted and hashed through a cryptographic function here, and found out that hashed passwords, along with the plaintext salt values are ...
55 views

### Vulnerabilities of a word-level substitution cipher

What kind of attacks would be possible against this kind of substitution cipher? Every word in the plaintext is to be replaced with a random string of the same length The encryption of any given word ...
1 vote
39 views

### CRYSTAL-KYBER for Cloud-native storage [duplicate]

I'm trying to use CRYSTAL-KYBER encryption to protect Cloud-native storage against both normal and quantum attacks. I've read Cloud-native-security-whitepaper and found out that ...
• 51
1 vote