# All Questions

188 views

### How does an oblivious test of plaintext equality work?

Assume an ElGamal Cryptosystem. Assume a set of three players, $P_1$, $P_2$ and $P_3$. The private key $x$ is shared among the players. The player $P_1$ has a piece of the private key $x_1$, $P_2$ has ...
206 views

### How can I prove/disprove that a construction yields a secure PRG?

Let $G:\{0,1\}^{*} \mapsto \{0,1\}^{*}$ be a secure PRG. Prove or disprove that the following construction also yields a secure PRG. $$G'(k) = G(k||0),$$ where $||$ denotes the concatenation of two ...
119 views

### Can you give me an example of any PKC encrytion algorithm with coins?

I'm reading a Definition of Public Key Encryption and here say: ... Enc is a (possibly) probabilistic polynomial time encryption algorithm which takes as input a public key $pk$, a $m\in M$ and ...
167 views

### McEliece Public Key Encryption

The definition of Public Key Encryption(PKE) say that: A PKE scheme is a triple of probabilistic polynomial time algorithm (PPT) (Gen,Enc,Dec). The definition of PPT say: In complexity ...
338 views

### Can ECB mode really leak some characters?

In an Ars Technica article about Adobe's use of 3DES in ECB mode, there's a paragraph The passwords, according to password expert Steve "Sc00bz" Thomas, are encrypted in a mode known as ECB. That ...
190 views

### randomly generated key reused with XOR

If I have a long randomly generated key (k), XORed with a message (m), but since the message is longer than the key, there is a chance of reusing the keystream with the same message, but the key is ...
207 views

### In Elgamal, the generator g is always quadratic non-residue modulo p where p is a safe prime and inverse of g can be also generator?

In Elgamal, the generator $g$ is always quadratic non-residue modulo $p$, where $p$ is a safe prime and the inverse of $g$ can also be generator? Can I prove it? I can't come up with it at all.
178 views

### Factoring large numbers

I am trying to factor few integers that are each between 115 and 135 digits long. I have just, little over a month ago, began my study of Cryptography. I was wondering if anyone knew of any efficient ...
940 views

### How to use HMAC-SHA1, HMAC-SHA2 in conjunction with AES

I understand how to compute HMAC-SHA1, HMAC-SHA2 etcetera. Please explain why/how is the resulting HMAC value is used in conjunction with AES for encryption/decryption and signing/verifying. In ...
80 views

### secret sharing of product of 2 numbers

Does evaluating the products of shares $a_jb_j$ give a secret sharing of $ab$? I think it's a no, but I am not sure on how to prove it.
85 views

### What is the difference between exhaustive search and factorization in relationship to determining a key?

It seems to me an exhaustive search would simply try to use all the possible bit combinations of a key, while factorization is some mathematical formula for determining the key? When discussing the ...
102 views

### Is there a developer's resource that ties encryption methods and strengths to the appropriate usage scenarios?

I'm not looking necessarily for implementations in any language (although it would help to list those resources as well), but what I am most interested in is a discussion of what advantages and ...
1k views

### Using a Hash as a secure PRNG

I was just looking at some NIST PRNG recommendations, specifically at Hash_DRBG. I read briefly through the algorithm, and even though it is not overly complex, it still seems unnecessary to me. I ...
298 views

### Is there an algorithm or hardware that can sign/verify natural time?

PGP/GPG can used to sign text, others use public key to verify them. So one could say, that these cryptographic algorithms deal with space. Are there any algorithms that can deal with time? E.g. I ...
167 views

### What are the security effects of reusing a public RSA key to encrypt large data by blocks? [duplicate]

I'm trying to figure out a way to do public key encryption on a very large piece of data. For this, I of course want one side to do the encrypting but is unable to decrypt the data, and the other ...
106 views

### Verify Messages to Embedded Device

I'm building an embedded device that I plan on distributing. Periodically the device will poll my server to check for updates and commands. I'd like the device to verify that any messages(JSON strings ...
205 views

### Alice's forgetful banking

Alice has a bank account number, but has forgotten which bank it is for. There are 4 banks, run by Bob, Carlos, David, and Eve. She could find out by going to all of the banks and asking if they have ...
1k views

### How will Cryptography be changed by Quantum Computing?

I realise this isn't a 'yes or no' question, and I apologise for asking something that could be seen as a discussion thread, but I had to ask. I'm currently doing an EPQ in CS (specifically how QC ...
218 views

### plaintext and its encrypted version known [duplicate]

I have a (long) text in two versions, encrypted and plaintext. I think it was encrypted using a substitution cipher method (I'm pretty sure, indeed). I'm not good in this matter, I know little about ...
276 views

### How can I accomplish Key Derivation in JavaScript?

I need to take a potentially weak user password and derive a strong key for AES encryption in JavaScript. How can I do this? I expect the hardest problem is generating a good random salt - perhaps an ...
404 views

### Are there any Javascript CSPRNGs? [closed]

I'm writing some software that requires the use of a CSPRNG with javascript for use in the browser and I'm wondering what libraries are available. Crypto-js doesn't seem to have a CSPRNG I can ...
283 views

### Serpent cipher : Osvik S-Boxes confusion and test vectors

I'm having hard time with the implementation of the S-Boxes by Osvik found in this paper: Speeding up Serpent. At the end of the paper, all the s-boxes are given and then, I just implement them. ...
639 views

### HMAC vs Encrypted Hash

What is best to use (for message integrity) between… AES(Data) + HMAC(Data) AES(Data + HMAC(Data)) AES(Data + Hash(Data)) …and why?
126 views

### Why does CBC-MAC need prefix-free inputs to be a good PRF?

In the FFX spec, there is a note about using CMAC as the round function. Security notes. The round function F is constructed in such a way that the set of inputs on which the CBC-MAC is ...
2k views

### What is the recommended replacement for MD5?

Since MD5 is broken for purposes of security, what hash should I be using now for secure applications?
563 views

### If I have the unencrypted text and the encrypted text, can I calculate the key?

If I have the unencrypted text and the encrypted text, can I calculate the key? It seems logical based on my limited knowledge of encryption that I should be able to... but it also seems like too ...
99 views

### Question about the definition of a perfect cipher

I need to prove that the following encryption scheme is a perfect cipher: Let $p$ be a prime. The secret key is a pair $(a,b)$ sampled uniformly at random from $\mathbb{Z}_p^* \times \mathbb{Z}_p$. ...
98 views

### Password as it relates to various encryption schemes

Suppose you have 2 drives you want to encrypt using different encryption algorithms, as an example: AES256 and Twofish. I am aware that using the same password for both could potentially weaken ...
106 views

### Public Key encryption /Assymetric encryption

For a start, I 've got a question regarding the Public key encryption. I know the public key encryption overcomes the Key distribution issue with the symmetric encryption and that in the case of ...
155 views

### Derive a public EC key from two public EC keys

Alice has two EC key pairs: $a_1$, $a_2$ are private keys (integers), $A_1$, $A_2$ are the corresponding public keys (points). Alice and Bob want to create a new public key $C$. Alice must prove that ...
62 views

### Hash of multiset of values, which lets me compute the hash of the union

Cryptographic hash functions normally take as input a bitstring. I am looking for a hash function that takes as input a finite multiset of values. In other words, given $S \subset \{0,1\}^*$, I want ...
178 views

### How to Distribute the Shares using Secret Sharing for arbitrary Monotone Access Structures

Consider 4 people, $A$,$B$,$C$,$D$, & a secret $s\in\{0,1\}^k$. Construct a scheme which enables the following subsets of people to retrieve the secret $\{A,B\}$, $\{A,C\}$, $\{B,C,D\}$. I know ...
552 views

### Attacking 2DES efficiently

Meet in the middle on 2DES uses $2^{56}$ memory. Given the fact that the attacker has only $2^{45}$ memory. How can the attacker adjust the attack so even with this memory limit, it will still be more ...
1k views

### Duration for attacking Two-Key Triple-DES Encryption using all RAM ever built?

I am considering attacks on Two-Key Triple-DES Encryption assuming $2^{32}$ known plaintext/ciphertext pairs (that's a mere 32 Giga Bytes of ciphertext) by the method devised by Paul C. van Oorschot ...
81 views

84 views

### Why does the new encryption scheme proposed by authors stop an adversary from guessing the subspace of the secret key?

In this paper, the authors construct an encryption scheme that is supposed to be resilient to tampering and leaking (as opposed to just leaking). Specifically this scheme: If you look at the ...
166 views

### Can you get two unpredictable hashes from the same message with, e.g. SHA1?

I'd like to create a database of questions and answers so that an attacker with access to the database can't obtain either the questions or the answers. If H0 and ...
4k views

### Guarding against cryptanalytic breakthroughs: combining multiple hash functions

Assume I want to design a protocol (or data format or similar) including some cryptographic hash, and want it to be as future-proof as possible, i.e. I want to avoid that breakthroughs in cryptography ...
204 views

### How does the IV or initial counter increase internally for each block in AES CTR mode?

I am working on Intel AES-NI library and since the AES function is coded using low-level assembly instructions. I could not see how the IV or initial counter increases in CTR mode. In general, how ...
564 views

### Estimating bits of entropy

Best ways to estimate average bits of entropy in a byte stream. I know there are different statistical tests out there (NIST, Dieharder, etc), which all do different ways of analyzing entropy. What ...
64 views

### Why do authors say conflicting things regarding leak-free stages in their paper?

In this paper the last sentence of the first paragraph in the abstract states: We assume a (necessary) “leak-free” preprocessing stage. But then later on in section 1.4 they say Another ...